python-werkzeug: bump to version 0.11.15
[buildroot-gz.git] / package / linux-pam / 0002-Conditionally-compile-per-ruserok-availability.patch
blobcec642d8458e0eb9fde3f8bf238778939425f6bc
1 ruserok is not available/functional in uclibc, provide conditions
2 for compilation where needed.
4 Patch originally by Dmitry Golubovsky <golubovsky@gmail.com> -
5 porting to linux-pam 1.2.1.
7 Signed-off-by: Brendan Heading <brendanheading@gmail.com>
9 Upstream-status: pending
11 ---
12 configure.ac | 2 +-
13 modules/pam_rhosts/pam_rhosts.c | 6 +++++-
14 2 files changed, 6 insertions(+), 2 deletions(-)
16 diff --git a/configure.ac b/configure.ac
17 index 08e4530..fd2fd23 100644
18 --- a/configure.ac
19 +++ b/configure.ac
20 @@ -542,7 +542,7 @@ AC_CHECK_FUNCS(fseeko getdomainname gethostname gettimeofday lckpwdf mkdir selec
21 AC_CHECK_FUNCS(strcspn strdup strspn strstr strtol uname)
22 AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r)
23 AC_CHECK_FUNCS(getgrouplist getline getdelim)
24 -AC_CHECK_FUNCS(inet_ntop inet_pton innetgr ruserok_af)
25 +AC_CHECK_FUNCS(inet_ntop inet_pton innetgr ruserok_af ruserok)
27 AC_CHECK_FUNCS(unshare, [UNSHARE=yes], [UNSHARE=no])
28 AM_CONDITIONAL([HAVE_UNSHARE], [test "$UNSHARE" = yes])
29 diff --git a/modules/pam_rhosts/pam_rhosts.c b/modules/pam_rhosts/pam_rhosts.c
30 index bc9e76f..909db29 100644
31 --- a/modules/pam_rhosts/pam_rhosts.c
32 +++ b/modules/pam_rhosts/pam_rhosts.c
33 @@ -114,8 +114,12 @@ int pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc,
34 #ifdef HAVE_RUSEROK_AF
35 retval = ruserok_af (rhost, as_root, ruser, luser, PF_UNSPEC);
36 #else
37 + #ifdef HAVE_RUSEROK
38 retval = ruserok (rhost, as_root, ruser, luser);
39 -#endif
40 + #else
41 + retval = -1;
42 + #endif /* HAVE_RUSEROK */
43 +#endif /*HAVE_RUSEROK_AF */
44 if (retval != 0) {
45 if (!opt_silent || opt_debug)
46 pam_syslog(pamh, LOG_WARNING, "denied access to %s@%s as %s",
47 --
48 2.4.3