shadow: backport a patch to make newgrp work
v2 cover shadow: backport a patch to make newgrp work
From: "Roy.Li" <[email protected]>
Diff with v1: fix a typOS
The following changes since commit fd9e591f266e1a6c183e77f24e50d31e0d52bdd5:
cronie: fix out of tree build (2013-08-19 11:24:51 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib roy/mewgrp1
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=roy/mewgrp1
Roy.Li (1):
shadow: backport a patch to make newgrp work
.../shadow/files/fix-etc-gshadow-reading.patch | 36 ++++++++++++++++++++ meta/recipes-extended/shadow/shadow_4.1.4.3.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
Signature · 1 line
1.7.10.4
PATCH v2 1/1 shadow: backport a patch to make newgrp work
From: "Roy.Li" <[email protected]>
Signed-off-by Roy.Li <[email protected]>
--- .../shadow/files/fix-etc-gshadow-reading.patch | 36 ++++++++++++++++++++ meta/recipes-extended/shadow/shadow_4.1.4.3.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch new file +36 -0
@@ -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 <[email protected]> + +2010-02-14 Michael Bunk <[email protected]> + + * 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)
meta/recipes-extended/shadow/shadow_4.1.4.3.bb +1 -0
@@ -24,6 +24,7 @@ SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \ file://shadow-update-pam-conf.patch \ file://shadow_fix_for_automake-1.12.patch \ file://slackware_fix_for_glib-2.17_crypt.patch \ + file://fix-etc-gshadow-reading.patch \ " SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
Signature · 1 line
1.7.10.4