summaryrefslogtreecommitdiffstats
path: root/tdm/kfrontend/kgreeter.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2015-09-18 23:01:01 -0500
committerTimothy Pearson <[email protected]>2015-09-18 23:01:01 -0500
commit6f5e7b211009bf3a5b6816ee3cb064d7f393dfb9 (patch)
treee30e480a7524c15acd02901d3e6f0e48a9f6a12b /tdm/kfrontend/kgreeter.cpp
parent1ec002a8ee0c9165bedbcb6e273d9bacb0588e47 (diff)
downloadtdebase-6f5e7b211009bf3a5b6816ee3cb064d7f393dfb9.tar.gz
tdebase-6f5e7b211009bf3a5b6816ee3cb064d7f393dfb9.zip
Streamline cryptographic card logon process
Diffstat (limited to 'tdm/kfrontend/kgreeter.cpp')
-rw-r--r--tdm/kfrontend/kgreeter.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/tdm/kfrontend/kgreeter.cpp b/tdm/kfrontend/kgreeter.cpp
index 15b325898..e14e58491 100644
--- a/tdm/kfrontend/kgreeter.cpp
+++ b/tdm/kfrontend/kgreeter.cpp
@@ -899,9 +899,16 @@ void KGreeter::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) {
// pam_pkcs11 is extremely chatty with no apparent way to disable the unwanted messages
verify->setInfoMessageDisplay(false);
- // Initiate login
+ // Set up password prompt
cardLoginUser = login_name;
- verify->accept();
+ verify->setPasswordPrompt(i18n("PIN:"));
+
+ TQString autoPIN = cdevice->autoPIN();
+ if (autoPIN != TQString::null) {
+ // Initiate login
+ verify->setPassword(autoPIN);
+ verify->accept();
+ }
}
}
}
@@ -910,6 +917,7 @@ void KGreeter::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) {
cardLoginUser = TQString::null;
verify->lockUserEntry(false);
verify->requestAbort();
+ verify->setPasswordPrompt(TQString::null);
// Restore information message display settings
verify->setInfoMessageDisplay(showInfoMessages);
@@ -1128,8 +1136,9 @@ KThemedGreeter::KThemedGreeter()
xauth_warning = themer->findNode( "xauth-warning" ); // tdm ext
pam_error = themer->findNode( "pam-error" );
timed_label = themer->findNode( "timed-label" );
- if (pam_error && pam_error->isA( "KdmLabel" ))
+ if (pam_error && pam_error->isA( "KdmLabel" )) {
static_cast<KdmLabel*>(pam_error)->setText( i18n("Login Failed.") );
+ }
KdmItem *itm;
if ((itm = themer->findNode( "pam-message" ))) // done via msgboxes
@@ -1291,6 +1300,10 @@ KThemedGreeter::updateStatus( bool fail, bool caps, int timedleft )
timed_label->hide( true );
}
}
+
+ if (cardLoginUser != TQString::null) {
+ verify->setPasswordPrompt(i18n("PIN:"));
+ }
}
void