diff --git a/ChangeLog b/ChangeLog index 8ec009a0..f8754919 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-04-27 Nicolas François + + * NEWS, configure.in: Added configure option --enable-utmpx, + disabled by default. This defines USE_UTMPX, which should be used + instead of HAVE_UTMPX_H. + 2009-04-27 Nicolas François * man/po/fr.po: Fix typo. diff --git a/NEWS b/NEWS index 54a7ae2c..fc58aa27 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ shadow-4.1.3.1 -> shadow-4.1.3.2 UNRELEASED - packaging * Enable --enable-account-tools-setuid by default for PAM builds. + * Added configure option --enable-utmpx, disabled by default to mimic + the previous behavior on Linux (where utmp and utmpx are identical). - login * Do not trust the current utmp entry's ut_line to set PAM_TTY. This could lead to DOS attacks. diff --git a/configure.in b/configure.in index 46d37f90..dca1cf0d 100644 --- a/configure.in +++ b/configure.in @@ -212,7 +212,7 @@ AC_ARG_ENABLE(man, [AC_HELP_STRING([--enable-man], [regenerate roff man pages from Docbook @<:@default=no@:>@])], [enable_man="${enableval}"], - [enable_man=no] + [enable_man="no"] ) AC_ARG_ENABLE(account-tools-setuid, @@ -227,6 +227,17 @@ AC_ARG_ENABLE(account-tools-setuid, [enable_acct_tools_setuid="maybe"] ) +AC_ARG_ENABLE(utmpx, + [AC_HELP_STRING([--enable-utmpx], + [enable loggin in utmpx / wtmpx @<:@default=no@:>@])], + [case "${enableval}" in + yes) enable_utmpx="yes" ;; + no) enable_utmpx="no" ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-utmpx) ;; + esac], + [enable_utmpx="no"] +) + AC_ARG_WITH(audit, [AC_HELP_STRING([--with-audit], [use auditing support @<:@default=yes if found@:>@])], [with_audit=$withval], [with_audit=maybe]) @@ -470,6 +481,15 @@ if test "$with_skey" = "yes"; then ],[AC_DEFINE(SKEY_BSD_STYLE, 1, [Define to support newer BSD S/Key API])]) fi +if test "$enable_utmpx" = "yes"; then + if test "$ac_cv_header_utmpx_h" != "yes"; then + AC_MSG_ERROR([The utmpx.h header file is required for utmpx support.]) + fi + AC_DEFINE(USE_UTMPX, + 1, + [Define if utmpx should be used]) +fi + AM_GNU_GETTEXT_VERSION(0.16) AM_GNU_GETTEXT([external], [need-ngettext]) AM_CONDITIONAL(USE_NLS, test "x$USE_NLS" = "xyes")