From: Jo-Philipp Wich Date: Tue, 22 Feb 2011 11:17:05 +0000 (+0000) Subject: [packages] shadow: reorder patches, prevent dependency on librpc X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e7c604d32cc98ed72570d7f704c66dab34d66bac;p=openwrt%2Fsvn-archive%2Farchive.git [packages] shadow: reorder patches, prevent dependency on librpc SVN-Revision: 25657 --- diff --git a/utils/shadow/patches/001-cross-compile.patch b/utils/shadow/patches/001-cross-compile.patch new file mode 100644 index 0000000000..8613976760 --- /dev/null +++ b/utils/shadow/patches/001-cross-compile.patch @@ -0,0 +1,131 @@ +--- a/configure.in ++++ b/configure.in +@@ -135,67 +135,26 @@ ac_cv_libc_shadowgrp=yes,ac_cv_libc_shad + if test "$ac_cv_libc_shadowgrp" = "yes"; then + AC_DEFINE(HAVE_SHADOWGRP) + fi +-fi + +-AC_MSG_CHECKING(location of shared mail directory) +-for maildir in /var/spool/mail /var/mail /usr/spool/mail /usr/mail NONE; do +- if test "$maildir" = "NONE"; then +- AC_MSG_RESULT(None) +- elif test -d $maildir; then +- AC_DEFINE_UNQUOTED(MAIL_SPOOL_DIR, "$maildir") +- AC_MSG_RESULT($maildir) +- break +- fi +-done +- +-AC_MSG_CHECKING(location of user mail file) +-for mailfile in Mailbox mailbox Mail mail .mail NONE; do +- if test "$mailfile" = "NONE"; then +- AC_MSG_RESULT(None) +- elif test -f $HOME/$mailfile; then +- AC_DEFINE_UNQUOTED(MAIL_SPOOL_FILE, "$mailfile") +- AC_MSG_RESULT($mailfile) +- break +- fi +-done +- +-AC_MSG_CHECKING(location of utmp) +-for utmpdir in /var/run /var/adm /usr/adm /etc NONE; do +- if test "$utmpdir" = "NONE"; then +- AC_MSG_WARN(utmp file not found) +- elif test -f $utmpdir/utmp; then +- AC_DEFINE_UNQUOTED(_UTMP_FILE, "$utmpdir/utmp") +- AC_MSG_RESULT($utmpdir) +- break +- fi +-done +- +-AC_MSG_CHECKING(location of faillog/lastlog/wtmp) +-for logdir in /var/log /var/adm /usr/adm /etc; do +- if test -d $logdir; then +- AC_DEFINE_UNQUOTED(_WTMP_FILE, "$logdir/wtmp") +- AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$logdir/lastlog") +- AC_DEFINE_UNQUOTED(FAILLOG_FILE, "$logdir/faillog") +- AC_MSG_RESULT($logdir) +- break +- fi +-done +- +-AC_MSG_CHECKING(location of the passwd program) +-if test -f /usr/bin/passwd; then +- passwd_dir=/usr/bin +-else +- passwd_dir=/bin ++AC_CACHE_CHECK(for shadow password support, ++ac_cv_shadow_support, AC_TRY_COMPILE([#include ], ++[ struct spwd *spw = getspnam("root"); ], ++ac_cv_shadow_support=yes, ac_cv_shadow_support=no)) ++ ++if test "$ac_cv_shadow_support" = "yes"; then ++ AC_DEFINE(SHADOWPWD) ++fi + fi +-AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$passwd_dir/passwd") +-AC_MSG_RESULT($passwd_dir) + + dnl XXX - quick hack, should disappear before anyone notices :). +-AC_DEFINE(SHADOWPWD) + AC_DEFINE(USG) + AC_DEFINE(USE_SYSLOG) + AC_DEFINE(RLOGIN) + AC_DEFINE(RUSEROK, 0) ++AC_DEFINE_UNQUOTED(_WTMP_FILE, "/var/log/wtmp") ++AC_DEFINE_UNQUOTED(LASTLOG_FILE, "/var/log/lastlog") ++AC_DEFINE_UNQUOTED(FAILLOG_FILE, "/var/log/faillog") ++AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "/usr/bin/passwd") + + dnl Use our own version of getpass(), which handles long passwords + dnl (unlike many systems which have a limit of 8 characters), and can +@@ -282,25 +241,8 @@ else + AC_MSG_RESULT(yes) + fi + +-ALL_LINGUAS="cs de el fr ja ko pl sv uk" +-AM_GNU_GETTEXT +- + AC_OUTPUT([ + Makefile +- intl/Makefile +- po/Makefile.in +- doc/Makefile +- man/Makefile +- man/cs/Makefile +- man/de/Makefile +- man/fr/Makefile +- man/hu/Makefile +- man/id/Makefile +- man/it/Makefile +- man/ja/Makefile +- man/ko/Makefile +- man/pl/Makefile +- man/pt_BR/Makefile + libmisc/Makefile + lib/Makefile + src/Makefile +--- a/Makefile.in ++++ b/Makefile.in +@@ -111,8 +111,8 @@ EXTRA_DIST = NEWS README TODO shadow.spe + + AUTOMAKE_OPTIONS = 1.5 dist-bzip2 foreign + +-SUBDIRS = intl po man libmisc lib src \ +- contrib debian doc etc ++SUBDIRS = libmisc lib src \ ++ contrib debian etc + + subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +--- a/Makefile.am ++++ b/Makefile.am +@@ -4,5 +4,5 @@ EXTRA_DIST = NEWS README TODO shadow.spe + + AUTOMAKE_OPTIONS = 1.5 dist-bzip2 foreign + +-SUBDIRS = intl po man libmisc lib src \ +- contrib debian doc etc ++SUBDIRS = libmisc lib src \ ++ contrib debian etc diff --git a/utils/shadow/patches/001-fix-malloc-prototype.path b/utils/shadow/patches/001-fix-malloc-prototype.path deleted file mode 100644 index 637e86d510..0000000000 --- a/utils/shadow/patches/001-fix-malloc-prototype.path +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 deleted file mode 100644 index 1383e0e2ee..0000000000 --- a/utils/shadow/patches/002-disable-nis-lookup.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- 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 /* for inet_ntoa() */ - - extern struct group *getgrnam(); --extern int innetgr(); - #if 0 /* should be defined by */ - 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 */ diff --git a/utils/shadow/patches/002-fix-malloc-prototype.patch b/utils/shadow/patches/002-fix-malloc-prototype.patch new file mode 100644 index 0000000000..637e86d510 --- /dev/null +++ b/utils/shadow/patches/002-fix-malloc-prototype.patch @@ -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/003-cross-compile.patch b/utils/shadow/patches/003-cross-compile.patch deleted file mode 100644 index 8613976760..0000000000 --- a/utils/shadow/patches/003-cross-compile.patch +++ /dev/null @@ -1,131 +0,0 @@ ---- a/configure.in -+++ b/configure.in -@@ -135,67 +135,26 @@ ac_cv_libc_shadowgrp=yes,ac_cv_libc_shad - if test "$ac_cv_libc_shadowgrp" = "yes"; then - AC_DEFINE(HAVE_SHADOWGRP) - fi --fi - --AC_MSG_CHECKING(location of shared mail directory) --for maildir in /var/spool/mail /var/mail /usr/spool/mail /usr/mail NONE; do -- if test "$maildir" = "NONE"; then -- AC_MSG_RESULT(None) -- elif test -d $maildir; then -- AC_DEFINE_UNQUOTED(MAIL_SPOOL_DIR, "$maildir") -- AC_MSG_RESULT($maildir) -- break -- fi --done -- --AC_MSG_CHECKING(location of user mail file) --for mailfile in Mailbox mailbox Mail mail .mail NONE; do -- if test "$mailfile" = "NONE"; then -- AC_MSG_RESULT(None) -- elif test -f $HOME/$mailfile; then -- AC_DEFINE_UNQUOTED(MAIL_SPOOL_FILE, "$mailfile") -- AC_MSG_RESULT($mailfile) -- break -- fi --done -- --AC_MSG_CHECKING(location of utmp) --for utmpdir in /var/run /var/adm /usr/adm /etc NONE; do -- if test "$utmpdir" = "NONE"; then -- AC_MSG_WARN(utmp file not found) -- elif test -f $utmpdir/utmp; then -- AC_DEFINE_UNQUOTED(_UTMP_FILE, "$utmpdir/utmp") -- AC_MSG_RESULT($utmpdir) -- break -- fi --done -- --AC_MSG_CHECKING(location of faillog/lastlog/wtmp) --for logdir in /var/log /var/adm /usr/adm /etc; do -- if test -d $logdir; then -- AC_DEFINE_UNQUOTED(_WTMP_FILE, "$logdir/wtmp") -- AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$logdir/lastlog") -- AC_DEFINE_UNQUOTED(FAILLOG_FILE, "$logdir/faillog") -- AC_MSG_RESULT($logdir) -- break -- fi --done -- --AC_MSG_CHECKING(location of the passwd program) --if test -f /usr/bin/passwd; then -- passwd_dir=/usr/bin --else -- passwd_dir=/bin -+AC_CACHE_CHECK(for shadow password support, -+ac_cv_shadow_support, AC_TRY_COMPILE([#include ], -+[ struct spwd *spw = getspnam("root"); ], -+ac_cv_shadow_support=yes, ac_cv_shadow_support=no)) -+ -+if test "$ac_cv_shadow_support" = "yes"; then -+ AC_DEFINE(SHADOWPWD) -+fi - fi --AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$passwd_dir/passwd") --AC_MSG_RESULT($passwd_dir) - - dnl XXX - quick hack, should disappear before anyone notices :). --AC_DEFINE(SHADOWPWD) - AC_DEFINE(USG) - AC_DEFINE(USE_SYSLOG) - AC_DEFINE(RLOGIN) - AC_DEFINE(RUSEROK, 0) -+AC_DEFINE_UNQUOTED(_WTMP_FILE, "/var/log/wtmp") -+AC_DEFINE_UNQUOTED(LASTLOG_FILE, "/var/log/lastlog") -+AC_DEFINE_UNQUOTED(FAILLOG_FILE, "/var/log/faillog") -+AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "/usr/bin/passwd") - - dnl Use our own version of getpass(), which handles long passwords - dnl (unlike many systems which have a limit of 8 characters), and can -@@ -282,25 +241,8 @@ else - AC_MSG_RESULT(yes) - fi - --ALL_LINGUAS="cs de el fr ja ko pl sv uk" --AM_GNU_GETTEXT -- - AC_OUTPUT([ - Makefile -- intl/Makefile -- po/Makefile.in -- doc/Makefile -- man/Makefile -- man/cs/Makefile -- man/de/Makefile -- man/fr/Makefile -- man/hu/Makefile -- man/id/Makefile -- man/it/Makefile -- man/ja/Makefile -- man/ko/Makefile -- man/pl/Makefile -- man/pt_BR/Makefile - libmisc/Makefile - lib/Makefile - src/Makefile ---- a/Makefile.in -+++ b/Makefile.in -@@ -111,8 +111,8 @@ EXTRA_DIST = NEWS README TODO shadow.spe - - AUTOMAKE_OPTIONS = 1.5 dist-bzip2 foreign - --SUBDIRS = intl po man libmisc lib src \ -- contrib debian doc etc -+SUBDIRS = libmisc lib src \ -+ contrib debian etc - - subdir = . - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ---- a/Makefile.am -+++ b/Makefile.am -@@ -4,5 +4,5 @@ EXTRA_DIST = NEWS README TODO shadow.spe - - AUTOMAKE_OPTIONS = 1.5 dist-bzip2 foreign - --SUBDIRS = intl po man libmisc lib src \ -- contrib debian doc etc -+SUBDIRS = libmisc lib src \ -+ contrib debian etc diff --git a/utils/shadow/patches/003-disable-nis-lookup.patch b/utils/shadow/patches/003-disable-nis-lookup.patch new file mode 100644 index 0000000000..1383e0e2ee --- /dev/null +++ b/utils/shadow/patches/003-disable-nis-lookup.patch @@ -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 /* for inet_ntoa() */ + + extern struct group *getgrnam(); +-extern int innetgr(); + #if 0 /* should be defined by */ + 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 */ diff --git a/utils/shadow/patches/004-disable-ruser-lookup.patch b/utils/shadow/patches/004-disable-ruser-lookup.patch new file mode 100644 index 0000000000..a59034cce7 --- /dev/null +++ b/utils/shadow/patches/004-disable-ruser-lookup.patch @@ -0,0 +1,21 @@ +--- a/configure ++++ b/configure +@@ -9192,7 +9192,7 @@ cat >>confdefs.h <<\EOF + EOF + + cat >>confdefs.h <<\EOF +-#define RUSEROK 0 ++/* #define RUSEROK 1 */ + EOF + + cat >>confdefs.h <<\EOF +--- a/configure.in ++++ b/configure.in +@@ -150,7 +150,6 @@ dnl XXX - quick hack, should disappear b + AC_DEFINE(USG) + AC_DEFINE(USE_SYSLOG) + AC_DEFINE(RLOGIN) +-AC_DEFINE(RUSEROK, 0) + AC_DEFINE_UNQUOTED(_WTMP_FILE, "/var/log/wtmp") + AC_DEFINE_UNQUOTED(LASTLOG_FILE, "/var/log/lastlog") + AC_DEFINE_UNQUOTED(FAILLOG_FILE, "/var/log/faillog")