summaryrefslogtreecommitdiffstats
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
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-22 18:30:02 +0100
commit78de8222d6354f58cacce70597fed22682fd3563 (patch)
tree8a65413db11374a390c06f9f4ecb9216f0c2ff77 /meta/recipes-extended/shadow/files
parent26e543cb2118ed6a668ad37e1fac149fa6db672e (diff)
downloadpoky-78de8222d6354f58cacce70597fed22682fd3563.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. (From OE-Core rev: 3ef8db6217f7c40a9eb063d21ce6f25b16d88d53) Signed-off-by: Roy.Li <rongqing.li@windriver.com> [sgw - tweaked commit message] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 @@
1shadow: Fix parsing of gshadow entries
2
3Upstream-Status: Backport [http://anonscm.debian.org/viewvc/pkg-shadow?view=revision&revision=3096]
4
5newgrp command does not function properly.
6Even with the valid password, it outputs: "'Invalid password'"
7
8Signed-off-by: Roy.Li <rongqing.li@windriver.com>
9
102010-02-14 Michael Bunk <mb@computer-leipzig.com>
11
12 * NEWS, lib/gshadow.c: Fix parsing of gshadow entries.
13
14diff -urpN a/lib/gshadow.c b/lib/gshadow.c
15--- a/lib/gshadow.c 2013-07-11 10:18:15.745450428 +0800
16+++ b/lib/gshadow.c 2013-07-11 10:17:30.465450280 +0800
17@@ -222,6 +222,7 @@ void endsgent (void)
18 if (NULL == buf) {
19 return NULL;
20 }
21+ buflen = BUFSIZ;
22 }
23
24 if (NULL == fp) {
25@@ -229,9 +230,9 @@ void endsgent (void)
26 }
27
28 #ifdef USE_NIS
29- while (fgetsx (buf, (int) sizeof buf, fp) == buf)
30+ while (fgetsx (buf, (int) buflen, fp) == buf)
31 #else
32- if (fgetsx (buf, (int) sizeof buf, fp) == buf)
33+ if (fgetsx (buf, (int) buflen, fp) == buf)
34 #endif
35 {
36 while ( ((cp = strrchr (buf, '\n')) == NULL)