public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/9962] New: For non-existing groups, getgrnam_r() return the last group configured in the system
@ 2009-03-18  5:21 aas029 at yahoo dot com
  2009-03-20 18:24 ` [Bug libc/9962] " drepper at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: aas029 at yahoo dot com @ 2009-03-18  5:21 UTC (permalink / raw)
  To: glibc-bugs

When getgrnam_r() is passed a group name that does NOT exist in the system, it
is returning the structure for whatever the last group configured in the system
is (the last line in /etc/group).  

The expectation is that if a group doesn't exist in the system (i.e. no group
exist with a matching name), the group will not be found and an error will be
returned by getgrnam_r(). 

=========
/lib/libc-2.9.so
GNU C Library stable release version 2.9, by Roland McGrath et al.
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.3.2 20081105 (Red Hat 4.3.2-7).
Compiled on a Linux >>2.6.18-92.1.10.el5<< system on 2008-11-13.
Available extensions:
	The C stubs add-on version 2.1.2.
	crypt add-on version 2.1 by Michael Glad and others
	GNU Libidn by Simon Josefsson
	Native POSIX Threads Library by Ulrich Drepper et al
	BIND-8.2.3-T5B
	RT using linux kernel aio
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
=========

Example code if needed can be found here
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/apis/gtgrnamr.htm

-- 
           Summary: For non-existing groups, getgrnam_r() return the last
                    group configured in the system
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P3
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: aas029 at yahoo dot com
                CC: aas029 at yahoo dot com,glibc-bugs at sources dot redhat
                    dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=9962

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libc/9962] For non-existing groups, getgrnam_r() return the last group configured in the system
  2009-03-18  5:21 [Bug libc/9962] New: For non-existing groups, getgrnam_r() return the last group configured in the system aas029 at yahoo dot com
@ 2009-03-20 18:24 ` drepper at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: drepper at redhat dot com @ 2009-03-20 18:24 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2009-03-20 18:24 -------
You are using the interface wrong.  The function only returns a nonzero value if
there has been a problem in the execution.  A failure to find an entry to return
does not qualify.  This condition is indicated by the pointer, pointed to by the
last parameter, being NULL.  This is correctly implemented.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://sourceware.org/bugzilla/show_bug.cgi?id=9962

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-20 18:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-18  5:21 [Bug libc/9962] New: For non-existing groups, getgrnam_r() return the last group configured in the system aas029 at yahoo dot com
2009-03-20 18:24 ` [Bug libc/9962] " drepper at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).