diff options
| author | Simon Rettberg | 2016-09-09 14:57:51 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2016-09-09 14:57:51 +0200 |
| commit | 36098629405622ca2eb6644997a3c1b057793d4b (patch) | |
| tree | 6a0dcf8888de73716471fb00949baa33e735380b /remote/modules/pam-bwidm/data/opt/openslx/scripts | |
| parent | [screen-standby] +x! +x everywhere! (diff) | |
| download | tm-scripts-36098629405622ca2eb6644997a3c1b057793d4b.tar.gz tm-scripts-36098629405622ca2eb6644997a3c1b057793d4b.tar.xz tm-scripts-36098629405622ca2eb6644997a3c1b057793d4b.zip | |
[pam-bwidm] Generate random ID so consecutive logins don't fail
Diffstat (limited to 'remote/modules/pam-bwidm/data/opt/openslx/scripts')
| -rwxr-xr-x | remote/modules/pam-bwidm/data/opt/openslx/scripts/pam_bwidm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/remote/modules/pam-bwidm/data/opt/openslx/scripts/pam_bwidm b/remote/modules/pam-bwidm/data/opt/openslx/scripts/pam_bwidm index ae62c7ee..92379719 100755 --- a/remote/modules/pam-bwidm/data/opt/openslx/scripts/pam_bwidm +++ b/remote/modules/pam-bwidm/data/opt/openslx/scripts/pam_bwidm @@ -138,7 +138,9 @@ if [ "x$PAM_TYPE" == "xauth" ]; then CT='Content-Type: application/vnd.paos+xml; charset=utf-8' NOW=$(date -u '+%Y-%m-%dT%H:%M:%SZ') HOST=$(echo "${USER_ECP_URL}" | awk -F '/' '{print $3}') - REQUEST=$(sed "s/%TIMESTAMP%/${NOW}/g" "${SOAP_ENVELOPE}") + RID="_c${RANDOM}a${RANDOM}f${RANDOM}f${RANDOM}e${RANDOM}e${RANDOM}" + RID="${RID:0:32}" + REQUEST=$(sed "s/%TIMESTAMP%/${NOW}/g;s/%REQUESTID%/${RID}/g" "${SOAP_ENVELOPE}") NETRC=$(mktemp -p /run/) [ -z "$NETRC" ] && NETRC="/run/netrc_$$_${USER}_${RANDOM}.tmp" touch "$NETRC" |
