[packages] add the shadow suite, provides useradd, usermod, userdel, groupadd, groupm...
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 6 Nov 2010 14:44:15 +0000 (14:44 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 6 Nov 2010 14:44:15 +0000 (14:44 +0000)
SVN-Revision: 23893

utils/shadow/patches/001-fix-malloc-prototype.path [new file with mode: 0644]
utils/shadow/patches/002-disable-nis-lookup.patch [new file with mode: 0644]

diff --git a/utils/shadow/patches/001-fix-malloc-prototype.path b/utils/shadow/patches/001-fix-malloc-prototype.path
new file mode 100644 (file)
index 0000000..637e86d
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/libmisc/xmalloc.c
++++ b/libmisc/xmalloc.c
+@@ -16,7 +16,7 @@ RCSID("$Id: xmalloc.c,v 1.3 1998/12/28 2
+ #include "defines.h"
+-extern char *malloc();
++extern void *malloc(size_t size);
+ char *
+ xmalloc(size_t size)
diff --git a/utils/shadow/patches/002-disable-nis-lookup.patch b/utils/shadow/patches/002-disable-nis-lookup.patch
new file mode 100644 (file)
index 0000000..1383e0e
--- /dev/null
@@ -0,0 +1,41 @@
+--- a/libmisc/login_access.c
++++ b/libmisc/login_access.c
+@@ -53,7 +53,6 @@ RCSID("$Id: login_access.c,v 1.6 1998/01
+ #include <arpa/inet.h>  /* for inet_ntoa() */
+ extern struct group *getgrnam();
+-extern int innetgr();
+ #if 0  /* should be defined by <errno.h> */
+ extern int errno;
+ #endif
+@@ -193,29 +192,7 @@ myhostname(void)
+ static int
+ netgroup_match(const char *group, const char *machine, const char *user)
+ {
+-#if 0  /* original code */
+-#ifdef NIS
+-    static char *mydomain = 0;
+-
+-    if (mydomain == 0)
+-      yp_get_default_domain(&mydomain);
+-    return (innetgr(group, machine, user, mydomain));
+-#else
+-    syslog(LOG_ERR, "NIS netgroup support not configured");
+-    return (NO);
+-#endif
+-#else  /* works better with glibc? */
+-      static char *mydomain = 0;
+-
+-      if (mydomain == 0) {
+-              static char domain[MAXHOSTNAMELEN+1];
+-
+-              getdomainname(domain, MAXHOSTNAMELEN);
+-              mydomain = domain;
+-      }
+-
+-      return innetgr(group, machine, user, mydomain);
+-#endif
++      return (NO);
+ }
+ /* user_match - match a username against one token */