summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-12-10 16:55:48 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2013-12-10 18:04:38 +0100
commitcb42b5fa92329496f25f9479257bd03aeb346205 (patch)
treee280428f96e93e43d7c739c593acf521919dd142 /trans
parent77ba38a61492799cc3c615f0f622f34fc10de826 (diff)
trans/fakeroot: fix ownership of newly created files
Previously, files created in the fakeroot environment were created with the uid and gid of the user running fakeroot: % fakeroot-hurd /bin/sh -c 'touch /tmp/$$; stat --format=%u:%g /tmp/$$' 1000:1000 * trans/fakeroot.c (netfs_S_dir_lookup): Fix ownership of newly created files.
Diffstat (limited to 'trans')
-rw-r--r--trans/fakeroot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 920367d1..68826182 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -399,6 +399,8 @@ netfs_S_dir_lookup (struct protid *diruser,
}
else
{
+ err = netfs_attempt_chown (user, np, 0, 0);
+ assert_perror (err); /* Our netfs_attempt_chown cannot fail. */
*retry_port = ports_get_right (newpi);
*retry_port_type = MACH_MSG_TYPE_MAKE_SEND;
ports_port_deref (newpi);