[openssh-commits] [openssh] 02/02: add --with-pam-service to specify PAM service name
git+noreply at mindrot.org
git+noreply at mindrot.org
Tue Aug 16 13:37:30 AEST 2016
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 8bd81e1596ab1bab355146cb65e82fb96ade3b23
Author: Damien Miller <djm at mindrot.org>
Date: Tue Aug 16 13:30:56 2016 +1000
add --with-pam-service to specify PAM service name
Saves messing around with CFLAGS to do it.
---
auth-pam.c | 6 +++++-
auth-pam.h | 4 ----
configure.ac | 11 +++++++++++
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/auth-pam.c b/auth-pam.c
index 348fe37..7a14c89 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -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 */
diff --git a/auth-pam.h b/auth-pam.h
index 2e9a0c0..58a257a 100644
--- a/auth-pam.h
+++ b/auth-pam.h
@@ -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);
diff --git a/configure.ac b/configure.ac
index e083747..1f1941a 100644
--- a/configure.ac
+++ b/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)
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list