Part 4 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with...
authorJeremy Allison <jra@samba.org>
Wed, 8 Jun 2011 21:26:02 +0000 (14:26 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 8 Jun 2011 21:26:02 +0000 (14:26 -0700)
We don't need to check mode bits as well as dev/ino to
ensure we're in the same place.

source3/smbd/open.c

index 3603a81cff8210ee2f36d10280687e2d749bcfc4..b7e5276a8a85c85b8a2c88f47f793bbdfdf8a394 100644 (file)
@@ -318,10 +318,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;