diff --git a/meson.build b/meson.build index 09812dd..cf494c2 100644 --- a/meson.build +++ b/meson.build @@ -314,6 +314,16 @@ if os_type == '' endif endif +# The default privileged group differs between distributions, set it accordingly if not specified +privileged_group = get_option('privileged_group') +if privileged_group == '' + if os_type == 'debian' + privileged_group = 'sudo' + else + privileged_group = 'wheel' + endif +endif + pam_include = get_option('pam_include') if pam_include == '' if ['suse', 'solaris', 'openembedded'].contains(os_type) diff --git a/meson_options.txt b/meson_options.txt index e175dec..31b7a2b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,7 +4,7 @@ option('systemdsystemunitdir', type: 'string', value: '', description: 'custom d option('libs-only', type: 'boolean', value: false, description: 'Only build libraries (skips building polkitd)') option('polkitd_user', type: 'string', value: 'polkitd', description: 'User for running polkitd (polkitd)') option('polkitd_uid', type: 'string', value: '-', description: 'Fixed UID for user running polkitd (polkitd)') -option('privileged_group', type: 'string', value: 'wheel', description: 'Group to use for default privileged access') +option('privileged_group', type: 'string', value: '', description: 'Group to use for default privileged access (default: wheel)') option('authfw', type: 'combo', choices: ['pam', 'shadow', 'bsdauth'], value: 'pam', description: 'Authentication framework (pam/shadow)') option('os_type', type: 'combo', choices: ['redhat', 'suse', 'gentoo', 'pardus', 'solaris', 'netbsd', 'lfs', 'openembedded', 'debian', ''], value: '', description: 'distribution or OS') diff --git a/src/polkitbackend/meson.build b/src/polkitbackend/meson.build index 3a0efcc..fc35e19 100644 --- a/src/polkitbackend/meson.build +++ b/src/polkitbackend/meson.build @@ -56,7 +56,7 @@ configure_file( input: '50-default.rules.in', output: '@BASENAME@', configuration: { - 'PRIVILEGED_GROUP': get_option('privileged_group'), + 'PRIVILEGED_GROUP': privileged_group, }, install: true, install_dir: pk_pkgdatadir / 'rules.d',