summaryrefslogtreecommitdiffstats
path: root/kcheckpass
diff options
context:
space:
mode:
Diffstat (limited to 'kcheckpass')
-rw-r--r--kcheckpass/checkpass_pam.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/kcheckpass/checkpass_pam.c b/kcheckpass/checkpass_pam.c
index 6f281165f..44758b696 100644
--- a/kcheckpass/checkpass_pam.c
+++ b/kcheckpass/checkpass_pam.c
@@ -140,13 +140,16 @@ AuthReturn Authenticate(const char *caller, const char *method,
openlog("kcheckpass", LOG_PID, LOG_AUTH);
PAM_data.conv = conv;
- if (strcmp(method, "classic")) {
- sprintf(pservb, "%.31s-%.31s", caller, method);
- pam_service = pservb;
- } else {
+ if (!strcmp(method, "classic")) {
PAM_data.classic = 1;
pam_service = caller;
}
+ else if (!strcmp(method, "pam")) {
+ pam_service = caller;
+ } else {
+ sprintf(pservb, "%.31s-%.31s", caller, method);
+ pam_service = pservb;
+ }
pam_error = pam_start(pam_service, user, &PAM_conversation, &pamh);
if (pam_error != PAM_SUCCESS)
return AuthError;