зеркало из https://github.com/Azure/sonic-openssh.git
add --with-pam-service to specify PAM service name
Saves messing around with CFLAGS to do it.
This commit is contained in:
Родитель
74433a19bb
Коммит
8bd81e1596
|
@ -66,6 +66,11 @@
|
|||
#include <pam/pam_appl.h>
|
||||
#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 */
|
||||
#ifdef PAM_SUN_CODEBASE
|
||||
# define sshpam_const /* Solaris, HP-UX, SunOS */
|
||||
|
@ -615,7 +620,6 @@ sshpam_cleanup(void)
|
|||
static int
|
||||
sshpam_init(Authctxt *authctxt)
|
||||
{
|
||||
extern char *__progname;
|
||||
const char *pam_rhost, *pam_user, *user = authctxt->user;
|
||||
const char **ptr_pam_user = &pam_user;
|
||||
struct ssh *ssh = active_state; /* XXX */
|
||||
|
|
|
@ -27,10 +27,6 @@
|
|||
#include "includes.h"
|
||||
#ifdef USE_PAM
|
||||
|
||||
#if !defined(SSHD_PAM_SERVICE)
|
||||
# define SSHD_PAM_SERVICE __progname
|
||||
#endif
|
||||
|
||||
void start_pam(Authctxt *);
|
||||
void finish_pam(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
|
||||
if test "x$PAM_MSG" = "xyes" ; then
|
||||
# Check PAM strerror arguments (old PAM)
|
||||
|
|
Загрузка…
Ссылка в новой задаче