check for ruserok existence

rlogin support is old school code, so newer C libraries drop support for
ruserok (like uClibc, optionally).  But shadow doesn't build with that,
so have it check for ruserok to optionally enable rlogin.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2013-08-07 01:44:24 +02:00 committed by Nicolas François
parent cfad7327a5
commit 561ba96ec7
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2013-08-07 Mike Frysinger <vapier@gentoo.org>
* configure.in: Check at configure time whether libc supports
ruserok (support dropped by newer C libraries).
2013-08-07 Nicolas François <nicolas.francois@centraliens.net>
* man/usermod.8.xml: Fix typos and wording.

View File

@ -41,7 +41,8 @@ AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])])
AC_CHECK_FUNCS(l64a fchmod fchown fsync futimes getgroups gethostname getspnam \
gettimeofday getusershell getutent initgroups lchown lckpwdf lstat \
lutimes memcpy memset setgroups sigaction strchr updwtmp updwtmpx innetgr \
getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r getaddrinfo)
getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r getaddrinfo
ruserok)
AC_SYS_LARGEFILE
dnl Checks for typedefs, structures, and compiler characteristics.
@ -194,8 +195,10 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd",
dnl XXX - quick hack, should disappear before anyone notices :).
AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().])
if test "$ac_cv_func_ruserok" = "yes"; then
AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.])
AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).])
fi
AC_ARG_ENABLE(shadowgrp,
[AC_HELP_STRING([--enable-shadowgrp], [enable shadow group support @<:@default=yes@:>@])],