summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2005-08-03 18:57:22 +0000
committerMartin Schlemmer <azarah@gentoo.org>2005-08-03 18:57:22 +0000
commitf80abd026357d16628151c1b9381af435479508e (patch)
tree896d1640b5e02ab94e5164990729db99bc31b47d /sys-apps/shadow/files
parentStable on alpha. (diff)
downloadgentoo-2-f80abd026357d16628151c1b9381af435479508e.tar.gz
gentoo-2-f80abd026357d16628151c1b9381af435479508e.tar.bz2
gentoo-2-f80abd026357d16628151c1b9381af435479508e.zip
Checked with upstream .. SUPATH and PATH valid again for PAM (bug #101047).
Fix building on UCLIBC. (Portage version: 2.0.51.22-r2)
Diffstat (limited to 'sys-apps/shadow/files')
-rw-r--r--sys-apps/shadow/files/digest-shadow-4.0.11.1-r11
-rw-r--r--sys-apps/shadow/files/shadow-4.0.11.1-SUPATH.patch45
-rw-r--r--sys-apps/shadow/files/shadow-4.0.11.1-ngettext.patch28
-rw-r--r--sys-apps/shadow/files/shadow-4.0.11.1-uclibc-missing-l64a.patch64
4 files changed, 138 insertions, 0 deletions
diff --git a/sys-apps/shadow/files/digest-shadow-4.0.11.1-r1 b/sys-apps/shadow/files/digest-shadow-4.0.11.1-r1
new file mode 100644
index 000000000000..797d6633880d
--- /dev/null
+++ b/sys-apps/shadow/files/digest-shadow-4.0.11.1-r1
@@ -0,0 +1 @@
+MD5 e60b7b16128b9e00576073389a0ff1e6 shadow-4.0.11.1.tar.bz2 1056103
diff --git a/sys-apps/shadow/files/shadow-4.0.11.1-SUPATH.patch b/sys-apps/shadow/files/shadow-4.0.11.1-SUPATH.patch
new file mode 100644
index 000000000000..7cbb8b73f8c2
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.0.11.1-SUPATH.patch
@@ -0,0 +1,45 @@
+diff -urp shadow-4.0.11.1/lib/getdef.c shadow-4.0.11.1.az/lib/getdef.c
+--- shadow-4.0.11.1/lib/getdef.c 2005-07-12 20:54:39.000000000 +0200
++++ shadow-4.0.11.1.az/lib/getdef.c 2005-08-03 20:35:10.000000000 +0200
+@@ -61,9 +61,7 @@ static struct itemdef def_table[] = {
+ {"CHSH_AUTH", NULL},
+ {"CRACKLIB_DICTPATH", NULL},
+ {"ENV_HZ", NULL},
+- {"ENV_PATH", NULL},
+ {"ENV_ROOTPATH", NULL}, /* SuSE compatibility? */
+- {"ENV_SUPATH", NULL},
+ {"ENV_TZ", NULL},
+ {"ENVIRON_FILE", NULL},
+ {"FAILLOG_ENAB", NULL},
+@@ -87,6 +85,8 @@ static struct itemdef def_table[] = {
+ {"QUOTAS_ENAB", NULL},
+ {"ULIMIT", NULL},
+ #endif
++ {"ENV_PATH", NULL},
++ {"ENV_SUPATH", NULL},
+ {"CONSOLE_GROUPS", NULL},
+ {"CONSOLE", NULL},
+ {"CREATE_HOME", NULL},
+diff -urp shadow-4.0.11.1/src/su.c shadow-4.0.11.1.az/src/su.c
+--- shadow-4.0.11.1/src/su.c 2005-07-18 12:14:39.000000000 +0200
++++ shadow-4.0.11.1.az/src/su.c 2005-08-03 20:34:02.000000000 +0200
+@@ -584,10 +584,8 @@ int main (int argc, char **argv)
+ #endif /* !USE_PAM */
+
+ signal (SIGINT, SIG_DFL);
+-#ifndef USE_PAM
+- cp = getdef_str ((pwent.pw_uid == 0) ? "ENV_SUPATH" : "ENV_PATH");
+
+- /* XXX very similar code duplicated in libmisc/setupenv.c */
++ cp = getdef_str ((pwent.pw_uid == 0) ? "ENV_SUPATH" : "ENV_PATH");
+ if (!cp) {
+ addenv ("PATH=/bin:/usr/bin", NULL);
+ } else if (strchr (cp, '=')) {
+@@ -597,7 +595,6 @@ int main (int argc, char **argv)
+ }
+
+ environ = newenvp; /* make new environment active */
+-#endif /* !USE_PAM */
+
+ if (getenv ("IFS")) /* don't export user IFS ... */
+ addenv ("IFS= \t\n", NULL); /* ... instead, set a safe IFS */
diff --git a/sys-apps/shadow/files/shadow-4.0.11.1-ngettext.patch b/sys-apps/shadow/files/shadow-4.0.11.1-ngettext.patch
new file mode 100644
index 000000000000..9eba2c07220a
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.0.11.1-ngettext.patch
@@ -0,0 +1,28 @@
+New ngettext stuff borks on UCLIBC, as ngettext do not have a !ENABLE_NLS
+define. Add a check for ngettext and add the ngettext define. Both was
+inspired by coreutils.
+
+diff -urp shadow-4.0.11.1/configure.in shadow-4.0.11.1.az/configure.in
+--- shadow-4.0.11.1/configure.in 2005-08-03 00:59:56.000000000 +0200
++++ shadow-4.0.11.1.az/configure.in 2005-08-03 12:04:55.000000000 +0200
+@@ -280,6 +280,6 @@ if test "$with_libskey" = "yes"; then
+ fi
+
+ AM_GNU_GETTEXT_VERSION(0.12.1)
+-AM_GNU_GETTEXT([external])
++AM_GNU_GETTEXT([external], [need-ngettext])
+
+ AC_CONFIG_FILES([
+ Makefile
+diff -urp shadow-4.0.11.1/lib/defines.h shadow-4.0.11.1.az/lib/defines.h
+--- shadow-4.0.11.1/lib/defines.h 2005-06-14 22:27:48.000000000 +0200
++++ shadow-4.0.11.1.az/lib/defines.h 2005-08-03 12:06:42.000000000 +0200
+@@ -24,6 +24,8 @@
+ # undef textdomain
+ # define textdomain(Domain) /* empty */
+ # define _(Text) Text
++# define ngettext(Msgid1, Msgid2, N) \
++ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+ #endif
+
+ #if STDC_HEADERS
diff --git a/sys-apps/shadow/files/shadow-4.0.11.1-uclibc-missing-l64a.patch b/sys-apps/shadow/files/shadow-4.0.11.1-uclibc-missing-l64a.patch
new file mode 100644
index 000000000000..8b6b87d8385f
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.0.11.1-uclibc-missing-l64a.patch
@@ -0,0 +1,64 @@
+UCLIBC have the prototypes in stdlib.h, but not the actual functions (yes, you
+guys sucks once again. The better way might be rather to add lib/rad64.c back,
+but its higher maintainence our side at least.
+
+--- shadow-4.0.11.1/libmisc/salt.c 2005-08-03 12:50:45.000000000 +0200
++++ shadow-4.0.11.1.az/libmisc/salt.c 2005-08-03 13:07:03.000000000 +0200
+@@ -14,6 +14,57 @@
+ #include "prototypes.h"
+ #include "defines.h"
+ #include "getdef.h"
++
++#ifndef HAVE_A64L
++
++/*
++ * i64c - convert an integer to a radix 64 character
++ */
++
++int
++i64c(int i)
++{
++ if (i <= 0)
++ return ('.');
++
++ if (i == 1)
++ return ('/');
++
++ if (i >= 2 && i < 12)
++ return ('0' - 2 + i);
++
++ if (i >= 12 && i < 38)
++ return ('A' - 12 + i);
++
++ if (i >= 38 && i < 63)
++ return ('a' - 38 + i);
++
++ return ('z');
++}
++
++/*
++ * l64a - convert a long to a string of radix 64 characters
++ */
++
++char *
++l64a(long l)
++{
++ static char buf[8];
++ int i = 0;
++
++ if (l < 0L)
++ return ((char *) 0);
++
++ do {
++ buf[i++] = i64c ((int) (l % 64));
++ buf[i] = '\0';
++ } while (l /= 64L, l > 0 && i < 6);
++
++ return (buf);
++}
++
++#endif /* !HAVE_A64L */
++
+ /*
+ * Generate 8 base64 ASCII characters of random salt. If MD5_CRYPT_ENAB
+ * in /etc/login.defs is "yes", the salt string will be prefixed by "$1$"