summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-06-07 16:48:14 -0700
committerJeremy Allison <jra@samba.org>2011-06-07 16:48:14 -0700
commit40c54a736dff751dcdc66d6cd5c5d2307aeda75c (patch)
treeb4e6a5328c6a49edb60a5678917881aff1b3c7e5 /source3
parentcabed2fb179ea38ac93f8b9872dc3be7825d13f8 (diff)
downloadsamba-40c54a736dff751dcdc66d6cd5c5d2307aeda75c.tar.gz
samba-40c54a736dff751dcdc66d6cd5c5d2307aeda75c.tar.bz2
samba-40c54a736dff751dcdc66d6cd5c5d2307aeda75c.zip
Part 2 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with "inherit permissions = yes" and POSIX ACLs
When changing ownership on a new file make sure we also change the returned stat struct to have the correct uid.
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/open.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index fedb2735fb..5bd9684fad 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -241,6 +241,8 @@ void change_file_owner_to_parent(connection_struct *conn,
DEBUG(10,("change_file_owner_to_parent: changed new file %s to "
"parent directory uid %u.\n", fsp_str_dbg(fsp),
(unsigned int)smb_fname_parent->st.st_ex_uid));
+ /* Ensure the uid entry is updated. */
+ fsp->fsp_name->st.st_ex_uid = smb_fname_parent->st.st_ex_uid;
}
TALLOC_FREE(smb_fname_parent);