This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15385] New: Results from "getent group" may be truncated with nss_db
- From: "wjones at fluke dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 22 Apr 2013 22:11:05 +0000
- Subject: [Bug libc/15385] New: Results from "getent group" may be truncated with nss_db
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15385
Bug #: 15385
Summary: Results from "getent group" may be truncated with
nss_db
Product: glibc
Version: 2.15
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: unassigned@sourceware.org
ReportedBy: wjones@fluke.com
CC: drepper.fsp@gmail.com
Classification: Unclassified
The results from "getent group" may be truncated when using nss_db. This will
happen when getgrent() encounters a group entry long enough to overflow the
default 1024 byte buffer. getgrent() sets errno to ERANGE and returns NULL,
but getent fails to check errno, and truncates the results at this point.
Two things make me suspect that this failure is avoidable:
1. Requesting a specific long group entry will return it in full, e.g.:
getent group myverylonggroup
2. Our local configuration in /etc/nsswitch.conf looks like this:
group: files db
Long entries in group.db will cause output from "getent group" to be
truncated as described, but if I add a long entry to /etc/group, it will be
output in full, along with all subsequent entries in group.db. It appears that
that nss_files will grow the buffer as required, and then the expanded buffer
is used by nss_db.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.