Bug 429948

Summary: getgrent returns NULL on EOF, yet sets errno=ENOENT
Product: [Fedora] Fedora Reporter: Jim Meyering <meyering>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: fweimer
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12375
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-10 10:07:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jim Meyering 2008-01-23 22:05:59 UTC
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 10:07:35 UTC
This ought to be fixed in glibc-2.7.90-14, if not, please reopen.