• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/linux-pam/0002-Conditionally-compile-per-ruserok-availability.patch
Brendan HeadingBrendan Heading committed 2bf63505eb723 Aug 2015
Raw file
Source viewDiff to previous
 
1
ruserok is not available/functional in uclibc, provide conditions
2
for compilation where needed.
3
​
4
Patch originally by Dmitry Golubovsky <golubovsky@gmail.com> -
5
porting to linux-pam 1.2.1.
6
​
7
Signed-off-by: Brendan Heading <brendanheading@gmail.com>
8
​
9
Upstream-status: pending
10
​
11
---
12
 configure.ac                    | 2 +-
13
 modules/pam_rhosts/pam_rhosts.c | 6 +++++-
14
 2 files changed, 6 insertions(+), 2 deletions(-)
15
​
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)
26
 
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
49
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.