Updated to show status on screen while logging in or during authentication failure

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/smartcardauth@1112244 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 3eaf423719
commit 73aeab3bce

@ -1,6 +1,6 @@
#!/bin/bash
# Smart Card KDE3.5 Authentication Script (c) 2009 Timothy Pearson
# Smart Card KDE3.5 Authentication Script (c) 2010 Timothy Pearson
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -136,6 +136,7 @@ while [[ 1 == 1 ]]; do
OUTPUT=$?
if [[ $OUTPUT -eq 0 ]]; then
echo "Card inserted!"
echo "TAuthenticating SmartCard..." > /tmp/ksocket-global/kdesktoplockcontrol &
# Get card ATR
echo "RESET" > $SECURE_DIRECTORY/query
@ -251,6 +252,7 @@ while [[ 1 == 1 ]]; do
fi
else
echo "This card does not recognize this system!"
echo "EInvalid SmartCard Inserted" > /tmp/ksocket-global/kdesktoplockcontrol &
sleep 1
smartcard_username=""
rm -f $SECURE_DIRECTORY/password
@ -375,6 +377,8 @@ while [[ 1 == 1 ]]; do
if [[ $lverify == $cverify ]]; then
su $smartcard_username -c "export DISPLAY=$udisplay; /opt/kde3/bin/dcop kdesktop KScreensaverIface quit"
/opt/kde3/bin/kdmctl activate $udisplay
else
echo "EUnauthorized SmartCard Inserted" > /tmp/ksocket-global/kdesktoplockcontrol &
fi
else
echo "Username not specified"
@ -456,6 +460,7 @@ while [[ 1 == 1 ]]; do
#if [[ loginok -eq 1 ]]; then
# Wait for SmartCard removal
echo "C" > /tmp/ksocket-global/kdesktoplockcontrol &
TIMER=60
OUTPUT=0
@ -604,5 +609,6 @@ while [[ 1 == 1 ]]; do
smartcard_username=""
rm -rf /etc/smartmon/minutesremaining
echo "C" > /tmp/ksocket-global/kdesktoplockcontrol &
fi
done

Loading…
Cancel
Save