summaryrefslogtreecommitdiffstats
path: root/tdmlib/kgreet_classic.cpp
diff options
context:
space:
mode:
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;
}