From d74586f4e6d0688dfce0b662df60ee443c1cb91e Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Wed, 1 May 2002 03:00:44 +0000 Subject: 2002-04-30 Marcus Brinkmann * 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. --- libdiskfs/priv.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libdiskfs/priv.h') diff --git a/libdiskfs/priv.h b/libdiskfs/priv.h index d5ef60c5..a0ff9bbb 100644 --- a/libdiskfs/priv.h +++ b/libdiskfs/priv.h @@ -35,6 +35,11 @@ extern int _diskfs_nosuid, _diskfs_noexec; /* This relaxes the requirement to set `st_atime'. */ extern int _diskfs_noatime; +/* This enables SysV style group behaviour. New nodes inherit the GID + of the user creating them unless the SGID bit is set of the parent + directory. */ +extern int _diskfs_no_inherit_dir_group; + /* This is the -C argument value. */ extern char *_diskfs_chroot_directory; @@ -51,6 +56,8 @@ extern const struct argp_option diskfs_common_options[]; #define OPT_SUID_OK 600 /* --suid-ok */ #define OPT_EXEC_OK 601 /* --exec-ok */ #define OPT_ATIME 602 /* --atime */ +#define OPT_NO_INHERIT_DIR_GROUP 603 /* --no-inherit-dir-group */ +#define OPT_INHERIT_DIR_GROUP 604 /* --inherit-dir-group */ /* Common value for diskfs_common_options and diskfs_default_sync_interval. */ #define DEFAULT_SYNC_INTERVAL 5 -- cgit v1.2.3