diff options
author | Damien Miller <djm@mindrot.org> | 2016-08-16 13:30:56 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-08-16 13:37:26 +1000 |
commit | 8bd81e1596ab1bab355146cb65e82fb96ade3b23 (patch) | |
tree | 7c4872c8daf8171b0e84a4363b2ce0dc80b22e0b /auth-pam.c | |
parent | 74433a19bb6f4cef607680fa4d1d7d81ca3826aa (diff) |
add --with-pam-service to specify PAM service name
Saves messing around with CFLAGS to do it.
Diffstat (limited to 'auth-pam.c')
-rw-r--r-- | auth-pam.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/auth-pam.c b/auth-pam.c index 348fe370a..7a14c89f4 100644 --- a/auth-pam.c +++ b/auth-pam.c | |||
@@ -66,6 +66,11 @@ | |||
66 | #include <pam/pam_appl.h> | 66 | #include <pam/pam_appl.h> |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | #if !defined(SSHD_PAM_SERVICE) | ||
70 | extern char *__progname; | ||
71 | # define SSHD_PAM_SERVICE __progname | ||
72 | #endif | ||
73 | |||
69 | /* OpenGroup RFC86.0 and XSSO specify no "const" on arguments */ | 74 | /* OpenGroup RFC86.0 and XSSO specify no "const" on arguments */ |
70 | #ifdef PAM_SUN_CODEBASE | 75 | #ifdef PAM_SUN_CODEBASE |
71 | # define sshpam_const /* Solaris, HP-UX, SunOS */ | 76 | # define sshpam_const /* Solaris, HP-UX, SunOS */ |
@@ -615,7 +620,6 @@ sshpam_cleanup(void) | |||
615 | static int | 620 | static int |
616 | sshpam_init(Authctxt *authctxt) | 621 | sshpam_init(Authctxt *authctxt) |
617 | { | 622 | { |
618 | extern char *__progname; | ||
619 | const char *pam_rhost, *pam_user, *user = authctxt->user; | 623 | const char *pam_rhost, *pam_user, *user = authctxt->user; |
620 | const char **ptr_pam_user = &pam_user; | 624 | const char **ptr_pam_user = &pam_user; |
621 | struct ssh *ssh = active_state; /* XXX */ | 625 | struct ssh *ssh = active_state; /* XXX */ |