summaryrefslogtreecommitdiffstats
path: root/remote/includes
diff options
context:
space:
mode:
authorroot2014-07-17 15:11:20 +0200
committerroot2014-07-17 15:11:20 +0200
commit9c547a5e5b50813f9441a96f3f8a7bd62d90f0e9 (patch)
tree06abde51e32806f2bd157a1d2d07d0d15820326b /remote/includes
parent[idleaction] Restart cron daemon after creating new crontab (diff)
downloadtm-scripts-9c547a5e5b50813f9441a96f3f8a7bd62d90f0e9.tar.gz
tm-scripts-9c547a5e5b50813f9441a96f3f8a7bd62d90f0e9.tar.xz
tm-scripts-9c547a5e5b50813f9441a96f3f8a7bd62d90f0e9.zip
[pam] reworked how we determine path to PAM-modules
detect the path in remote/helper/paths.inc and use that global path in the build scripts
Diffstat (limited to 'remote/includes')
-rw-r--r--remote/includes/paths.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/remote/includes/paths.inc b/remote/includes/paths.inc
new file mode 100644
index 00000000..ca9c305b
--- /dev/null
+++ b/remote/includes/paths.inc
@@ -0,0 +1,10 @@
+#
+# TODO
+#
+
+for CANDIDATE in $(strings "$(ldd "$(which login)" | grep libpam.so | head -n 1 | awk '{print $3}')" | grep /lib); do
+ [ -f "$CANDIDATE/pam_unix.so" ] && declare -rg SYS_PAM_MODULES_PATH="$CANDIDATE" && break
+done
+
+[ -z "$SYS_PAM_MODULES_PATH" ] && perror "Failed to find pam_unix.so on this system."
+pinfo "PAM Modules are located in '$SYS_PAM_MODULES_PATH'."