summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2004-01-02 18:01:30 +1100
committerDamien Miller <djm@mindrot.org>2004-01-02 18:01:30 +1100
commit0f47c53742a31b9682c05660dd8de1e860fb1fc5 (patch)
tree7ca6b79f339d5de9bd0ab6d7fe859b64dc0a5ab6
parentc8ec16651ea05e160f5dd51dc70f0db946ee2761 (diff)
- (djm) OSX/Darwin put the PAM headers in a different place, detect this.
Report from jakob@
-rw-r--r--ChangeLog4
-rw-r--r--auth-pam.c6
-rw-r--r--configure.ac11
-rw-r--r--includes.h4
4 files changed, 20 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 95f3dcf2..0248a630 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
- (djm) OSX/Darwin needs BIND_8_COMPAT to build getrrsetbyname. Report from
jakob@
- (djm) Remove useless DNS support configure summary message. from jakob@
+ - (djm) OSX/Darwin put the PAM headers in a different place, detect this.
+ Report from jakob@
20031231
- (dtucker) OpenBSD CVS Sync
@@ -1642,4 +1644,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
-$Id: ChangeLog,v 1.3160 2004/01/02 06:53:04 djm Exp $
+$Id: ChangeLog,v 1.3161 2004/01/02 07:01:30 djm Exp $
diff --git a/auth-pam.c b/auth-pam.c
index 9edf2c54..31e1999f 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -31,10 +31,14 @@
/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */
#include "includes.h"
-RCSID("$Id: auth-pam.c,v 1.86 2003/12/18 05:08:59 dtucker Exp $");
+RCSID("$Id: auth-pam.c,v 1.87 2004/01/02 07:01:31 djm Exp $");
#ifdef USE_PAM
+#if defined(HAVE_SECURITY_PAM_APPL_H)
#include <security/pam_appl.h>
+#elif defined (HAVE_PAM_PAM_APPL_H)
+#include <pam/pam_appl.h>
+#endif
#include "auth.h"
#include "auth-pam.h"
diff --git a/configure.ac b/configure.ac
index dc81dafe..9127489d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.181 2004/01/02 06:53:04 djm Exp $
+# $Id: configure.ac,v 1.182 2004/01/02 07:01:31 djm Exp $
AC_INIT
AC_CONFIG_SRCDIR([ssh.c])
@@ -499,7 +499,7 @@ int main(){exit(0);}
AC_CHECK_HEADERS(bstring.h crypt.h endian.h features.h floatingpoint.h \
getopt.h glob.h ia.h lastlog.h limits.h login.h \
login_cap.h maillock.h netdb.h netgroup.h \
- netinet/in_systm.h paths.h pty.h readpassphrase.h \
+ netinet/in_systm.h pam/pam_appl.h paths.h pty.h readpassphrase.h \
rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
strings.h sys/strtio.h sys/audit.h sys/bitypes.h sys/bsdtty.h \
sys/cdefs.h sys/mman.h sys/pstat.h sys/select.h sys/stat.h \
@@ -929,7 +929,8 @@ AC_ARG_WITH(pam,
[ --with-pam Enable PAM support ],
[
if test "x$withval" != "xno" ; then
- if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
+ if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
+ test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
AC_MSG_ERROR([PAM headers not found])
fi
@@ -958,7 +959,11 @@ if test "x$PAM_MSG" = "xyes" ; then
AC_TRY_COMPILE(
[
#include <stdlib.h>
+#if defined(HAVE_SECURITY_PAM_APPL_H)
#include <security/pam_appl.h>
+#elif defined (HAVE_PAM_PAM_APPL_H)
+#include <pam/pam_appl.h>
+#endif
],
[(void)pam_strerror((pam_handle_t *)NULL, -1);],
[AC_MSG_RESULT(no)],
diff --git a/includes.h b/includes.h
index 033cd91f..ac9a950e 100644
--- a/includes.h
+++ b/includes.h
@@ -147,7 +147,11 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
# include <rpc/types.h> /* For INADDR_LOOPBACK */
#endif
#ifdef USE_PAM
+#if defined(HAVE_SECURITY_PAM_APPL_H)
# include <security/pam_appl.h>
+#elif defined (HAVE_PAM_PAM_APPL_H)
+# include <pam/pam_appl.h>
+#endif
#endif
#ifdef HAVE_READPASSPHRASE_H
# include <readpassphrase.h>