diff --git a/greeter/autotests/fakekcheckpass.c b/greeter/autotests/fakekcheckpass.c --- a/greeter/autotests/fakekcheckpass.c +++ b/greeter/autotests/fakekcheckpass.c @@ -212,9 +212,6 @@ int main(int argc, char **argv) { -#ifdef HAVE_PAM - const char *caller = KSCREENSAVER_PAM_SERVICE; -#endif const char *method = "classic"; int c, nfd; @@ -238,13 +235,8 @@ havetty = isatty(0); - while ((c = getopt(argc, argv, "hc:m:S:")) != -1) { + while ((c = getopt(argc, argv, "hm:S:")) != -1) { switch (c) { - case 'c': -#ifdef HAVE_PAM - caller = optarg; -#endif - break; case 'm': method = optarg; break; diff --git a/kcheckpass/checkpass_pam.c b/kcheckpass/checkpass_pam.c --- a/kcheckpass/checkpass_pam.c +++ b/kcheckpass/checkpass_pam.c @@ -127,7 +127,7 @@ #endif -AuthReturn Authenticate(const char *caller, const char *method, +AuthReturn Authenticate(const char *method, const char *user, char *(*conv) (ConvRequest, const char *)) { const char *tty; @@ -141,11 +141,11 @@ PAM_data.conv = conv; if (strcmp(method, "classic")) { - sprintf(pservb, "%.31s-%.31s", caller, method); + sprintf(pservb, "%.31s-%.31s", KSCREENSAVER_PAM_SERVICE, method); pam_service = pservb; } else { /* PAM_data.classic = 1; */ - pam_service = caller; + pam_service = KSCREENSAVER_PAM_SERVICE; } pam_error = pam_start(pam_service, user, &PAM_conversation, &pamh); if (pam_error != PAM_SUCCESS) diff --git a/kcheckpass/kcheckpass.h b/kcheckpass/kcheckpass.h --- a/kcheckpass/kcheckpass.h +++ b/kcheckpass/kcheckpass.h @@ -100,9 +100,6 @@ * Authenticates user *****************************************************************/ AuthReturn Authenticate( -#ifdef HAVE_PAM - const char *caller, -#endif const char *method, const char *user, char *(*conv) (ConvRequest, const char *)); diff --git a/kcheckpass/kcheckpass.c b/kcheckpass/kcheckpass.c --- a/kcheckpass/kcheckpass.c +++ b/kcheckpass/kcheckpass.c @@ -296,7 +296,6 @@ " options:\n" " -h this help message\n" " -S handle operate in binary server mode on file descriptor handle\n" - " -c caller the calling application, effectively the PAM service basename\n" " -m method use the specified authentication method (default: \"classic\")\n" " exit codes:\n" " 0 success\n" @@ -310,9 +309,6 @@ int main(int argc, char **argv) { -#ifdef HAVE_PAM - const char *caller = KSCREENSAVER_PAM_SERVICE; -#endif const char *method = "classic"; const char *username = 0; char *p; @@ -350,16 +346,11 @@ havetty = isatty(0); - while ((c = getopt(argc, argv, "hc:m:S:")) != -1) { + while ((c = getopt(argc, argv, "hm:S:")) != -1) { switch (c) { case 'h': usage(0); break; - case 'c': -#ifdef HAVE_PAM - caller = optarg; -#endif - break; case 'm': method = optarg; break; @@ -385,11 +376,7 @@ } /* Now do the fandango */ - ret = Authenticate( -#ifdef HAVE_PAM - caller, -#endif - method, + ret = Authenticate(method, username, sfd < 0 ? conv_legacy : conv_server);