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] getgrnam() should return an unmodified errno not ENOENT


------- Additional Comments From burnus at gmx dot de  2005-12-02 16:59 -------
> There is nothing wrong with the implementation.
I disagree.

> The code always did signal a missing entry with a NULL pointer and ENOENT.
Which does not say that this is POSIX conform. 

> There is nothing in POSIX which prohibits this. The POSIX spec just said what
> has to happen for the error conditions.
I agree that it only strongly implies that errno == 0 and that it does not
completely rule out return values != 0.
I opened an Aardvark to let the Austin Group clarify this in the next revision.

I only want to point out that there are others which read POSIX the same way as
I do (from the austin-group mailing list):

"Considering the application usage on P520, L17147-17148, my
expectation would be that if no error occurs but an entry is not found,
getgrnam() returns a null pointer while getgrnam_r() returns zero and
sets the pointer pointed to by result to a null pointer and that
neither getgrnam() nor getgrnam_r() would change errno in this case.
If an error occurred, the return value is the same but errno is also
set to indicate which error was detected."
https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-group-l&id=8929

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


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]