summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow/files
diff options
context:
space:
mode:
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)