summaryrefslogtreecommitdiffstats
path: root/remote/modules/pam
diff options
context:
space:
mode:
authorSimon Rettberg2015-05-15 17:36:29 +0200
committerSimon Rettberg2015-05-15 17:36:29 +0200
commit9fff0a99fa0031c5b70a43b5eea93681ca0f70be (patch)
treec9ec0dcd587b003d3be63905245e68f102397465 /remote/modules/pam
parentCompatibility improvements with ldadp and windows servers in mount scripts (diff)
parent[vbox] CAUTION: COMPATIBILITY BREAK to V3! virtualbox runs now, needs further (diff)
downloadtm-scripts-9fff0a99fa0031c5b70a43b5eea93681ca0f70be.tar.gz
tm-scripts-9fff0a99fa0031c5b70a43b5eea93681ca0f70be.tar.xz
tm-scripts-9fff0a99fa0031c5b70a43b5eea93681ca0f70be.zip
Merge branch 'master' of dnbd3:openslx-ng/tm-scripts
Diffstat (limited to 'remote/modules/pam')
-rwxr-xr-xremote/modules/pam/data/opt/openslx/scripts/pam_script_auth2
-rwxr-xr-xremote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close4
2 files changed, 3 insertions, 3 deletions
diff --git a/remote/modules/pam/data/opt/openslx/scripts/pam_script_auth b/remote/modules/pam/data/opt/openslx/scripts/pam_script_auth
index 3474741d..623658d0 100755
--- a/remote/modules/pam/data/opt/openslx/scripts/pam_script_auth
+++ b/remote/modules/pam/data/opt/openslx/scripts/pam_script_auth
@@ -121,7 +121,7 @@ chown "${USER_UID}:${USER_GID}" "${COMMON_SHARE_MOUNT_POINT}" || \
[ ! -e "${COMMON_SHARE_MOUNT_SCRIPT}" ] && exit 0
# we do!
-COMMON_SHARE_MOUNT_POINT="${COMMON_SHARE_MOUNT_POINT}" PAM_USER="${PAM_USER}" PAM_AUTHTOK="${PAM_AUTHTOK}" USER_UID="${USER_UID}" USER_GID="${USER_GID}" /bin/bash "${COMMON_SHARE_MOUNT_SCRIPT}" || \
+COMMON_SHARE_MOUNT_POINT="${COMMON_SHARE_MOUNT_POINT}" PAM_USER="${PAM_USER}" PAM_AUTHTOK="${PAM_AUTHTOK}" USER_UID="${USER_UID}" USER_GID="${USER_GID}" /bin/ash "${COMMON_SHARE_MOUNT_SCRIPT}" || \
{ slxlog "pam-global-sourceshare" "Could not source '${COMMON_SHARE_MOUNT_SCRIPT}'."; exit 1; }
# Just try to delete the common share dir. If the mount was successful, it will not work
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 4fc2ce6a..9332e0a6 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
@@ -26,7 +26,7 @@ if [ -d "/opt/openslx/scripts/pam_script_ses_close.d" ]; then
done
fi
-OPENSESSION=$(loginctl show-user "$PAM_USER" | grep "Sessions=" | cut -c 10-)
+OPENSESSION=$(loginctl show-user "$PAM_USER" 2>/dev/null| grep "Sessions=" | cut -c 10-)
SESSIONCOUNT=$(echo "$OPENSESSION" | wc -w)
# When using su/sudo there is no session created, so count up by one
if [ "x$PAM_SERVICE" = "xsu" -o "x$PAM_SERVICE" = "xsudo" ]; then
@@ -55,7 +55,7 @@ if [ "$SESSIONCOUNT" -le "1" ]; then
done
# just to be sure we check if there's no other open session in the meantime
- OPEN2=$(loginctl show-user "$PAM_USER" | grep "Sessions=" | cut -c 10-)
+ OPEN2=$(loginctl show-user "$PAM_USER" 2>/dev/null | grep "Sessions=" | cut -c 10-)
if [ -z "$OPEN2" -o "x$OPENSESSION" = "x$OPEN2" ]; then