From ebec7389d6965d2ac1d940cf59f03fa5c3c3ca6e Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Tue, 16 Sep 1997 19:18:27 +0000 Subject: Tue Sep 16 14:37:51 1997 Thomas Bushnell, n/BSG * priv.h (nosuid, noexec): New variables. * init-init.c (nosuid, noexec): New variables, initialized to zero. * file-exec.c (diskfs_S_file_exec): If noexec is on, then prohibit all execution with EACCES. If nosuid is on, then prohibit setuid or setgid execution by silently omitting the uid substitution. * opts-std-startup.c (parse_startup_opt): Implement --no-suid and --no-exec. * opts-common.c (diskfs_common_options): Add --no-suid and --no-exec. * opts-std-runtime.c (struct parse_hook): Add nosuid and noexec. (parse_opt) [cases 'S', 'E', OPT_SUID_OK, OPT_EXEC_OK] Understand --no-suid, --no-exec, --suid-ok, and --exec-ok. (parse_opt) [case ARGP_KEY_INIT]: Initialize H->nosuid and H->noexec. (OPT_SUID_OK, OPT_EXEC_OK): New macros. (std_runtime_options): Add --suid-ok and --exec-ok. (set_opts): Set nosuid and noexec from H->nosuid and H->noexec. * opts-common.c (diskfs_common_options): Rename --nosync to --no-sync; leave --nosync as an alias. --- libdiskfs/init-init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libdiskfs/init-init.c') diff --git a/libdiskfs/init-init.c b/libdiskfs/init-init.c index 14c6f84d..b575b625 100644 --- a/libdiskfs/init-init.c +++ b/libdiskfs/init-init.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994, 1995, 1996 Free Software Foundation + Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation This file is part of the GNU Hurd. @@ -30,6 +30,8 @@ mach_port_t diskfs_auth_server_port; volatile struct mapped_time_value *diskfs_mtime; mach_port_t diskfs_fsys_identity; +int nosuid = 0, noexec = 0; + spin_lock_t diskfs_node_refcnt_lock = SPIN_LOCK_INITIALIZER; spin_lock_t _diskfs_control_lock = SPIN_LOCK_INITIALIZER; -- cgit v1.2.3