aboutsummaryrefslogtreecommitdiffhomepage
path: root/System/Posix/User.hsc
diff options
context:
space:
mode:
Diffstat (limited to 'System/Posix/User.hsc')
-rw-r--r--System/Posix/User.hsc2
1 files changed, 2 insertions, 0 deletions
diff --git a/System/Posix/User.hsc b/System/Posix/User.hsc
index ed5adfb..7b0db2a 100644
--- a/System/Posix/User.hsc
+++ b/System/Posix/User.hsc
@@ -240,6 +240,8 @@ getUserEntryForName name = do
withCString name $ \ pstr -> do
throwErrorIfNonZero_ "getUserEntryForName" $
c_getpwnam_r pstr ppw pbuf (fromIntegral pwBufSize) pppw
+ throwErrnoIfNull "getUserEntryForName" $
+ peekElemOff pppw 0
unpackUserEntry ppw
foreign import ccall unsafe "getpwnam_r"