]> granicus.if.org Git - shadow/commitdiff
check for ruserok existence
authorMike Frysinger <vapier@gentoo.org>
Tue, 6 Aug 2013 23:44:24 +0000 (01:44 +0200)
committerNicolas François <nicolas.francois@centraliens.net>
Tue, 6 Aug 2013 23:44:24 +0000 (01:44 +0200)
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>
ChangeLog
configure.in

index f3ee8ad3d5df2c35519a6617e1c3c16ee8a14045..57953a93becaf9cb40c0ca24f0641761a09a3f77 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 29c397272fb08553fe970835d02cc3ecdc61a12e..dcfffd36e8e0e5c83de31f098a3f57c683bf0130 100644 (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().])
-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).])
+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@:>@])],