aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow/files
diff options
context:
space:
mode:
authorRoy.Li <rongqing.li@windriver.com>2013-08-20 15:02:49 +0800
committerSaul Wold <sgw@linux.intel.com>2013-08-22 09:15:34 -0700
commit3ef8db6217f7c40a9eb063d21ce6f25b16d88d53 (patch)
treea1729673adf163ffcce23251cf0e3ad8593b66cf /meta/recipes-extended/shadow/files
parenta7519be6a23869ebafbf712370dab86ab92f68a5 (diff)
downloadopenembedded-core-contrib-3ef8db6217f7c40a9eb063d21ce6f25b16d88d53.tar.gz
shadow: backport a patch to make newgrp work
Backport a Debian patch to fix the reading of the gshadow file in order to make newgrp work correctly. Signed-off-by: Roy.Li <rongqing.li@windriver.com> [sgw - tweaked commit message] Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-extended/shadow/files')
-rw-r--r--meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch b/meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
new file mode 100644
index 0000000000..80ebdc22a4
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
@@ -0,0 +1,36 @@
+shadow: Fix parsing of gshadow entries
+
+Upstream-Status: Backport [http://anonscm.debian.org/viewvc/pkg-shadow?view=revision&revision=3096]
+
+newgrp command does not function properly.
+Even with the valid password, it outputs: "'Invalid password'"
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+
+2010-02-14 Michael Bunk <mb@computer-leipzig.com>
+
+ * NEWS, lib/gshadow.c: Fix parsing of gshadow entries.
+
+diff -urpN a/lib/gshadow.c b/lib/gshadow.c
+--- a/lib/gshadow.c 2013-07-11 10:18:15.745450428 +0800
++++ b/lib/gshadow.c 2013-07-11 10:17:30.465450280 +0800
+@@ -222,6 +222,7 @@ void endsgent (void)
+ if (NULL == buf) {
+ return NULL;
+ }
++ buflen = BUFSIZ;
+ }
+
+ if (NULL == fp) {
+@@ -229,9 +230,9 @@ void endsgent (void)
+ }
+
+ #ifdef USE_NIS
+- while (fgetsx (buf, (int) sizeof buf, fp) == buf)
++ while (fgetsx (buf, (int) buflen, fp) == buf)
+ #else
+- if (fgetsx (buf, (int) sizeof buf, fp) == buf)
++ if (fgetsx (buf, (int) buflen, fp) == buf)
+ #endif
+ {
+ while ( ((cp = strrchr (buf, '\n')) == NULL)