summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-01-01 15:59:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:00 -0500
commit7a1cf83dec95ac139c5dd50f3ae6b365e39bfd48 (patch)
tree813dcb95384b016e5929634ff2d5f82043356626 /source3/smbd
parente0c989c9492a2fd79a94396d2f0b5a9685f56122 (diff)
downloadsamba-7a1cf83dec95ac139c5dd50f3ae6b365e39bfd48.tar.gz
samba-7a1cf83dec95ac139c5dd50f3ae6b365e39bfd48.tar.bz2
samba-7a1cf83dec95ac139c5dd50f3ae6b365e39bfd48.zip
r12653: Patch from SATOH Fumiyasu <fumiyas@miraclelinux.com>
for bug #3348. Don't assume owning sticky bit directory means write access allowed. Jeremy. (This used to be commit 1032aa890f53097f87fa97689cb21d908b32093c)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/posix_acls.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 1b8e1d6214..f49f80f006 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -4149,8 +4149,13 @@ BOOL can_delete_file_in_directory(connection_struct *conn, const char *fname)
if(SMB_VFS_STAT(conn, fname, &sbuf_file) != 0) {
return False;
}
- if (current_user.uid == sbuf_file.st_uid) {
- return True;
+ /*
+ * Patch from SATOH Fumiyasu <fumiyas@miraclelinux.com>
+ * for bug #3348. Don't assume owning sticky bit
+ * directory means write access allowed.
+ */
+ if (current_user.uid != sbuf_file.st_uid) {
+ return False;
}
return False;
}