Bug 429948 - getgrent returns NULL on EOF, yet sets errno=ENOENT
getgrent returns NULL on EOF, yet sets errno=ENOENT
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
http://thread.gmane.org/gmane.comp.gn...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-23 17:05 EST by Jim Meyering
Modified: 2013-03-13 16:41 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-10 06:07:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jim Meyering 2008-01-23 17:05:59 EST
Description of problem: getgrent mistakenly sets errno upon EOF
when /etc/nsswitch.conf has e.g., group: nisplus


Version-Release number of selected component (if applicable):


How reproducible: every time


Steps to Reproduce:set "group: nisplus" in /etc/nsswitch.conf
1.run "./id root", where id comes from unmodified upstream coreutils-6.10
2.note the diagnostic
3.
  
Actual results:
./id root
uid=0(root) gid=0./id: failed to get groups for user `root': No such file or
directory


Expected results:
# ./id root
uid=0(root) gid=0(root)
groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
context=root:unconfined_r:unconfined_t:SystemLow-SystemHigh


Additional info: This isn't a big deal for upstream coreutils, because soon it
will no longer use getgrent.
Comment 1 Jakub Jelinek 2008-04-10 06:07:35 EDT
This ought to be fixed in glibc-2.7.90-14, if not, please reopen.

Note You need to log in before you can comment on or make changes to this bug.