summaryrefslogtreecommitdiffstats
path: root/server/modules
diff options
context:
space:
mode:
authorJonathan Bauer2013-10-08 13:49:47 +0200
committerJonathan Bauer2013-10-08 13:49:47 +0200
commit526cc38064dbf16a1e56c611871606f9c4c56d5d (patch)
tree17878382af33e231d3d790931f8554df0d97a0aa /server/modules
parent[pam-offenburg] remove test file (diff)
downloadtm-scripts-526cc38064dbf16a1e56c611871606f9c4c56d5d.tar.gz
tm-scripts-526cc38064dbf16a1e56c611871606f9c4c56d5d.tar.xz
tm-scripts-526cc38064dbf16a1e56c611871606f9c4c56d5d.zip
[pam-freiburg] Sanity checks for home directory mounting. Abort if either FILESERVER or VOLUME is empty after asking the LDAP-Server
Diffstat (limited to 'server/modules')
-rwxr-xr-xserver/modules/pam-freiburg/opt/openslx/scripts/pam_script_ses_open3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_ses_open b/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_ses_open
index 205090b6..abb353d8 100755
--- a/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_ses_open
+++ b/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_ses_open
@@ -22,6 +22,9 @@ if [ $(id -g $PAM_USER) -ge 1000 ]; then
FILESERVER=$(cat /tmp/ldapsearch.$PAM_USER | grep rufFileserver | cut -d" " -f2)
VOLUME=$(cat /tmp/ldapsearch.$PAM_USER | grep homeDirectory | cut -d" " -f2)
+ [ -z "$FILESERVER" ] && [ ! -z "$SLX_DEBUG" ] && echo "[$PAM_TYPE] Could not determine fileserver for home directories. Aborting mount for $PAM_USER." && exit 1
+ [ -z "$VOLUME" ] && [ ! -z "$SLX_DEBUG" ] && echo "[$PAM_TYPE] Could not determine volume to mount. Aborting mount for $PAM_USER." && exit 1
+
# now we can mount the home directory!
mkdir -p /home/$PAM_USER
if mount -t nfs4 -o rw,nosuid,nodev,nolock,intr,hard,sloppy,sec=krb5p "$FILESERVER":"$VOLUME" /home/"$PAM_USER"; then