diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-09-18 23:01:01 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-09-18 23:01:01 -0500 |
commit | 6f5e7b211009bf3a5b6816ee3cb064d7f393dfb9 (patch) | |
tree | e30e480a7524c15acd02901d3e6f0e48a9f6a12b /kdesktop/lock/lockprocess.cc | |
parent | 1ec002a8ee0c9165bedbcb6e273d9bacb0588e47 (diff) | |
download | tdebase-6f5e7b211009bf3a5b6816ee3cb064d7f393dfb9.tar.gz tdebase-6f5e7b211009bf3a5b6816ee3cb064d7f393dfb9.zip |
Streamline cryptographic card logon process
Diffstat (limited to 'kdesktop/lock/lockprocess.cc')
-rw-r--r-- | kdesktop/lock/lockprocess.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index 494852e39..38526d644 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -228,6 +228,7 @@ LockProcess::LockProcess() m_dialogPrevX(0), m_dialogPrevY(0), m_notifyReadyRequested(false), + m_loginCardDevice(NULL), m_maskWidget(NULL), m_saverRootWindow(0) { @@ -300,7 +301,7 @@ LockProcess::LockProcess() for (hwdevice = cardReaderList.first(); hwdevice; hwdevice = cardReaderList.next()) { TDECryptographicCardDevice* cdevice = static_cast<TDECryptographicCardDevice*>(hwdevice); // connect(cdevice, SIGNAL(pinRequested(TQString,TDECryptographicCardDevice*)), this, SLOT(cryptographicCardPinRequested(TQString,TDECryptographicCardDevice*))); - connect(cdevice, TQT_SIGNAL(cardInserted(TDECryptographicCardDevice*)), this, TQT_SLOT(cryptographicCardInserted(TDECryptographicCardDevice*))); + connect(cdevice, TQT_SIGNAL(certificateListAvailable(TDECryptographicCardDevice*)), this, TQT_SLOT(cryptographicCardInserted(TDECryptographicCardDevice*))); connect(cdevice, TQT_SIGNAL(cardRemoved(TDECryptographicCardDevice*)), this, TQT_SLOT(cryptographicCardRemoved(TDECryptographicCardDevice*))); cdevice->enableCardMonitoring(true); // cdevice->enablePINEntryCallbacks(true); @@ -2846,6 +2847,7 @@ void LockProcess::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) } // Pass login to the PAM stack... + m_loginCardDevice = cdevice; if (dynamic_cast<SAKDlg*>(currentDialog)) { dynamic_cast<SAKDlg*>(currentDialog)->closeDialogForced(); TQTimer::singleShot(0, this, SLOT(signalPassDlgToAttemptCardLogin())); @@ -2867,17 +2869,18 @@ void LockProcess::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) passDlg->resetCardLogin(); } else { + m_loginCardDevice = NULL; TQTimer::singleShot(0, this, SLOT(signalPassDlgToAttemptCardAbort())); } } void LockProcess::signalPassDlgToAttemptCardLogin() { PasswordDlg* passDlg = dynamic_cast<PasswordDlg*>(currentDialog); - if (passDlg) { + if (passDlg && m_loginCardDevice) { passDlg->attemptCardLogin(); } else { - if (currentDialog) { + if (currentDialog && m_loginCardDevice) { // Try again later TQTimer::singleShot(0, this, SLOT(signalPassDlgToAttemptCardLogin())); } @@ -2915,6 +2918,10 @@ void LockProcess::cryptographicCardPinRequested(TQString prompt, TDECryptographi } } +TDECryptographicCardDevice* LockProcess::cryptographicCardDevice() { + return m_loginCardDevice; +} + void LockProcess::fullyOnline() { if (!mFullyOnlineSent) { if (kdesktop_pid > 0) { |