diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-07-13 20:06:16 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-07-13 20:06:16 +0000 |
commit | 38c4e839b15846ca3156f445350f650ee3bec5de (patch) | |
tree | 56edb9ab20940e13a655c4c5f610fea80928a93f /libdiskfs | |
parent | a080f1a1b6ee9e6997814b16aafb52aaf7bc06b4 (diff) |
Formerly fsys-getroot.c.~11~
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/fsys-getroot.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c index df13b466..687d4192 100644 --- a/libdiskfs/fsys-getroot.c +++ b/libdiskfs/fsys-getroot.c @@ -45,6 +45,8 @@ diskfs_S_fsys_getroot (fsys_t controlport, if (!pt) return EOPNOTSUPP; + flags &= O_HURD; + mutex_lock (&diskfs_root_node->lock); /* This code is similar (but not the same as) the code in @@ -159,11 +161,17 @@ diskfs_S_fsys_getroot (fsys_t controlport, return error; } - flags &= ~(O_READ | O_WRITE | O_EXEC); /* XXX wrong */ + if ((flags & O_NOATIME) + && (diskfs_isowner (diskfs_root_node, &pseudocred) == EPERM)) + flags &= ~O_NOATIME; + + flags &= ~OPENONLY_STATE_MODES; + /* XXX Shouldn't use _diskfs_dotdot_file here; that should be an arg. */ *returned_port = (ports_get_right (diskfs_make_protid - (diskfs_make_peropen (diskfs_root_node, flags), + (diskfs_make_peropen (diskfs_root_node, flags, + _diskfs_dotdot_file), uids, nuids, gids, ngids))); *returned_port_poly = MACH_MSG_TYPE_MAKE_SEND; |