diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2002-05-01 03:00:44 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2002-05-01 03:00:44 +0000 |
commit | d74586f4e6d0688dfce0b662df60ee443c1cb91e (patch) | |
tree | 2d5592e60674b2ad89f9deb8b6ecd46068f3aa77 /libdiskfs/opts-std-runtime.c | |
parent | f8417e16aac161415a64bfd4593253ccedab94ef (diff) |
2002-04-30 Marcus Brinkmann <marcus@gnu.org>
* priv.h: Add OPT_NO_INHERIT_DIR_GROUP and OPT_INHERIT_DIR_GROUP.
(_diskfs_no_inherit_dir_group): New declaration.
* node-create.c (_diskfs_no_inherit_dir_group): New variable.
(diskfs_create_node): Implement SysV group behaviour.
* opts-common.c (diskfs_common_options): Add
--no-inherit-dir-group (--nogrpdir, --sysvgroups) and
--inherit-dir-group (--grpdir, --bsdgroups).
* opts-append-std.c (diskfs_append_std_options): Add
--no-inherit-dir-group if set.
* opts-std-startup.c (parse_startup_opt): Add toggle for
_diskfs_no_inherit_dir_group.
* opts-std-runtime.c (struct parse_hook): Add noinheritdirgroup.
(set_opts): Handle H->noinheritdirgroup.
(parse_opt): Initialize H->noinheritdirgroup. Handle
OPT_NO_INHERIT_DIR_GROUP and OPT_INHERIT_DIR_GROUP.
Diffstat (limited to 'libdiskfs/opts-std-runtime.c')
-rw-r--r-- | libdiskfs/opts-std-runtime.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libdiskfs/opts-std-runtime.c b/libdiskfs/opts-std-runtime.c index c619835f..177dfaf6 100644 --- a/libdiskfs/opts-std-runtime.c +++ b/libdiskfs/opts-std-runtime.c @@ -32,7 +32,8 @@ std_runtime_options[] = struct parse_hook { - int readonly, sync, sync_interval, remount, nosuid, noexec, noatime; + int readonly, sync, sync_interval, remount, nosuid, noexec, noatime, + noinheritdirgroup; }; /* Implement the options in H, and free H. */ @@ -79,6 +80,8 @@ set_opts (struct parse_hook *h) _diskfs_noexec = h->noexec; if (h->noatime != -1) _diskfs_noatime = h->noatime; + if (h->noinheritdirgroup != -1) + _diskfs_no_inherit_dir_group = h->noinheritdirgroup; free (h); @@ -101,6 +104,8 @@ parse_opt (int opt, char *arg, struct argp_state *state) case OPT_SUID_OK: h->nosuid = 0; break; case OPT_EXEC_OK: h->noexec = 0; break; case OPT_ATIME: h->noatime = 0; break; + case OPT_NO_INHERIT_DIR_GROUP: h->noinheritdirgroup = 1; break; + case OPT_INHERIT_DIR_GROUP: h->noinheritdirgroup = 0; break; case 'n': h->sync_interval = 0; h->sync = 0; break; case 's': if (arg) @@ -124,7 +129,7 @@ parse_opt (int opt, char *arg, struct argp_state *state) h->sync = diskfs_synchronous; h->sync_interval = -1; h->remount = 0; - h->nosuid = h->noexec = h->noatime = -1; + h->nosuid = h->noexec = h->noatime = h->noinheritdirgroup = -1; /* We know that we have one child, with which we share our hook. */ state->child_inputs[0] = h; |