summaryrefslogtreecommitdiffstats
path: root/core/modules/sssd
diff options
context:
space:
mode:
authorSimon Rettberg2017-11-24 15:48:06 +0100
committerSimon Rettberg2017-11-24 15:48:06 +0100
commit8f7ace290cf43cc55431b44ea620383b1686ad28 (patch)
tree0f599ca1e29cba771e679a6530c63e2bc1d1ea60 /core/modules/sssd
parent[vmware*/run-virt] Implement NIC bridging (diff)
downloadmltk-8f7ace290cf43cc55431b44ea620383b1686ad28.tar.gz
mltk-8f7ace290cf43cc55431b44ea620383b1686ad28.tar.xz
mltk-8f7ace290cf43cc55431b44ea620383b1686ad28.zip
[sssd] Add all local users to filter list
Diffstat (limited to 'core/modules/sssd')
-rwxr-xr-xcore/modules/sssd/data/opt/openslx/scripts/systemd-patch_sssd_conf10
-rw-r--r--core/modules/sssd/templates/sssd-systemd.service4
2 files changed, 12 insertions, 2 deletions
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