summaryrefslogtreecommitdiffstats
path: root/remote/modules
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules')
-rw-r--r--remote/modules/sssd/module.build29
-rw-r--r--remote/modules/sssd/module.conf18
-rw-r--r--remote/modules/sssd/module.conf.ubuntu14
-rw-r--r--remote/modules/sssd/templates/sssd-systemd.service15
4 files changed, 76 insertions, 0 deletions
diff --git a/remote/modules/sssd/module.build b/remote/modules/sssd/module.build
new file mode 100644
index 00000000..dcf18176
--- /dev/null
+++ b/remote/modules/sssd/module.build
@@ -0,0 +1,29 @@
+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"
+
+ pinfo "PAM: $SYS_PAM_MODULES_PATH"
+
+ 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/remote/modules/sssd/module.conf b/remote/modules/sssd/module.conf
new file mode 100644
index 00000000..6e4df94e
--- /dev/null
+++ b/remote/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/remote/modules/sssd/module.conf.ubuntu b/remote/modules/sssd/module.conf.ubuntu
new file mode 100644
index 00000000..5a8e4fa4
--- /dev/null
+++ b/remote/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/remote/modules/sssd/templates/sssd-systemd.service b/remote/modules/sssd/templates/sssd-systemd.service
new file mode 100644
index 00000000..8cfd1a2e
--- /dev/null
+++ b/remote/modules/sssd/templates/sssd-systemd.service
@@ -0,0 +1,15 @@
+[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
+
+[Install]
+WantedBy=multi-user.target