#1655: System.Posix.User.getGroupEntryForName incorrect error for non-existent
group
-----------------------------+----------------------------------------------
Reporter: Eelis | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/unix | Version: 6.6.1
Severity: normal | Keywords:
Difficulty: Easy (1 hr) | Os: Linux
Testcase: | Architecture: x86_64 (amd64)
-----------------------------+----------------------------------------------
The following program:
{{{
import System.Posix.User
main :: IO ()
main = getGroupEntryForName "monkeys" >> return ()
}}}
gives the following output (on a system without a "monkeys" group):
{{{
*** Exception: getGroupEntryForName: failed (Success)
}}}
The "(Success)" part is obviously wrong.
The problem is that the getGroupEntryForName implementation throws errno
if getgrnam_r wrote NULL to the pointer pointed to by its last parameter,
while the
[http://www.opengroup.org/onlinepubs/009695399/functions/getgrnam.html
getgrnam_r specification] makes no guarantees about errno being set in
that case.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1655>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs