aboutsummaryrefslogtreecommitdiff
path: root/libdiskfs/opts-common.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1997-09-16 19:18:27 +0000
committerThomas Bushnell <thomas@gnu.org>1997-09-16 19:18:27 +0000
commitebec7389d6965d2ac1d940cf59f03fa5c3c3ca6e (patch)
tree878e74b3c9f0cff6000ac65332ae7ecfdf5fe031 /libdiskfs/opts-common.c
parent2e3dfbb0f86717b4111e81e3f2f0422926d5a29f (diff)
downloadhurd-ebec7389d6965d2ac1d940cf59f03fa5c3c3ca6e.tar.gz
hurd-ebec7389d6965d2ac1d940cf59f03fa5c3c3ca6e.tar.bz2
hurd-ebec7389d6965d2ac1d940cf59f03fa5c3c3ca6e.zip
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-common.c')
-rw-r--r--libdiskfs/opts-common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libdiskfs/opts-common.c b/libdiskfs/opts-common.c
index 5d94f7b4..41bf1a8b 100644
--- a/libdiskfs/opts-common.c
+++ b/libdiskfs/opts-common.c
@@ -1,6 +1,6 @@
/* Options common to both startup and runtime
- 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>
@@ -32,6 +32,9 @@ const struct argp_option diskfs_common_options[] =
"If INTERVAL is supplied, sync all data not actually written to disk"
" every INTERVAL seconds, otherwise operate in synchronous mode (the"
" default is to sync every 30 seconds)"},
- {"nosync", 'n', 0, 0, "Don't automatically sync data to disk"},
+ {"no-sync", 'n', 0, 0, "Don't automatically sync data to disk"},
+ {"nosync", 0, 0, OPTION_ALIAS | OPTION_HIDDEN},
+ {"no-suid", 'S', 0, 0, "Don't permit set-uid or set-gid execution"},
+ {"no-exec", 'E', 0, 0, "Don't permit any execution of files on this filesystem"},
{0, 0}
};