Part 1 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with...
authorJeremy Allison <jra@samba.org>
Tue, 7 Jun 2011 23:42:02 +0000 (16:42 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 7 Jun 2011 23:42:02 +0000 (16:42 -0700)
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

index d4b093468136cdd6dd2393f1e49357e69a9736d2..fedb2735fb9921c651ac18549afa70e7c7817f74 100644 (file)
@@ -350,6 +350,8 @@ NTSTATUS change_dir_owner_to_parent(connection_struct *conn,
                DEBUG(10,("change_dir_owner_to_parent: changed ownership of new "
                        "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: