diff options
-rw-r--r-- | libdiskfs/ChangeLog | 2 | ||||
-rw-r--r-- | libdiskfs/opts-append-std.c | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index ce951baf..0132bd3a 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,5 +1,7 @@ Tue Sep 16 14:37:51 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> + * opts-append-std.c (diskfs_append_std_options): Add --no-suid and + --no-exec when appropriate. * 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 diff --git a/libdiskfs/opts-append-std.c b/libdiskfs/opts-append-std.c index d3da031d..22762722 100644 --- a/libdiskfs/opts-append-std.c +++ b/libdiskfs/opts-append-std.c @@ -1,6 +1,6 @@ /* Get standard diskfs run-time options - 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> @@ -31,6 +31,16 @@ diskfs_append_std_options (char **argz, unsigned *argz_len) error_t err; extern int diskfs_sync_interval; + if (nosuid) + err = argz_add (argz, argz_len, "--no-suid"); + if (err) + return err; + + if (noexec) + err = argz_add (argz, argz_len, "--no-exec"); + if (err) + return err; + if (diskfs_readonly) err = argz_add (argz, argz_len, "--readonly"); else |