r12653: Patch from SATOH Fumiyasu <fumiyas@miraclelinux.com>
authorJeremy Allison <jra@samba.org>
Sun, 1 Jan 2006 15:59:22 +0000 (15:59 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:06:00 +0000 (11:06 -0500)
for bug #3348. Don't assume owning sticky bit
directory means write access allowed.
Jeremy.

source/smbd/posix_acls.c

index 1b8e1d62143094766a8ef2d23cffdab0a1d67865..f49f80f006f131a4d8845181b5f328ff606161f4 100644 (file)
@@ -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;
        }