summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/lockdlg.cc
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2015-09-19 17:50:30 -0500
committerTimothy Pearson <[email protected]>2015-09-19 17:50:30 -0500
commita2af4533d38cb3fea416f202d6cc71b926bf59f0 (patch)
tree2a40789cbf7be5726697c903818b3983256f809a /kdesktop/lock/lockdlg.cc
parent6f5e7b211009bf3a5b6816ee3cb064d7f393dfb9 (diff)
downloadtdebase-a2af4533d38cb3fea416f202d6cc71b926bf59f0.tar.gz
tdebase-a2af4533d38cb3fea416f202d6cc71b926bf59f0.zip
Fix card unlock
Diffstat (limited to 'kdesktop/lock/lockdlg.cc')
-rw-r--r--kdesktop/lock/lockdlg.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/kdesktop/lock/lockdlg.cc b/kdesktop/lock/lockdlg.cc
index 3ae0efaa4..677b4129f 100644
--- a/kdesktop/lock/lockdlg.cc
+++ b/kdesktop/lock/lockdlg.cc
@@ -82,7 +82,8 @@ PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin)
mCapsLocked(-1),
mUnlockingFailed(false),
validUserCardInserted(false),
- showInfoMessages(true)
+ showInfoMessages(true),
+ mCardLoginInProgress(false)
{
init(plugin);
}
@@ -96,7 +97,8 @@ PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin, TQDat
mPlugin( plugin ),
mCapsLocked(-1),
mUnlockingFailed(false),
- showInfoMessages(true)
+ showInfoMessages(true),
+ mCardLoginInProgress(false)
{
m_lockStartDT = lockStartDateTime;
init(plugin);
@@ -953,6 +955,11 @@ void PasswordDlg::capsLocked()
}
void PasswordDlg::attemptCardLogin() {
+ if (mCardLoginInProgress) {
+ return;
+ }
+ mCardLoginInProgress = true;
+
// FIXME
// pam_pkcs11 is extremely chatty with no apparent way to disable the unwanted messages
greet->setInfoMessageDisplay(false);
@@ -965,12 +972,13 @@ void PasswordDlg::attemptCardLogin() {
setFixedSize(sizeHint());
// Attempt authentication if configured
- TDECryptographicCardDevice* cdevice = static_cast< LockProcess* >(parent())->cryptographicCardDevice();
+ TDECryptographicCardDevice* cdevice = static_cast<LockProcess*>(parent())->cryptographicCardDevice();
if (cdevice) {
TQString autoPIN = cdevice->autoPIN();
if (autoPIN != TQString::null) {
+ greet->start();
greet->setPassword(autoPIN);
- greet->next();
+ TQTimer::singleShot(0, this, SLOT(slotOK()));
}
}
}
@@ -987,6 +995,8 @@ void PasswordDlg::resetCardLogin() {
// Restore information message display settings
greet->setInfoMessageDisplay(showInfoMessages);
+
+ mCardLoginInProgress = false;
}
#include "lockdlg.moc"