Add with-pam-group meson option

This adds 10-gamemode.conf as a limits.d configuration file and with-pam-group meson option to allow renicing as an unpriviledged user being part of the specified group.

Signed-off-by: Térence Clastres <t.clastres@gmail.com>
Signed-off-by: Kai Krakow <kai@kaishome.de>
This commit is contained in:
Térence Clastres
2018-10-04 19:41:10 +02:00
parent a7c838d2fe
commit 06ec97f968
4 changed files with 19 additions and 2 deletions

View File

@@ -55,6 +55,19 @@ if with_systemd == true
endif
endif
with_limits_conf = get_option('with-pam-group')
if with_limits_conf != ''
ldata = configuration_data()
ldata.set('LIMITSGROUP', with_limits_conf)
# Install the limits.d configuration file
configure_file(
input: 'data/10-gamemode.conf.in',
output: '10-gamemode.conf',
configuration: ldata,
install_dir: '/etc/security/limits.d',
)
endif
# Set the dbus path as appropriate.
path_dbus_service_dir = get_option('with-dbus-service-dir')
if path_dbus_service_dir == ''