summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-06-08 14:21:52 -0700
committerKarolin Seeger <kseeger@samba.org>2011-06-14 12:59:12 +0200
commit0108975ae94576d707959b35f4ee8a930ccbe207 (patch)
tree227efeace8baa5ddd8e90e81e6bced8483b849c8
parentdc27e37ea8f62af657ef39e2d2ca8e12fcdf93c3 (diff)
downloadsamba-0108975ae94576d707959b35f4ee8a930ccbe207.tar.gz
Part 4 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with "inherit permissions = yes" and POSIX ACLs
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)
-rw-r--r--source3/smbd/open.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index e77284b9f93..c626ebebc8e 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -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;