From f8e9c21bc6f36840b308da7bb1c2d1be79386830 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 24 Oct 1998 07:31:10 +0000 Subject: 1998-04-04 Roland McGrath Add support for a "virtual root directory" specified at startup. * priv.h (_diskfs_chroot_directory): Declare new variable. * opts-std-startup.c (startup_options, parse_startup_opt): New string-valued option -C/--directory/--virtual-root/--chroot sets _diskfs_chroot_directory. * init-startup.c (_diskfs_chroot_directory): New variable. (diskfs_startup_diskfs): If that's set, look up the name and warp us to that as a virtual root directory. * fsys-getroot.c (diskfs_S_fsys_getroot): Initialize new peropen's shadow_root_parent to null, and shadow_root to either null or, if _diskfs_chroot_directory is set, to diskfs_root_node. --- libdiskfs/priv.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libdiskfs/priv.h') diff --git a/libdiskfs/priv.h b/libdiskfs/priv.h index c03d93dc..5a90c2b8 100644 --- a/libdiskfs/priv.h +++ b/libdiskfs/priv.h @@ -1,5 +1,5 @@ /* Private declarations for fileserver library - Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation + Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -30,6 +30,9 @@ /* These inhibit setuid or exec. */ extern int _diskfs_nosuid, _diskfs_noexec; +/* This is the -C argument value. */ +extern const char *_diskfs_chroot_directory; + volatile struct mapped_time_value *_diskfs_mtime; extern struct argp_option diskfs_common_options[]; -- cgit v1.2.3