diff options
author | Simon Rettberg | 2018-05-23 17:07:50 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-05-23 17:07:50 +0200 |
commit | 4539ff0dca67c0612aeeb793f75bd560b9207424 (patch) | |
tree | cb96672ecf5dc90f19a1be240e825dfb7d29ed05 /core/modules | |
parent | Do not strip binaries in /opt/openslx/s?bin (diff) | |
download | mltk-4539ff0dca67c0612aeeb793f75bd560b9207424.tar.gz mltk-4539ff0dca67c0612aeeb793f75bd560b9207424.tar.xz mltk-4539ff0dca67c0612aeeb793f75bd560b9207424.zip |
[pam-slx-plug] Always export PERSISTENT_NETPATH
Diffstat (limited to 'core/modules')
-rwxr-xr-x | core/modules/pam-slx-plug/data/opt/openslx/pam/exec_auth | 15 |
1 files changed, 8 insertions, 7 deletions
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 16b1af5a..d140f78c 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 @@ -160,6 +160,14 @@ if ! isHomeMounted; then fi fi +# Remember for hooks in pam_script_auth.d +if [ "${NETWORK_HOME:0:2}" = '//' ]; then + PERSISTENT_NETPATH=$(echo "$NETWORK_HOME" | tr '/' '\') +else + PERSISTENT_NETPATH="$NETWORK_HOME" +fi +export PERSISTENT_NETPATH + # Just try to delete the persistent dir. If the mount was successful, it will not work # If it was not successful, it will be removed so the user doesn't think he can store # anything in there @@ -169,13 +177,6 @@ rmdir -- "${PERSISTENT_HOME_DIR}" 2> /dev/null if [ -n "${PERSISTENT_OK}" ]; then # home directory mount SUCCESS # create a WARNING.txt for the user with hint to PERSISTENT - # Remember for hooks in pam_script_auth.d - if [ "${NETWORK_HOME:0:2}" = '//' ]; then - PERSISTENT_NETPATH=$(echo "$NETWORK_HOME" | tr '/' '\') - else - PERSISTENT_NETPATH="$NETWORK_HOME" - fi - export PERSISTENT_NETPATH cat > "${TEMP_HOME_DIR}/WARNING.txt" <<EOF ATTENTION: This is the non-persistent home directory! Files saved here will be lost on shutdown. |