summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-16 00:35:13 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-16 00:35:13 +0000
commitad7eff7d2030d78e7c125ce0253e88a5767945a2 (patch)
tree7c09055743dab2261ed06a0b71b23b9fdeadb33d
parentcee4f171ab5f3f9f9eab0286c03f480d87f5871c (diff)
downloadsmartcardauth-ad7eff7d.tar.gz
smartcardauth-ad7eff7d.zip
Fix smartcardauth script for new kdm versions and new installation path
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/smartcardauth@1247447 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--etc/smartauth/smartauthmon.sh.in64
1 files changed, 15 insertions, 49 deletions
diff --git a/etc/smartauth/smartauthmon.sh.in b/etc/smartauth/smartauthmon.sh.in
index 252aae5..a307ec9 100644
--- a/etc/smartauth/smartauthmon.sh.in
+++ b/etc/smartauth/smartauthmon.sh.in
@@ -1,6 +1,6 @@
#!/bin/bash
-# Smart Card KDE3.5 Authentication Script (c) 2010 Timothy Pearson
+# Smart Card TDE Authentication Script (c) 2010-2011 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
@@ -293,24 +293,7 @@ while [[ 1 == 1 ]]; do
waserror=0
noactivesessions=0
- result_is_consistent=0
- while [[ $result_is_consistent == 0 ]]; do
- result_one=$(/opt/kde3/bin/kdmctl -g list)
- sleep 0.1
- result_two=$(/opt/kde3/bin/kdmctl -g list)
- sleep 0.1
- result_three=$(/opt/kde3/bin/kdmctl -g list)
- sleep 0.1
- result_four=$(/opt/kde3/bin/kdmctl -g list)
- if [[ $result_one == $result_two ]]; then
- if [[ $result_one == $result_three ]]; then
- if [[ $result_one == $result_four ]]; then
- result=$result_one
- result_is_consistent=1
- fi
- fi
- fi
- done
+ $result=$(/opt/trinity/bin/kdmctl -g list)
if [[ $result == "ok" ]]; then
noactivesessions=1
result="okbutempty"
@@ -375,9 +358,9 @@ while [[ 1 == 1 ]]; do
cverify="User:${darray[index]}"
udisplay=":${index}"
if [[ $lverify == $cverify ]]; then
- su $smartcard_username -c "export DISPLAY=$udisplay; /opt/kde3/bin/dcop kdesktop KScreensaverIface quit"
- su $smartcard_username -c "export DISPLAY=$udisplay; /opt/kde3/bin/dcop kdesktop KScreensaverIface enable false"
- /opt/kde3/bin/kdmctl activate $udisplay
+ su $smartcard_username -c "export DISPLAY=$udisplay; /opt/trinity/bin/dcop kdesktop KScreensaverIface quit"
+ su $smartcard_username -c "export DISPLAY=$udisplay; /opt/trinity/bin/dcop kdesktop KScreensaverIface enable false"
+ /opt/trinity/bin/kdmctl activate $udisplay
else
echo "EUnauthorized SmartCard Inserted" > /tmp/ksocket-global/kdesktoplockcontrol &
fi
@@ -444,10 +427,10 @@ while [[ 1 == 1 ]]; do
echo "The next display to start will be $newdisplay"
rm $SECURE_DIRECTORY/originalxdm
- /opt/kde3/bin/kdmctl -g reserve
- /opt/kde3/bin/kdmctl -g login $newdisplay now $smartcard_username $(cat $SECURE_DIRECTORY/password)
+ /opt/trinity/bin/kdmctl -g reserve
+ /opt/trinity/bin/kdmctl -g login $newdisplay now $smartcard_username $(cat $SECURE_DIRECTORY/password)
sleep 2
- /opt/kde3/bin/kdmctl -g activate $newdisplay
+ /opt/trinity/bin/kdmctl -g activate $newdisplay
udisplay=$newdisplay
fi
@@ -467,8 +450,8 @@ while [[ 1 == 1 ]]; do
while [[ $OUTPUT -eq 0 ]]; do
sleep 1
- su $smartcard_username -c "export DISPLAY=$udisplay; /opt/kde3/bin/dcop kdesktop KScreensaverIface quit"
- su $smartcard_username -c "export DISPLAY=$udisplay; /opt/kde3/bin/dcop kdesktop KScreensaverIface enable false"
+ su $smartcard_username -c "export DISPLAY=$udisplay; /opt/trinity/bin/dcop kdesktop KScreensaverIface quit"
+ su $smartcard_username -c "export DISPLAY=$udisplay; /opt/trinity/bin/dcop kdesktop KScreensaverIface enable false"
echo "exit" | scriptor 2>/dev/null 1>/dev/null
OUTPUT=$?
if [[ $smartcard_slave == "SLAVE" ]]; then
@@ -514,24 +497,7 @@ while [[ 1 == 1 ]]; do
result="ok"
timeout=0
errcode=0
- result_is_consistent=0
- while [[ $result_is_consistent == 0 ]]; do
- result_one=$(/opt/kde3/bin/kdmctl -g list)
- sleep 0.1
- result_two=$(/opt/kde3/bin/kdmctl -g list)
- sleep 0.1
- result_three=$(/opt/kde3/bin/kdmctl -g list)
- sleep 0.1
- result_four=$(/opt/kde3/bin/kdmctl -g list)
- if [[ $result_one == $result_two ]]; then
- if [[ $result_one == $result_three ]]; then
- if [[ $result_one == $result_four ]]; then
- result=$result_one
- result_is_consistent=1
- fi
- fi
- fi
- done
+ $result=$(/opt/trinity/bin/kdmctl -g list)
if [[ $result == "ok" ]]; then
noactivesessions=1
result="okbutempty"
@@ -587,10 +553,10 @@ while [[ 1 == 1 ]]; do
timeout=0
blankresult=""
while [[ $blankresult != "true" ]]; do
- /opt/kde3/bin/kdmctl -g activate $udisplay
- su $smartcard_username -c "export DISPLAY=$udisplay; /opt/kde3/bin/dcop kdesktop KScreensaverIface enable true"
- su $smartcard_username -c "export DISPLAY=$udisplay; /opt/kde3/bin/dcop kdesktop KScreensaverIface lock"
- blankresult=$(su $smartcard_username -c "export DISPLAY=$udisplay; /opt/kde3/bin/dcop kdesktop KScreensaverIface isBlanked")
+ /opt/trinity/bin/kdmctl -g activate $udisplay
+ su $smartcard_username -c "export DISPLAY=$udisplay; /opt/trinity/bin/dcop kdesktop KScreensaverIface enable true"
+ su $smartcard_username -c "export DISPLAY=$udisplay; /opt/trinity/bin/dcop kdesktop KScreensaverIface lock"
+ blankresult=$(su $smartcard_username -c "export DISPLAY=$udisplay; /opt/trinity/bin/dcop kdesktop KScreensaverIface isBlanked")
if [[ $? != 0 ]]; then
blankresult="true"
fi