summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-05-11 23:24:16 +0000
committerRoland McGrath <roland@gnu.org>2002-05-11 23:24:16 +0000
commit3f1fe94ba5ef71f2ed557d5d6652c6afb304fdcf (patch)
tree1779066b8bb8252a34b5dbdad1d27102d7fc04ab /trans
parentd293dd2c6101daa4ef2fbdd56e7fee71c96ba741 (diff)
2002-05-11 Roland McGrath <roland@frob.com>
* fakeroot.c (main): Stat the root node and fake its st_mode immediately to remove translator bits.
Diffstat (limited to 'trans')
-rw-r--r--trans/fakeroot.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 9dbb55ac..0ff7492e 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -611,6 +611,14 @@ any user to open nodes regardless of permissions as is done for root." };
if (err)
error (5, err, "Cannot create root node");
+ err = netfs_validate_stat (netfs_root_node, 0);
+ if (err)
+ error (6, err, "Cannot stat underlying node");
+
+ netfs_root_node->nn_stat.st_mode &= ~(S_IPTRANS | S_IATRANS);
+ netfs_root_node->nn_stat.st_mode |= S_IROOT;
+ netfs_root_node->nn->faked |= FAKE_MODE;
+
netfs_server_loop (); /* Never returns. */
/*NOTREACHED*/