From 8f7ace290cf43cc55431b44ea620383b1686ad28 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 24 Nov 2017 15:48:06 +0100 Subject: [sssd] Add all local users to filter list --- .../sssd/data/opt/openslx/scripts/systemd-patch_sssd_conf | 10 ++++++++++ core/modules/sssd/templates/sssd-systemd.service | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 core/modules/sssd/data/opt/openslx/scripts/systemd-patch_sssd_conf (limited to 'core') diff --git a/core/modules/sssd/data/opt/openslx/scripts/systemd-patch_sssd_conf b/core/modules/sssd/data/opt/openslx/scripts/systemd-patch_sssd_conf new file mode 100755 index 00000000..dfdfb6de --- /dev/null +++ b/core/modules/sssd/data/opt/openslx/scripts/systemd-patch_sssd_conf @@ -0,0 +1,10 @@ +#!/bin/ash + +LIST="$(< /etc/passwd awk -F: '{printf $1 ","}')" +sed -i "s/^filter_users.*\$/filter_users = ${LIST%,}/g" /etc/sssd/sssd.conf + +LIST="$(< /etc/group awk -F: '{printf $1 ","}')" +sed -i "s/^filter_groups.*\$/filter_groups = ${LIST%,}/g" /etc/sssd/sssd.conf + +exit 0 + diff --git a/core/modules/sssd/templates/sssd-systemd.service b/core/modules/sssd/templates/sssd-systemd.service index 9132d64a..c691759a 100644 --- a/core/modules/sssd/templates/sssd-systemd.service +++ b/core/modules/sssd/templates/sssd-systemd.service @@ -5,10 +5,10 @@ After=syslog.target [Service] EnvironmentFile=-/etc/sysconfig/sssd -ExecStart=%PATH% -D -f +ExecStartPre=/opt/openslx/scripts/systemd-patch_sssd_conf +ExecStart=%PATH% -i -f # These two should be used with traditional UNIX forking daemons # consult systemd.service(5) for more details -Type=forking PIDFile=/var/run/sssd.pid Restart=on-failure -- cgit v1.2.3-55-g7522