This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/1969] New: getgrnam() should return an unmodified errno not ENOENT


getgrname() returns a POINTER, which should be NULL for no entry and for error.

According to posix, errno is set if an error occures. Since error and not found
are listed separately, a not existing entry is not an error and errno shall not
be modified.

GNU C Library stable release version 2.3.5 (20050802)
returns errno = ENOENT.

According to POSIX 2003:

"The getgrnam() function shall return a pointer to a struct group with the
structure defined in <grp.h> with a matching entry if one is found. The
getgrnam() function shall return a null pointer if either the requested entry
was not found, or an error occurred. On error, errno shall be set to indicate
the error."

The only error messages listed in SUVv3 for getgrnam are:
"[EIO]
    An I/O error has occurred.
[EINTR]
    A signal was caught during getgrnam().
[EMFILE]
    {OPEN_MAX} file descriptors are currently open in the calling process.
[ENFILE]
    The maximum allowable number of files is currently open in the system."

-- 
           Summary: getgrnam() should return an unmodified errno not ENOENT
           Product: glibc
           Version: 2.3.5
            Status: NEW
          Severity: minor
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: burnus at gmx dot de
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: Compiled on a Linux 2.6.12 system on 2005-09-09.
  GCC host triplet: SUSE Linux 10.0 (i386) with kernel 2.6.14-
                    20051028140608-default
GCC target triplet: Configured for i686-suse-linux.


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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]