diff options
Diffstat (limited to 'remote/modules/pam-common-share/data/opt/openslx/scripts/pam_script_mount_common_share')
-rw-r--r-- | remote/modules/pam-common-share/data/opt/openslx/scripts/pam_script_mount_common_share | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/remote/modules/pam-common-share/data/opt/openslx/scripts/pam_script_mount_common_share b/remote/modules/pam-common-share/data/opt/openslx/scripts/pam_script_mount_common_share index 5416842f..85a3fcc0 100644 --- a/remote/modules/pam-common-share/data/opt/openslx/scripts/pam_script_mount_common_share +++ b/remote/modules/pam-common-share/data/opt/openslx/scripts/pam_script_mount_common_share @@ -58,8 +58,8 @@ mount_share() { if [ "${SHARE_AUTH_TYPE}" = "guest" ]; then MOUNT_OPTS="${MOUNT_OPTS},guest,file_mode=0777,dir_mode=0777" elif [ "${SHARE_AUTH_TYPE}" = "pam" ]; then - export USER="{PAM_USER}" - export PASSWD="{PAM_AUTHTOK}" + export USER="${PAM_USER}" + export PASSWD="${PAM_AUTHTOK}" MOUNT_OPTS="${MOUNT_OPTS},sec=ntlm,file_mode=0700,dir_mode=0700" elif [ "${SHARE_AUTH_TYPE}" = "user" ]; then # check if credentials are set @@ -137,4 +137,7 @@ for SHARE in ${!SLX_SHARE_*}; do # this check is mostly to be sure that the variable splitting worked as it should [[ "$SHARE" =~ ^[0-9]+$ ]] || continue eval mount_share \""\$SLX_SHARE_${SHARE}_AUTH_TYPE"\" \""\$SLX_SHARE_${SHARE}_AUTH_USER"\" \""\$SLX_SHARE_${SHARE}_AUTH_PASS"\" \""\$SLX_SHARE_${SHARE}_PERM"\" \""\$SLX_SHARE_${SHARE}_PATH"\" \""$SHARE"\" + ## unset USER and PASSWD just in case mount_share returned due to an error. + unset USER + unset PASSWD done |