From 7a1cf83dec95ac139c5dd50f3ae6b365e39bfd48 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 1 Jan 2006 15:59:22 +0000 Subject: r12653: Patch from SATOH Fumiyasu for bug #3348. Don't assume owning sticky bit directory means write access allowed. Jeremy. (This used to be commit 1032aa890f53097f87fa97689cb21d908b32093c) --- source3/smbd/posix_acls.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source3/smbd/posix_acls.c') 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 + * 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; } -- cgit