summaryrefslogtreecommitdiffstats
path: root/kcheckpass
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-17 17:30:17 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-17 17:30:17 -0500
commitce477303019c7f3ba18dcab48e4205d59614ce5a (patch)
tree19e49c43c92ba12de306af4f92f3fda64d9e92b8 /kcheckpass
parent5d20ad97bffa56b2e366989e71ac9429116c017d (diff)
downloadtdebase-ce477303019c7f3ba18dcab48e4205d59614ce5a.tar.gz
tdebase-ce477303019c7f3ba18dcab48e4205d59614ce5a.zip
Add initial cryptographic card login support
Tested with themed greeter and SAK disabled
Diffstat (limited to 'kcheckpass')
-rw-r--r--kcheckpass/checkpass_pam.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/kcheckpass/checkpass_pam.c b/kcheckpass/checkpass_pam.c
index 7a35eedd..b11148ce 100644
--- a/kcheckpass/checkpass_pam.c
+++ b/kcheckpass/checkpass_pam.c
@@ -72,8 +72,20 @@ PAM_conv (int num_msg, pam_message_type **msg,
repl[count].resp = pd->conv(ConvGetNormal, msg[count]->msg);
break;
case PAM_PROMPT_ECHO_OFF:
- repl[count].resp =
- pd->conv(ConvGetHidden, pd->classic ? 0 : msg[count]->msg);
+ if (pd->classic) {
+ // WARNING
+ // This is far from foolproof, but it's the best we can do at this time...
+ // Try to detect PIN entry requests
+ if (strstr(msg[count]->msg, "PIN")) {
+ repl[count].resp = pd->conv(ConvGetHidden, msg[count]->msg);
+ }
+ else {
+ repl[count].resp = pd->conv(ConvGetHidden, 0);
+ }
+ }
+ else {
+ repl[count].resp = pd->conv(ConvGetHidden, msg[count]->msg);
+ }
break;
#ifdef PAM_BINARY_PROMPT
case PAM_BINARY_PROMPT: