diff options
-rw-r--r-- | auth-pam.c | 6 | ||||
-rw-r--r-- | auth-pam.h | 4 | ||||
-rw-r--r-- | configure.ac | 11 |
3 files changed, 16 insertions, 5 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 */ |
diff --git a/auth-pam.h b/auth-pam.h index 2e9a0c0a3..58a257a48 100644 --- a/auth-pam.h +++ b/auth-pam.h | |||
@@ -27,10 +27,6 @@ | |||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | #ifdef USE_PAM | 28 | #ifdef USE_PAM |
29 | 29 | ||
30 | #if !defined(SSHD_PAM_SERVICE) | ||
31 | # define SSHD_PAM_SERVICE __progname | ||
32 | #endif | ||
33 | |||
34 | void start_pam(Authctxt *); | 30 | void start_pam(Authctxt *); |
35 | void finish_pam(void); | 31 | void finish_pam(void); |
36 | u_int do_pam_account(void); | 32 | u_int do_pam_account(void); |
diff --git a/configure.ac b/configure.ac index e08374755..1f1941a15 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -3047,6 +3047,17 @@ AC_ARG_WITH([pam], | |||
3047 | ] | 3047 | ] |
3048 | ) | 3048 | ) |
3049 | 3049 | ||
3050 | AC_ARG_WITH([pam-service], | ||
3051 | [ --with-pam-service=name Specify PAM service name ], | ||
3052 | [ | ||
3053 | if test "x$withval" != "xno" && \ | ||
3054 | test "x$withval" != "xyes" ; then | ||
3055 | AC_DEFINE_UNQUOTED([SSHD_PAM_SERVICE], | ||
3056 | ["$withval"], [sshd PAM service name]) | ||
3057 | fi | ||
3058 | ] | ||
3059 | ) | ||
3060 | |||
3050 | # Check for older PAM | 3061 | # Check for older PAM |
3051 | if test "x$PAM_MSG" = "xyes" ; then | 3062 | if test "x$PAM_MSG" = "xyes" ; then |
3052 | # Check PAM strerror arguments (old PAM) | 3063 | # Check PAM strerror arguments (old PAM) |