Implement timeout for krb5 ticket retrieval during VPN connections
This commit is contained in:
parent
61833201cb
commit
b4caaf036d
1 changed files with 12 additions and 7 deletions
|
@ -13,12 +13,17 @@ if [[ "$CONNECTION_ID" = "VPN-Schule" ]]; then
|
||||||
# Exit if server is already mounted
|
# Exit if server is already mounted
|
||||||
findmnt /srv/samba/schools/default-school > /dev/null && exit 0
|
findmnt /srv/samba/schools/default-school > /dev/null && exit 0
|
||||||
|
|
||||||
if ! klist -s -c "${KRB5CCNAME}"; then
|
counter=1
|
||||||
#echo "try to renew KRB5-Ticket" >&2
|
while ! klist -s -c "${KRB5CCNAME}"; do
|
||||||
#sudo -u "${USERNAME}" kinit -R -c "${KRB5CCNAME}"
|
(( counter > 30 )) && exit 0
|
||||||
echo "KRB5-Ticket is expired. Sleep 3 seconds and hope it will be renewed after." >&2
|
echo "KRB5-Ticket is expired. Sleep 1 seconds and hope it will be renewed after." >&2
|
||||||
sleep 3
|
# if (( counter == 10 )); then
|
||||||
fi
|
# echo "try to renew KRB5-Ticket" >&2
|
||||||
|
# sudo -u "${USERNAME}" kinit -R -c "${KRB5CCNAME}"
|
||||||
|
# fi
|
||||||
|
sleep 1
|
||||||
|
((counter++))
|
||||||
|
done
|
||||||
|
|
||||||
echo "prepare mountpoints" >&2
|
echo "prepare mountpoints" >&2
|
||||||
umask 0002
|
umask 0002
|
||||||
|
|
Loading…
Add table
Reference in a new issue