Skip to content
Snippets Groups Projects
Commit 24f1e0af authored by Zbigniew Jędrzejewski-Szmek's avatar Zbigniew Jędrzejewski-Szmek Committed by Jan Rybar
Browse files

Add sysusers file

parent 4a441db9
No related branches found
No related tags found
1 merge request!12Update to 124
service_conf = {'libprivdir': pk_prefix / pk_libprivdir, 'polkitd_user': polkitd_user}
service_conf = {
'libprivdir': pk_prefix / pk_libprivdir,
'polkitd_user': polkitd_user,
'polkitd_uid': polkitd_uid,
}
configure_file(
input: 'org.freedesktop.PolicyKit1.service.in',
......@@ -34,6 +38,14 @@ if session_tracking == 'libsystemd-login'
install: true,
install_dir: systemd_systemdsystemunitdir,
)
configure_file(
input: 'polkit.conf.in',
output: '@BASENAME@',
configuration: service_conf,
install: true,
install_dir: systemd_sysusers_dir,
)
endif
install_data(
......
u @polkitd_user@ @polkitd_uid@ "User for polkitd"
......@@ -10,7 +10,6 @@ DeviceAllow=/dev/null rw
DevicePolicy=strict
ExecStart=@libprivdir@/polkitd --no-debug
User=@polkitd_user@
Group=@polkitd_user@
LimitMEMLOCK=0
LockPersonality=yes
MemoryDenyWriteExecute=yes
......
......@@ -218,6 +218,8 @@ if enable_logind
# FIXME: systemd.pc file does not use variables with relative paths, so `define_variable` cannot be used
systemd_systemdsystemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
endif
systemd_sysusers_dir = systemd_dep.get_pkgconfig_variable('sysusers_dir', default: '/usr/lib/sysusers.d')
endif
config_h.set('HAVE_LIBSYSTEMD', enable_logind)
......@@ -227,6 +229,9 @@ config_h.set('HAVE_PIDFD_OPEN', cc.get_define('SYS_pidfd_open', prefix: '#includ
polkitd_user = get_option('polkitd_user')
config_h.set_quoted('POLKITD_USER', polkitd_user)
polkitd_uid = get_option('polkitd_uid')
config_h.set('POLKITD_UID', polkitd_uid)
# Select which authentication framework to use
auth_deps = []
......@@ -403,6 +408,9 @@ if enable_logind
output += ' systemdsystemunitdir: ' + systemd_systemdsystemunitdir + '\n'
endif
output += ' polkitd user: ' + polkitd_user + ' \n'
if polkitd_uid != '-'
output += ' polkitd UID: ' + polkitd_uid + ' \n'
endif
output += ' Javascript engine: ' + js_engine + '\n'
output += ' PAM support: ' + enable_pam.to_string() + '\n\n'
if libs_only
......
......@@ -3,6 +3,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('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', ''], value: '', description: 'distribution or OS')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment