Part 2 of bugfix for #8211 - "inherit owner = yes" doesn't interact correctly with...
authorJeremy Allison <jra@samba.org>
Tue, 7 Jun 2011 23:48:14 +0000 (16:48 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 7 Jun 2011 23:48:14 +0000 (16:48 -0700)
When changing ownership on a new file make sure we
also change the returned stat struct to have the correct uid.

source3/smbd/open.c

index fedb2735fb9921c651ac18549afa70e7c7817f74..5bd9684fadc75d55337e9116743d55525be662ca 100644 (file)
@@ -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);