From dbe1211d027346c1e61a7befdb930ae64758329e Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sat, 13 Feb 1999 09:19:17 +0000 Subject: 1999-02-12 Gordon Matzigkeit * init-startup.c (diskfs_startup_diskfs): Release the virtual root's lock as soon as we've checked that it's a valid directory. Ignore leading slashes in _diskfs_chroot_directory. --- libdiskfs/ChangeLog | 6 ++++++ libdiskfs/init-startup.c | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index 3fd85ff9..f1c1a716 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,3 +1,9 @@ +1999-02-12 Gordon Matzigkeit + + * init-startup.c (diskfs_startup_diskfs): Release the virtual + root's lock as soon as we've checked that it's a valid directory. + Ignore leading slashes in _diskfs_chroot_directory. + Sun Jan 31 18:24:33 1999 Thomas Bushnell, BSG * file-utimes.c (diskfs_S_file_utimes): Implement new semantics diff --git a/libdiskfs/init-startup.c b/libdiskfs/init-startup.c index ea77283c..355a66ae 100644 --- a/libdiskfs/init-startup.c +++ b/libdiskfs/init-startup.c @@ -1,5 +1,5 @@ /* diskfs_startup_diskfs -- advertise our fsys control port to our parent FS. - Copyright (C) 1994, 1995, 1996, 1998 Free Software Foundation + Copyright (C) 1994, 1995, 1996, 1998, 1999 Free Software Foundation This file is part of the GNU Hurd. @@ -43,6 +43,10 @@ diskfs_startup_diskfs (mach_port_t bootstrap, int flags) struct node *np, *old; struct protid *rootpi; + /* Skip leading slashes */ + while (_diskfs_chroot_directory == '/') + _diskfs_chroot_directory++; + mutex_lock (&diskfs_root_node->lock); /* Create a protid we can use in diskfs_lookup. */ @@ -75,6 +79,7 @@ diskfs_startup_diskfs (mach_port_t bootstrap, int flags) if _diskfs_chroot_directory is non-null. */ old = diskfs_root_node; diskfs_root_node = np; + mutex_unlock (&np->lock); diskfs_nput (old); } -- cgit v1.2.3