shadow-4.1.4.2: Add patches to support dots in login id.
authorKhem Raj <raj.khem@gmail.com>
Wed, 9 Jun 2010 20:37:03 +0000 (13:37 -0700)
committerKhem Raj <raj.khem@gmail.com>
Wed, 9 Jun 2010 20:38:32 +0000 (13:38 -0700)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes/shadow/files/shadow-4.1.3-dots-in-usernames.patch [new file with mode: 0644]
recipes/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch [new file with mode: 0644]
recipes/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch [new file with mode: 0644]
recipes/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch [new file with mode: 0644]
recipes/shadow/shadow_4.1.4.2.bb

diff --git a/recipes/shadow/files/shadow-4.1.3-dots-in-usernames.patch b/recipes/shadow/files/shadow-4.1.3-dots-in-usernames.patch
new file mode 100644 (file)
index 0000000..0e70611
--- /dev/null
@@ -0,0 +1,12 @@
+Index: shadow-4.1.4.2/libmisc/chkname.c
+===================================================================
+--- shadow-4.1.4.2.orig/libmisc/chkname.c      2009-04-28 12:14:04.000000000 -0700
++++ shadow-4.1.4.2/libmisc/chkname.c   2010-06-03 17:43:20.638973857 -0700
+@@ -61,6 +61,7 @@ static bool is_valid_name (const char *n
+                     ( ('0' <= *name) && ('9' >= *name) ) ||
+                     ('_' == *name) ||
+                     ('-' == *name) ||
++                    ('.' == *name) ||
+                     ( ('$' == *name) && ('\0' == *(name + 1)) )
+                    )) {
+                       return false;
diff --git a/recipes/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch b/recipes/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch
new file mode 100644 (file)
index 0000000..0ce89bf
--- /dev/null
@@ -0,0 +1,16 @@
+http://bugs.gentoo.org/283725
+https://alioth.debian.org/tracker/index.php?func=detail&aid=311740&group_id=30580&atid=411480
+
+Index: shadow-4.1.4.2/libmisc/env.c
+===================================================================
+--- shadow-4.1.4.2.orig/libmisc/env.c  2009-04-27 13:07:56.000000000 -0700
++++ shadow-4.1.4.2/libmisc/env.c       2010-06-03 17:44:51.456408474 -0700
+@@ -251,7 +251,7 @@ void sanitize_env (void)
+                       if (strncmp (*cur, *bad, strlen (*bad)) != 0) {
+                               continue;
+                       }
+-                      if (strchr (*cur, '/') != NULL) {
++                      if (strchr (*cur, '/') == NULL) {
+                               continue;       /* OK */
+                       }
+                       for (move = cur; NULL != *move; move++) {
diff --git a/recipes/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch b/recipes/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch
new file mode 100644 (file)
index 0000000..39d3f02
--- /dev/null
@@ -0,0 +1,21 @@
+http://bugs.gentoo.org/300790
+http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2009-November/007850.html
+
+2009-11-05  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * NEWS, src/groupmod.c: Fixed groupmod when configured with
+       --enable-account-tools-setuid.
+
+Index: shadow-4.1.4.2/src/groupmod.c
+===================================================================
+--- shadow-4.1.4.2.orig/src/groupmod.c 2009-06-05 15:16:58.000000000 -0700
++++ shadow-4.1.4.2/src/groupmod.c      2010-06-03 17:45:43.828952613 -0700
+@@ -720,7 +720,7 @@ int main (int argc, char **argv)
+       {
+               struct passwd *pampw;
+               pampw = getpwuid (getuid ()); /* local, no need for xgetpwuid */
+-              if (NULL == pamh) {
++              if (NULL == pampw) {
+                       fprintf (stderr,
+                                _("%s: Cannot determine your user name.\n"),
+                                Prog);
diff --git a/recipes/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch b/recipes/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch
new file mode 100644 (file)
index 0000000..eaf5aab
--- /dev/null
@@ -0,0 +1,16 @@
+http://bugs.gentoo.org/show_bug.cgi?id=301957
+https://alioth.debian.org/scm/browser.php?group_id=30580
+
+Index: shadow-4.1.4.2/src/su.c
+===================================================================
+--- shadow-4.1.4.2.orig/src/su.c       2009-07-23 13:38:56.000000000 -0700
++++ shadow-4.1.4.2/src/su.c    2010-06-03 17:46:47.718944010 -0700
+@@ -378,7 +378,7 @@ int main (int argc, char **argv)
+ #endif
+ #endif                                /* !USE_PAM */
+-      sanitize_env ();
++      /* sanitize_env (); */
+       (void) setlocale (LC_ALL, "");
+       (void) bindtextdomain (PACKAGE, LOCALEDIR);
index ebf54a7..ff08952 100644 (file)
@@ -1,9 +1,13 @@
 require shadow.inc
 
 SRC_URI += "file://shadow.automake-1.11.patch \
+           file://shadow-4.1.3-dots-in-usernames.patch \
+           file://shadow-4.1.4.2-env-reset-keep-locale.patch \
+           file://shadow-4.1.4.2-groupmod-pam-check.patch \
+           file://shadow-4.1.4.2-su_no_sanitize_env.patch \
           "
 
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
 
 EXTRA_OECONF_libc-uclibc += " --with-nscd=no "