diff options
-rw-r--r-- | meson.build | 9 | ||||
-rw-r--r-- | meson_options.txt | 2 | ||||
-rw-r--r-- | sysusers.d/basic.conf.in | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 6eff25f45c..e0e8178910 100644 --- a/meson.build +++ b/meson.build @@ -633,6 +633,14 @@ tty_gid = get_option('tty-gid') conf.set('TTY_GID', tty_gid) substs.set('TTY_GID', tty_gid) +# Ensure provided GID argument is numeric, otherwise fallback to default assignment +if get_option('users-gid') != '' + users_gid = get_option('users-gid').to_int() +else + users_gid = '-' +endif +substs.set('USERS_GID', users_gid) + if get_option('adm-group') m4_defines += ['-DENABLE_ADM_GROUP'] endif @@ -2495,6 +2503,7 @@ status = [ 'debug shell: @0@ @ @1@'.format(get_option('debug-shell'), get_option('debug-tty')), 'TTY GID: @0@'.format(tty_gid), + 'users GID: @0@'.format(users_gid), 'maximum system UID: @0@'.format(system_uid_max), 'maximum system GID: @0@'.format(system_gid_max), '/dev/kvm access mode: @0@'.format(get_option('dev-kvm-mode')), diff --git a/meson_options.txt b/meson_options.txt index 498a32ab11..8c03b0c6de 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -150,6 +150,8 @@ option('system-gid-max', type : 'string', option('tty-gid', type : 'string', description : 'the numeric GID of the "tty" group', value : '5') +option('users-gid', type : 'string', + description : 'the numeric GID of the "users" group') option('adm-group', type : 'boolean', description : 'the ACL for adm group should be added') option('wheel-group', type : 'boolean', diff --git a/sysusers.d/basic.conf.in b/sysusers.d/basic.conf.in index edaa3d91b0..78b764bdef 100644 --- a/sysusers.d/basic.conf.in +++ b/sysusers.d/basic.conf.in @@ -35,4 +35,4 @@ g tape - - - g video - - - # Default group for normal users -g users - - - +g users @USERS_GID@ - - |