summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2008-11-30 17:13:58 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2008-11-30 17:13:58 +0000
commitca0f93a7e6a1b3e0d2d94b658d84e9b34b17577b (patch)
tree481dd673248afe333a9ab5c512f3d8d691507da6
parent45077949c9aa2aa05ba190738ae8616c1ec16950 (diff)
Relevant BUGIDs:
Purpose of commit: bugfix Commit summary: --------------- 2008-11-29 Thorsten Kukuk <kukuk@thkukuk.de> * configure.in: Check for xcrypt.h, fix typo in libaudit check. * modules/pam_cracklib/pam_cracklib.c: Include xcrypt.h if available. * modules/pam_unix/bigcrypt.c: Likewise. * modules/pam_unix/passverify.c: Likewise. * modules/pam_userdb/pam_userdb.c: Likewise. Patch from Diego Flameeyes Pettenò <flameeyes@gmail.com>
-rw-r--r--ChangeLog8
-rw-r--r--configure.in8
-rw-r--r--modules/pam_cracklib/pam_cracklib.c4
-rw-r--r--modules/pam_unix/bigcrypt.c4
-rw-r--r--modules/pam_unix/passverify.c4
-rw-r--r--modules/pam_userdb/pam_userdb.c4
6 files changed, 25 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 43329736..3c055f91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2008-11-29 Thorsten Kukuk <kukuk@thkukuk.de>
+ * configure.in: Check for xcrypt.h, fix typo in libaudit check.
+ * modules/pam_cracklib/pam_cracklib.c: Include xcrypt.h if
+ available.
+ * modules/pam_unix/bigcrypt.c: Likewise.
+ * modules/pam_unix/passverify.c: Likewise.
+ * modules/pam_userdb/pam_userdb.c: Likewise.
+ Patch from Diego Flameeyes Pettenò <flameeyes@gmail.com>
+
* doc/man/pam_getenv.3.xml: Document that application should
not free return value.
diff --git a/configure.in b/configure.in
index b220a9a2..e16bd44f 100644
--- a/configure.in
+++ b/configure.in
@@ -347,7 +347,7 @@ if test x"$WITH_LIBAUDIT" != xno ; then
[HAVE_AUDIT_TTY_STATUS=""],
[#include <libaudit.h>])]
)
- if test ! -z "$LIBAUDIT" -a "ac_cv_header_libaudit_h" != "no" ; then
+ if test ! -z "$LIBAUDIT" -a "$ac_cv_header_libaudit_h" != "no" ; then
AC_DEFINE([HAVE_LIBAUDIT], 1, [Define to 1 if audit support should be compiled in.])
fi
if test ! -z "$HAVE_AUDIT_TTY_STATUS" ; then
@@ -360,11 +360,15 @@ AC_SUBST(LIBAUDIT)
AM_CONDITIONAL([HAVE_AUDIT_TTY_STATUS],
[test "x$HAVE_AUDIT_TTY_STATUS" = xyes])
+AC_CHECK_HEADERS(xcrypt.h crypt.h)
BACKUP_LIBS=$LIBS
AC_SEARCH_LIBS([crypt],[xcrypt crypt], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
AC_CHECK_FUNCS(crypt_r)
LIBS=$BACKUP_LIBS
AC_SUBST(LIBCRYPT)
+if test "$LIBCRYPT" = "-lxcrypt" -a "$ac_cv_header_xcrypt_h" = "yes" ; then
+ AC_DEFINE([HAVE_LIBXCRYPT], 1, [Define to 1 if xcrypt support should be compiled in.])
+fi
AC_ARG_WITH([randomdev], AS_HELP_STRING([--with-randomdev=(<path>|yes|no)],[use specified random device instead of /dev/urandom or 'no' to disable]), opt_randomdev=$withval)
if test "$opt_randomdev" = yes -o -z "$opt_randomdev"; then
@@ -433,8 +437,6 @@ AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/file.h sys/ioctl.h sys/time.h syslog.h net/if.h termio.h unistd.h sys/fsuid.h inittypes.h)
-AC_CHECK_HEADERS(crypt.h)
-
dnl For module/pam_lastlog
AC_CHECK_HEADERS(lastlog.h utmp.h utmpx.h)
diff --git a/modules/pam_cracklib/pam_cracklib.c b/modules/pam_cracklib/pam_cracklib.c
index b94f8596..4b2052fc 100644
--- a/modules/pam_cracklib/pam_cracklib.c
+++ b/modules/pam_cracklib/pam_cracklib.c
@@ -37,7 +37,9 @@
#include "config.h"
#include <stdio.h>
-#ifdef HAVE_CRYPT_H
+#ifdef HAVE_LIBXCRYPT
+# include <xcrypt.h>
+#elif defined(HAVE_CRYPT_H)
# include <crypt.h>
#endif
#include <unistd.h>
diff --git a/modules/pam_unix/bigcrypt.c b/modules/pam_unix/bigcrypt.c
index 9cd55384..9922d177 100644
--- a/modules/pam_unix/bigcrypt.c
+++ b/modules/pam_unix/bigcrypt.c
@@ -29,7 +29,9 @@
#include <string.h>
#include <stdlib.h>
#include <security/_pam_macros.h>
-#ifdef HAVE_CRYPT_H
+#ifdef HAVE_LIBXCRYPT
+#include <xcrypt.h>
+#elif defined(HAVE_CRYPT_H)
#include <crypt.h>
#endif
diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c
index 0f58b019..eae1e24c 100644
--- a/modules/pam_unix/passverify.c
+++ b/modules/pam_unix/passverify.c
@@ -19,7 +19,9 @@
#include <sys/time.h>
#include <sys/stat.h>
#include <fcntl.h>
-#ifdef HAVE_CRYPT_H
+#ifdef HAVE_LIBXCRYPT
+#include <xcrypt.h>
+#elif defined(HAVE_CRYPT_H)
#include <crypt.h>
#endif
diff --git a/modules/pam_userdb/pam_userdb.c b/modules/pam_userdb/pam_userdb.c
index a796b15e..2d39123b 100644
--- a/modules/pam_userdb/pam_userdb.c
+++ b/modules/pam_userdb/pam_userdb.c
@@ -17,7 +17,9 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
-#ifdef HAVE_CRYPT_H
+#ifdef HAVE_LIBXCRYPT
+#include <xcrypt.h>
+#elif defined(HAVE_CRYPT_H)
#include <crypt.h>
#endif