Add option to specific PAM limits.d directory

This commit is contained in:
Kira Bruneau 2022-08-03 11:56:25 -04:00 committed by afayaz-feral
parent 337f1b8a8e
commit 55b799e3df
3 changed files with 10 additions and 1 deletions

View File

@ -41,7 +41,7 @@ if with_pam_renicing
input: 'pam_limits/10-gamemode.conf.in', input: 'pam_limits/10-gamemode.conf.in',
output: '10-gamemode.conf', output: '10-gamemode.conf',
configuration: data_conf, configuration: data_conf,
install_dir: '/etc/security/limits.d', install_dir: path_pam_limits_dir,
) )
endif endif

View File

@ -132,6 +132,9 @@ endif
if with_privileged_group != '' if with_privileged_group != ''
with_pam_renicing = get_option('with-pam-renicing') with_pam_renicing = get_option('with-pam-renicing')
if with_pam_renicing
path_pam_limits_dir = get_option('with-pam-limits-dir')
endif
else else
with_pam_renicing = false with_pam_renicing = false
endif endif
@ -209,6 +212,11 @@ report = [
' includedir: @0@'.format(path_includedir), ' includedir: @0@'.format(path_includedir),
] ]
if with_pam_renicing
report += [
' PAM limits.d directory: @0@'.format(path_pam_limits_dir),
]
endif
if sd_bus_provider == 'systemd' if sd_bus_provider == 'systemd'
if with_systemd_unit if with_systemd_unit
report += [ report += [

View File

@ -1,5 +1,6 @@
# limits.d # limits.d
option('with-pam-renicing', type: 'boolean', description: 'Install the limits.d configuration file to allow renicing as a user being part of the privileged gamemode group', value: 'true') option('with-pam-renicing', type: 'boolean', description: 'Install the limits.d configuration file to allow renicing as a user being part of the privileged gamemode group', value: 'true')
option('with-pam-limits-dir', type: 'string', description: 'Explicitly set the PAM limits.d directory', value: '/etc/security/limits.d')
# sd-bus provider # sd-bus provider
option('with-sd-bus-provider', type: 'combo', choices: ['systemd', 'elogind', 'no-daemon'], value: 'systemd') option('with-sd-bus-provider', type: 'combo', choices: ['systemd', 'elogind', 'no-daemon'], value: 'systemd')