Ignore:
Timestamp:
Nov 12, 2012, 5:09:31 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: update branche to 3.5.13

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.5.x/source3/smbd/file_access.c

    r620 r733  
    3838        if (conn->server_info->utok.uid == 0 || conn->admin_user) {
    3939                /* I'm sorry sir, I didn't know you were root... */
     40                return true;
     41        }
     42
     43        if (access_mask == DELETE_ACCESS &&
     44                        VALID_STAT(smb_fname->st) &&
     45                        S_ISLNK(smb_fname->st.st_ex_mode)) {
     46                /* We can always delete a symlink. */
    4047                return true;
    4148        }
     
    116123         * by owner of directory. */
    117124        if (smb_fname_parent->st.st_ex_mode & S_ISVTX) {
    118                 if(SMB_VFS_STAT(conn, smb_fname) != 0) {
    119                         if (errno == ENOENT) {
    120                                 /* If the file doesn't already exist then
    121                                  * yes we'll be able to delete it. */
    122                                 ret = true;
    123                                 goto out;
    124                         }
    125                         DEBUG(10,("can_delete_file_in_directory: can't "
    126                                   "stat file %s (%s)",
    127                                   smb_fname_str_dbg(smb_fname),
    128                                   strerror(errno) ));
    129                         ret = false;
     125                if (!VALID_STAT(smb_fname->st)) {
     126                        /* If the file doesn't already exist then
     127                         * yes we'll be able to delete it. */
     128                        ret = true;
    130129                        goto out;
    131130                }
Note: See TracChangeset for help on using the changeset viewer.