Part 1 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with...
authorJeremy Allison <jra@samba.org>
Wed, 8 Jun 2011 17:24:02 +0000 (10:24 -0700)
committerKarolin Seeger <kseeger@samba.org>
Fri, 10 Jun 2011 19:09:09 +0000 (21:09 +0200)
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 0d585cf8dcdb96104e64df214046bf14e2b74f96..e8d1a1bd4073f13cdd07abc7cef7c0d813531d1a 100644 (file)
@@ -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: