summaryrefslogtreecommitdiffstats
path: root/core/modules/pam-slx-plug
diff options
context:
space:
mode:
authorSimon Rettberg2018-03-09 14:34:32 +0100
committerSimon Rettberg2018-03-09 14:34:32 +0100
commitf0f6940ead488bf3ca6f00aa153ecbbc29cc3c3b (patch)
tree6623a7cd6b64f6df9b1382d467b560c5463bc09c /core/modules/pam-slx-plug
parent[pam-slx-plug] Add missing homeDirectory to ldapsearch, fix mount.d path (diff)
downloadmltk-f0f6940ead488bf3ca6f00aa153ecbbc29cc3c3b.tar.gz
mltk-f0f6940ead488bf3ca6f00aa153ecbbc29cc3c3b.tar.xz
mltk-f0f6940ead488bf3ca6f00aa153ecbbc29cc3c3b.zip
[pam-slx-plug] fix variable naming issues/mismatch
Diffstat (limited to 'core/modules/pam-slx-plug')
-rw-r--r--core/modules/pam-slx-plug/data/opt/openslx/pam/common/homedir-passwd8
-rwxr-xr-xcore/modules/pam-slx-plug/data/opt/openslx/pam/exec_auth2
-rw-r--r--core/modules/pam-slx-plug/data/opt/openslx/pam/mount.d/99-fallback1
3 files changed, 7 insertions, 4 deletions
diff --git a/core/modules/pam-slx-plug/data/opt/openslx/pam/common/homedir-passwd b/core/modules/pam-slx-plug/data/opt/openslx/pam/common/homedir-passwd
index 20b7991d..006f1c81 100644
--- a/core/modules/pam-slx-plug/data/opt/openslx/pam/common/homedir-passwd
+++ b/core/modules/pam-slx-plug/data/opt/openslx/pam/common/homedir-passwd
@@ -19,9 +19,9 @@ fi
readonly USER_HOME
# Add/replace passwd entry if it doesn't exist yet
-PASSWD="${USER_NAME}:x:${USER_UID}:${USER_GID}:${USER_NAME}:${USER_HOME}:/bin/bash"
-readonly PASSWD
-if ! grep -Fxq -- "${PASSWD}" /etc/passwd; then
+LINE_PASS="${USER_NAME}:x:${USER_UID}:${USER_GID}:${USER_NAME}:${USER_HOME}:/bin/bash"
+readonly LINE_PASS
+if ! grep -Fxq -- "${LINE_PASS}" /etc/passwd; then
sed -i "/^${USER_NAME}:/d" /etc/passwd
- echo "${PASSWD}" >> /etc/passwd
+ echo "${LINE_PASS}" >> /etc/passwd
fi
diff --git a/core/modules/pam-slx-plug/data/opt/openslx/pam/exec_auth b/core/modules/pam-slx-plug/data/opt/openslx/pam/exec_auth
index 00fa856e..dbc6cb5d 100755
--- a/core/modules/pam-slx-plug/data/opt/openslx/pam/exec_auth
+++ b/core/modules/pam-slx-plug/data/opt/openslx/pam/exec_auth
@@ -196,6 +196,8 @@ chown "${USER_UID}" "${TEMP_HOME_DIR}/WARNING.txt"
#
# execute the stuff in pam_script_auth.d, if it exists
#
+PAM_AUTHTOK="${USER_PASSWORD}"
+readonly PAM_AUTHTOK
for file in /opt/openslx/scripts/pam_script_auth.d/*; do
[ -f "$file" ] || continue
( . "$file" ) || slxlog "pam-source-hooks" "Could not source '$file'."
diff --git a/core/modules/pam-slx-plug/data/opt/openslx/pam/mount.d/99-fallback b/core/modules/pam-slx-plug/data/opt/openslx/pam/mount.d/99-fallback
index 0251458e..ea3b4ae9 100644
--- a/core/modules/pam-slx-plug/data/opt/openslx/pam/mount.d/99-fallback
+++ b/core/modules/pam-slx-plug/data/opt/openslx/pam/mount.d/99-fallback
@@ -31,6 +31,7 @@ if [ "$MOUNT" = "cifs" ]; then
fi
if [ -z "$LDAP_DOMAIN_OVERRIDE" ]; then
XDOMAIN="$XDOMAIN #"
+ fi
export USER="${REAL_ACCOUNT}"
export PASSWD="${USER_PASSWORD}"