summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xremote/modules/pam/data/opt/openslx/scripts/pam_script_ses_open3
1 files changed, 3 insertions, 0 deletions
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 6f0e0f9b..be890e06 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
@@ -7,6 +7,9 @@ echo "[${PAM_TYPE}] Opening session for ${PAM_USER}"
PERSISTENT_MOUNT_SCRIPT="/opt/openslx/scripts/pam_script_mount_persistent"
TEMP_HOME_DIR="/home/${PAM_USER}"
+# check if PAM_USER is root and skip if it is the case
+[ "x${PAM_USER}" == "xroot" ] && exit 0
+
# check if we already mounted the home directory
if [ ! -z "$(mount|grep ${TEMP_HOME_DIR})" ]; then
echo "[${PAM_TYPE}] Home directory of '${PAM_USER}' is already mounted."