Part 4 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with...
authorJeremy Allison <jra@samba.org>
Wed, 8 Jun 2011 21:21:52 +0000 (14:21 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 14 Jun 2011 10:59:12 +0000 (12:59 +0200)
We don't need to check mode bits as well as dev/ino to
ensure we're in the same place.
(cherry picked from commit 0c1b1b73870bd477c83c130cab297b7f2615fe55)

source3/smbd/open.c

index e77284b9f9379c5fd94d66229eb9dcae39e00883..c626ebebc8ef77cfc00853b69b49b81038be6dc7 100644 (file)
@@ -314,10 +314,9 @@ NTSTATUS change_dir_owner_to_parent(connection_struct *conn,
 
        /* Ensure we're pointing at the same place. */
        if (smb_fname_cwd->st.st_ex_dev != psbuf->st_ex_dev ||
-           smb_fname_cwd->st.st_ex_ino != psbuf->st_ex_ino ||
-           smb_fname_cwd->st.st_ex_mode != psbuf->st_ex_mode ) {
+           smb_fname_cwd->st.st_ex_ino != psbuf->st_ex_ino) {
                DEBUG(0,("change_dir_owner_to_parent: "
-                        "device/inode/mode on directory %s changed. "
+                        "device/inode on directory %s changed. "
                         "Refusing to chown !\n", fname ));
                status = NT_STATUS_ACCESS_DENIED;
                goto chdir;