Changeset 274 for branches/samba-3.3.x/source/smbd/file_access.c
- Timestamp:
- Jun 17, 2009, 2:19:52 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/smbd/file_access.c
r222 r274 93 93 94 94 #ifdef S_ISVTX 95 /* sticky bit means delete only by owner or root. */ 95 /* sticky bit means delete only by owner of file or by root or 96 * by owner of directory. */ 96 97 if (sbuf.st_mode & S_ISVTX) { 97 98 SMB_STRUCT_STAT sbuf_file; … … 102 103 return True; 103 104 } 105 DEBUG(10,("can_delete_file_in_directory: can't " 106 "stat file %s (%s)", 107 fname, strerror(errno) )); 104 108 return False; 105 109 } … … 108 112 * for bug #3348. Don't assume owning sticky bit 109 113 * directory means write access allowed. 114 * Fail to delete if we're not the owner of the file, 115 * or the owner of the directory as we have no possible 116 * chance of deleting. Otherwise, go on and check the ACL. 110 117 */ 111 if (conn->server_info->utok.uid != sbuf_file.st_uid) { 118 if ((conn->server_info->utok.uid != sbuf.st_uid) && 119 (conn->server_info->utok.uid != sbuf_file.st_uid)) { 120 DEBUG(10,("can_delete_file_in_directory: not " 121 "owner of file %s or directory %s", 122 fname, dname)); 112 123 return False; 113 124 }
Note:
See TracChangeset
for help on using the changeset viewer.