mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-02-28 11:50:47 +00:00
add --with-pam-service to specify PAM service name
Saves messing around with CFLAGS to do it.
This commit is contained in:
parent
74433a19bb
commit
8bd81e1596
@ -66,6 +66,11 @@
|
|||||||
#include <pam/pam_appl.h>
|
#include <pam/pam_appl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(SSHD_PAM_SERVICE)
|
||||||
|
extern char *__progname;
|
||||||
|
# define SSHD_PAM_SERVICE __progname
|
||||||
|
#endif
|
||||||
|
|
||||||
/* OpenGroup RFC86.0 and XSSO specify no "const" on arguments */
|
/* OpenGroup RFC86.0 and XSSO specify no "const" on arguments */
|
||||||
#ifdef PAM_SUN_CODEBASE
|
#ifdef PAM_SUN_CODEBASE
|
||||||
# define sshpam_const /* Solaris, HP-UX, SunOS */
|
# define sshpam_const /* Solaris, HP-UX, SunOS */
|
||||||
@ -615,7 +620,6 @@ sshpam_cleanup(void)
|
|||||||
static int
|
static int
|
||||||
sshpam_init(Authctxt *authctxt)
|
sshpam_init(Authctxt *authctxt)
|
||||||
{
|
{
|
||||||
extern char *__progname;
|
|
||||||
const char *pam_rhost, *pam_user, *user = authctxt->user;
|
const char *pam_rhost, *pam_user, *user = authctxt->user;
|
||||||
const char **ptr_pam_user = &pam_user;
|
const char **ptr_pam_user = &pam_user;
|
||||||
struct ssh *ssh = active_state; /* XXX */
|
struct ssh *ssh = active_state; /* XXX */
|
||||||
|
@ -27,10 +27,6 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#ifdef USE_PAM
|
#ifdef USE_PAM
|
||||||
|
|
||||||
#if !defined(SSHD_PAM_SERVICE)
|
|
||||||
# define SSHD_PAM_SERVICE __progname
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void start_pam(Authctxt *);
|
void start_pam(Authctxt *);
|
||||||
void finish_pam(void);
|
void finish_pam(void);
|
||||||
u_int do_pam_account(void);
|
u_int do_pam_account(void);
|
||||||
|
11
configure.ac
11
configure.ac
@ -3047,6 +3047,17 @@ AC_ARG_WITH([pam],
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AC_ARG_WITH([pam-service],
|
||||||
|
[ --with-pam-service=name Specify PAM service name ],
|
||||||
|
[
|
||||||
|
if test "x$withval" != "xno" && \
|
||||||
|
test "x$withval" != "xyes" ; then
|
||||||
|
AC_DEFINE_UNQUOTED([SSHD_PAM_SERVICE],
|
||||||
|
["$withval"], [sshd PAM service name])
|
||||||
|
fi
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
# Check for older PAM
|
# Check for older PAM
|
||||||
if test "x$PAM_MSG" = "xyes" ; then
|
if test "x$PAM_MSG" = "xyes" ; then
|
||||||
# Check PAM strerror arguments (old PAM)
|
# Check PAM strerror arguments (old PAM)
|
||||||
|
Loading…
Reference in New Issue
Block a user