From 1757afecf639d23eb03a22104a71716c85bec23e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 22 Sep 2016 20:26:55 -0500 Subject: Force card logins to authenticate against the username specified in the card certificate --- tdm/kfrontend/kgreeter.cpp | 5 ++++- tdm/kfrontend/kgverify.cpp | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tdm/kfrontend/kgreeter.cpp b/tdm/kfrontend/kgreeter.cpp index 6ce76ebf3..a42ffd0ac 100644 --- a/tdm/kfrontend/kgreeter.cpp +++ b/tdm/kfrontend/kgreeter.cpp @@ -639,12 +639,13 @@ KGreeter::slotUserEntered() { if (userView) { TQListViewItem *item; - for (item = userView->firstChild(); item; item = item->nextSibling()) + for (item = userView->firstChild(); item; item = item->nextSibling()) { if (((UserListViewItem *)item)->login == curUser) { userView->setSelected( item, true ); userView->ensureItemVisible( item ); goto oke; } + } userView->clearSelection(); } oke: @@ -915,6 +916,7 @@ void KGreeter::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) { if (!user_active && vt_active) { // Select the correct user verify->setUser(login_name); + userView->setEnabled(false); verifySetUser(login_name); verify->lockUserEntry(true); @@ -936,6 +938,7 @@ void KGreeter::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) { void KGreeter::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) { cardLoginUser = TQString::null; + userView->setEnabled(false); verify->lockUserEntry(false); verify->requestAbort(); verify->setPasswordPrompt(TQString::null); diff --git a/tdm/kfrontend/kgverify.cpp b/tdm/kfrontend/kgverify.cpp index a3464a5b7..93bcce27a 100644 --- a/tdm/kfrontend/kgverify.cpp +++ b/tdm/kfrontend/kgverify.cpp @@ -323,8 +323,10 @@ KGVerify::start() if (!_autoLoginAgain) _autoLoginDelay = 0, timeable = false; return; - } else + } + else if (!cardLoginInProgress) { applyPreset(); + } } running = true; Debug( "%s->start()\n", pName.data() ); -- cgit v1.2.1