[nss_db/f15] - when the initgroups function needs to parse a group entry which contains a large list of users, re
Nalin Dahyabhai
nalin at fedoraproject.org
Tue Jan 24 02:37:31 UTC 2012
commit b60d78b0113c6365c6f9eee359d48a8f85400db8
Author: Nalin Dahyabhai <nalin at dahyabhai.net>
Date: Mon Jan 23 21:37:05 2012 -0500
- when the initgroups function needs to parse a group entry which contains a large list of users, reinitialize the buffer that we pass to the parsing function, which destroyed what we passed in the previous time (#751461)
nss_db-2.2-repeat.patch | 13 +++++++++++++
nss_db.spec | 9 ++++++++-
2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/nss_db-2.2-repeat.patch b/nss_db-2.2-repeat.patch
new file mode 100644
index 0000000..bc820f2
--- /dev/null
+++ b/nss_db-2.2-repeat.patch
@@ -0,0 +1,13 @@
+_nss_files_parse_grent() destroys its input, so we need to reset it
+--- nss_db-2.2.3pre1/src/db-initgroups.c
++++ nss_db-2.2.3pre1/src/db-initgroups.c
+@@ -140,6 +140,9 @@ _nss_db_initgroups_dyn (const char *user
+ buffer = extend_alloca (buffer, buflen, newbuflen);
+ alloca_used += newbuflen;
+ }
++ p = memcpy (line, value.data, value.size);
++ while (isspace (*p))
++ ++p;
+ }
+
+ if (err > 0 && grp.gr_gid != group)
diff --git a/nss_db.spec b/nss_db.spec
index 627abbe..25afd22 100644
--- a/nss_db.spec
+++ b/nss_db.spec
@@ -4,7 +4,7 @@
Summary: An NSS library for the Berkeley DB
Name: nss_db
Version: 2.2.3
-Release: 0.5.pre1%{?dist}
+Release: 0.6.pre1%{?dist}
Source: ftp://sources.redhat.com/pub/glibc/old-releases/nss_db-%{version}pre1.tar.gz
Source1: http://download.oracle.com/berkeley-db/db-%{db_version}.tar.gz
Source2: db-getent-Makefile
@@ -23,6 +23,7 @@ Patch10: nss_db-2.2-glibc.patch
Patch11: nss_db-2.2-makedb-atomic.patch
Patch12: 200-set-db-environment.patch
Patch13: d-nss_db-initgr.patch
+Patch14: nss_db-2.2-repeat.patch
Patch100: db-4.6.18-glibc.patch
Patch101: http://www.oracle.com/technology/products/berkeley-db/db/update/4.6.21/patch.4.6.21.1
Patch102: http://www.oracle.com/technology/products/berkeley-db/db/update/4.6.21/patch.4.6.21.2
@@ -68,6 +69,7 @@ pushd src
popd
%patch12 -p1 -b .set-db-environment
%patch13 -p1 -b .initgr
+%patch14 -p1 -b .repeat
cp %{_datadir}/gettext/config.rpath .
rm -f config.guess config.sub ltmain.sh
autoreconf -i
@@ -139,6 +141,11 @@ rm -rf ${RPM_BUILD_ROOT}
%config(noreplace) /var/db/Makefile
%changelog
+* Mon Jan 23 2012 Nalin Dahyabhai <nalin at redhat.com> - 2.2.3-0.6.pre1
+- when the initgroups function needs to parse a group entry which contains a
+ large list of users, reinitialize the buffer that we pass to the parsing
+ function, which destroyed what we passed in the previous time (#751461)
+
* Wed May 18 2011 Nalin Dahyabhai <nalin at redhat.com> - 2.2.3-0.5.pre1
- import patch to handle initgroups directly rather than forcing libc to
use the enumeration interfaces, which could result in two threads calling
More information about the scm-commits
mailing list