From 38c4e839b15846ca3156f445350f650ee3bec5de Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Wed, 13 Jul 1994 20:06:16 +0000 Subject: Formerly fsys-getroot.c.~11~ --- libdiskfs/fsys-getroot.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'libdiskfs') 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; -- cgit v1.2.3