summaryrefslogtreecommitdiffstats
path: root/tdmlib/kgreet_classic.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-18 15:54:06 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-18 15:54:06 -0500
commit9ea67803526cec0439175b8dc2ee5f0e7b87bc89 (patch)
treeab6d82eb81e1794f99d4665a3b4f99db36a704bb /tdmlib/kgreet_classic.cpp
parent46d9df235b2b98b057e2bc9719b7d3416bd5438f (diff)
downloadtdebase-9ea67803526cec0439175b8dc2ee5f0e7b87bc89.tar.gz
tdebase-9ea67803526cec0439175b8dc2ee5f0e7b87bc89.zip
Stabilize cryptographic card login
Fix some coding style issues
Diffstat (limited to 'tdmlib/kgreet_classic.cpp')
-rw-r--r--tdmlib/kgreet_classic.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/tdmlib/kgreet_classic.cpp b/tdmlib/kgreet_classic.cpp
index 6aac4d96a..5b8f51d2b 100644
--- a/tdmlib/kgreet_classic.cpp
+++ b/tdmlib/kgreet_classic.cpp
@@ -66,7 +66,8 @@ KClassicGreeter::KClassicGreeter( KGreeterPluginHandler *_handler,
ctx( _ctx ),
exp( -1 ),
pExp( -1 ),
- running( false )
+ running( false ),
+ suppressInfoMsg(false)
{
KdmItem *user_entry = 0, *pw_entry = 0;
grid = 0;
@@ -246,6 +247,10 @@ KClassicGreeter::setEnabled( bool enable )
passwdEdit->setFocus();
}
+void KClassicGreeter::setInfoMessageDisplay(bool enable) {
+ suppressInfoMsg = !enable;
+}
+
void // private
KClassicGreeter::returnData()
{
@@ -276,8 +281,18 @@ bool // virtual
KClassicGreeter::textMessage( const char *text, bool err )
{
if (!err &&
- TQString( text ).find( TQRegExp( "^Changing password for [^ ]+$" ) ) >= 0)
+ TQString( text ).find( TQRegExp( "^Changing password for [^ ]+$" ) ) >= 0) {
+ return true;
+ }
+ if (!err && suppressInfoMsg) {
return true;
+ }
+ if (!err && ((TQString(text).lower().find("smartcard") >= 0) || (TQString(text).lower().find("smart card") >= 0))) {
+ // FIXME
+ // pam_pkcs11 is extremely chatty, even with no card inserted,
+ // and there is no apparent way to disable the unwanted messages!
+ return true;
+ }
return false;
}