getUserEntryForName weirdness

Jon Fairbairn Jon.Fairbairn at cl.cam.ac.uk
Fri Oct 29 12:43:49 EDT 2004


On 2004-10-29 at 18:29+0200 Peter Simons wrote:
> Is anyone else seeing this on his system?
> 
>   getUserEntryForName [] >>= print . userName
>   "wasabi"
> 
> "wasabi" happens to be the last entry in the /etc/passwd
> file, and that is what I get every time I query for an user
> that doesn't exist. The source code promises an exception,
> but I don't get one. 

Same here with ghc 6.2.1. The haddocks don't say anything
about what should happen.

BTW, the relevant library is System.Posix.User and a similar
effect is observed with getGroupEntryForName

 Jón


-- 
Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk




More information about the Glasgow-haskell-users mailing list