summaryrefslogtreecommitdiffstats
path: root/core/modules/sssd
diff options
context:
space:
mode:
authorSebastian2016-04-25 12:01:08 +0200
committerSebastian2016-04-25 12:01:08 +0200
commit5acda3eaeabae9045609539303a8c12c4ce401f1 (patch)
tree7e71975f8570b05aafe2ea6ec0e242a8912387bb /core/modules/sssd
parentinitial commit (diff)
downloadmltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.gz
mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.xz
mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.zip
merge with latest dev version
Diffstat (limited to 'core/modules/sssd')
-rw-r--r--core/modules/sssd/module.build33
-rw-r--r--core/modules/sssd/module.conf18
-rw-r--r--core/modules/sssd/module.conf.opensuse.13.223
-rw-r--r--core/modules/sssd/module.conf.ubuntu14
-rw-r--r--core/modules/sssd/templates/sssd-systemd.service16
5 files changed, 104 insertions, 0 deletions
diff --git a/core/modules/sssd/module.build b/core/modules/sssd/module.build
new file mode 100644
index 00000000..041fd5bd
--- /dev/null
+++ b/core/modules/sssd/module.build
@@ -0,0 +1,33 @@
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+
+ local SSSD_PATH="$(which sssd)"
+ [ -z "$SSSD_PATH" ] && perror "'sssd' not found on this system. Should have been installed! Something is wrong..."
+
+ # Build nslcd service file
+ mkdir -p "${MODULE_BUILD_DIR}/etc/systemd/system"
+ sed "s,%PATH%,${SSSD_PATH},g" "${MODULE_DIR}/templates/sssd-systemd.service" > "${MODULE_BUILD_DIR}/etc/systemd/system/sssd.service" || perror "Could not fill sssd.service template"
+
+ # openSuse sssd does not start when /etc/sssd/sssd.conf is not root:root 600!
+ if [ "$SYS_DISTRIBUTION" == "opensuse" -a "$SYS_VERSION" == "13.2" ]; then
+ sed -i 's#ExecStart#ExecStartPre=/opt/openslx/bin/chmod 600 /etc/sssd/sssd.conf\nExecStart#g' \
+ "${MODULE_BUILD_DIR}/etc/systemd/system/sssd.service"
+ fi
+
+ return 0
+}
+
+post_copy() {
+ mkdir -p "${TARGET_BUILD_DIR}/var/log/sssd"
+ for DIR in mc pubconf/krb5.include.d db pipes/private; do
+ mkdir -p "${TARGET_BUILD_DIR}/var/lib/sss/$DIR"
+ done
+}
diff --git a/core/modules/sssd/module.conf b/core/modules/sssd/module.conf
new file mode 100644
index 00000000..6e4df94e
--- /dev/null
+++ b/core/modules/sssd/module.conf
@@ -0,0 +1,18 @@
+REQUIRED_BINARIES="
+ sssd
+"
+REQUIRED_FILES="
+ /etc/default/sssd
+ /etc/systemd/system/sssd.service
+"
+# lib/ is needed to fetch lib/x86..../security/pam_sss.so module
+# could do it using the SYS_PAM_MODULE_PATH, but using that in the
+# module.conf seems hacky...
+#
+# usr/lib is needed to get the ldb modules, e.g.:
+# usr/lib/x86_64-linux-gnu/ldb/modules/ldb/ldap.so
+#
+REQUIRED_DIRECTORIES="
+ /lib
+ /usr/lib
+"
diff --git a/core/modules/sssd/module.conf.opensuse.13.2 b/core/modules/sssd/module.conf.opensuse.13.2
new file mode 100644
index 00000000..6fafc652
--- /dev/null
+++ b/core/modules/sssd/module.conf.opensuse.13.2
@@ -0,0 +1,23 @@
+REQUIRED_FILES="
+ /etc/sssd
+ /etc/systemd/system/sssd.service
+"
+
+REQUIRED_DIRECTORIES="
+ /$LIB64
+ /usr/lib
+ /usr/lib64
+"
+
+REQUIRED_INSTALLED_PACKAGES="
+ sssd
+ sssd-ldap
+ libldb1
+ libsss_nss_idmap0
+"
+REQUIRED_CONTENT_PACKAGES="
+ sssd
+ sssd-ldap
+ libldb1
+ libsss_nss_idmap0
+"
diff --git a/core/modules/sssd/module.conf.ubuntu b/core/modules/sssd/module.conf.ubuntu
new file mode 100644
index 00000000..5a8e4fa4
--- /dev/null
+++ b/core/modules/sssd/module.conf.ubuntu
@@ -0,0 +1,14 @@
+REQUIRED_INSTALLED_PACKAGES="
+ sssd-common
+ sssd-ldap
+ libldb1
+ libnss-sss
+ libpam-sss
+"
+REQUIRED_CONTENT_PACKAGES="
+ sssd-common
+ sssd-ldap
+ libldb1
+ libnss-sss
+ libpam-sss
+"
diff --git a/core/modules/sssd/templates/sssd-systemd.service b/core/modules/sssd/templates/sssd-systemd.service
new file mode 100644
index 00000000..9132d64a
--- /dev/null
+++ b/core/modules/sssd/templates/sssd-systemd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=System Security Services Daemon
+# SSSD will not be started until syslog is
+After=syslog.target
+
+[Service]
+EnvironmentFile=-/etc/sysconfig/sssd
+ExecStart=%PATH% -D -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
+
+[Install]
+WantedBy=multi-user.target