Changeset 733 for branches/samba-3.5.x/source3/smbd/file_access.c
- Timestamp:
- Nov 12, 2012, 5:09:31 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.5.x/source3/smbd/file_access.c
r620 r733 38 38 if (conn->server_info->utok.uid == 0 || conn->admin_user) { 39 39 /* 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. */ 40 47 return true; 41 48 } … … 116 123 * by owner of directory. */ 117 124 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; 130 129 goto out; 131 130 }
Note:
See TracChangeset
for help on using the changeset viewer.