summaryrefslogtreecommitdiffstats
path: root/remote/modules
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules')
-rwxr-xr-xremote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close8
-rwxr-xr-xremote/modules/pam/data/opt/openslx/scripts/pam_script_ses_open8
2 files changed, 16 insertions, 0 deletions
diff --git a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close
index 6b8cb3b2..c80b50bb 100755
--- a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close
+++ b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close
@@ -75,5 +75,13 @@ if [ "$SESSIONCOUNT" -le "1" ]; then
fi
+# source the stuff in pam_script_ses_close.d, if it exists
+if [ -d "/opt/openslx/scripts/pam_script_ses_close.d" ]; then
+ for HOOK in $(ls "/opt/openslx/scripts/pam_script_ses_close.d"); do
+ # source it, in case of failure do nothing since these scripts are non-critical
+ . "/opt/openslx/scripts/pam_script_ses_close.d/$HOOK" || slxlog "pam-source-hooks" "Could not source '$HOOK'."
+ done
+fi
+
exit 0
diff --git a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_open b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_open
index c64a2ed7..8ab34708 100755
--- a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_open
+++ b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_open
@@ -13,5 +13,13 @@ if [ "x$PAM_SERVICE" != "xsu" -a "x$PAM_SERVICE" != "xsudo" ]; then
fi
fi
+# source the stuff in pam_script_ses_open.d, if it exists
+if [ -d "/opt/openslx/scripts/pam_script_ses_open.d" ]; then
+ for HOOK in $(ls "/opt/openslx/scripts/pam_script_ses_open.d"); do
+ # source it, in case of failure do nothing since these scripts are non-critical
+ . "/opt/openslx/scripts/pam_script_ses_open.d/$HOOK" || slxlog "pam-source-hooks" "Could not source '$HOOK'."
+ done
+fi
+
exit 0