From f0f6940ead488bf3ca6f00aa153ecbbc29cc3c3b Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 9 Mar 2018 14:34:32 +0100 Subject: [pam-slx-plug] fix variable naming issues/mismatch --- .../pam-slx-plug/data/opt/openslx/pam/common/homedir-passwd | 8 ++++---- core/modules/pam-slx-plug/data/opt/openslx/pam/exec_auth | 2 ++ .../modules/pam-slx-plug/data/opt/openslx/pam/mount.d/99-fallback | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'core/modules/pam-slx-plug') 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}" -- cgit v1.2.3-55-g7522