[Pkg-shadow-devel] [PATCH] check for ruserok existence
Mike Frysinger
vapier at gentoo.org
Sat Jul 7 03:11:52 UTC 2012
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 at gentoo.org>
---
configure.in | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/configure.in b/configure.in
index da04a81..ab2783b 100644
--- a/configure.in
+++ b/configure.in
@@ -41,7 +41,7 @@ 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 +194,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@:>@])],
--
1.7.9.7
More information about the Pkg-shadow-devel
mailing list