From f3900b0a96f98cc65d957cda5f92963f636d6ec1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 8 Jun 2011 10:24:02 -0700 Subject: [PATCH] Part 1 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with "inherit permissions = yes" and POSIX ACLs When changing ownership on a new directory make sure we also change the returned stat struct to have the correct uid. --- source3/smbd/open.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 0d585cf8dcd..e8d1a1bd407 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -338,6 +338,9 @@ NTSTATUS change_dir_owner_to_parent(connection_struct *conn, "directory %s to parent directory uid %u.\n", fname, (unsigned int)smb_fname_parent->st.st_ex_uid )); + /* Ensure the uid entry is updated. */ + psbuf->st_ex_uid = smb_fname_parent->st.st_ex_uid; + chdir: vfs_ChDir(conn,saved_dir); out: -- 2.11.4.GIT