diff options
author | Thomas Bushnell <thomas@gnu.org> | 1997-09-16 19:18:27 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1997-09-16 19:18:27 +0000 |
commit | ebec7389d6965d2ac1d940cf59f03fa5c3c3ca6e (patch) | |
tree | 878e74b3c9f0cff6000ac65332ae7ecfdf5fe031 /libdiskfs/opts-std-startup.c | |
parent | 2e3dfbb0f86717b4111e81e3f2f0422926d5a29f (diff) |
Tue Sep 16 14:37:51 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* 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.
Diffstat (limited to 'libdiskfs/opts-std-startup.c')
-rw-r--r-- | libdiskfs/opts-std-startup.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libdiskfs/opts-std-startup.c b/libdiskfs/opts-std-startup.c index 1488fdb5..1516b84e 100644 --- a/libdiskfs/opts-std-startup.c +++ b/libdiskfs/opts-std-startup.c @@ -1,6 +1,6 @@ /* Standard startup-time command line parser - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -59,6 +59,10 @@ parse_startup_opt (int opt, char *arg, struct argp_state *state) diskfs_readonly = 1; break; case 'w': diskfs_readonly = 0; break; + case 'S': + nosuid = 1; break; + case 'E': + noexec = 1; break; case 's': if (arg == NULL) diskfs_synchronous = 1; @@ -70,6 +74,7 @@ parse_startup_opt (int opt, char *arg, struct argp_state *state) diskfs_default_sync_interval = 0; break; + /* Boot options */ case OPT_DEVICE_MASTER_PORT: _hurd_device_master = atoi (arg); break; |