| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch fixes getGroupEntryForID and getGroupEntryForName on Solaris
The issue on Solaris is that it defines both required getgrgid_r
and getgrnam_r functions as CPP macros which depending on configuration
are mapped to real function implementations with different names.
The issue is solved by using C API calling convention instead of platform
C ABI calling convention.
|
|
|
|
|
|
|
|
|
| |
Only language extensions not active when `-XHaskell2010` is enabled are
declared, this way we can drop many redundant
`{-# LANGUAGE ForeignFunctionInterface #-}` occurences. This commit also
removes/replaces some `{-# OPTIONS_GHC -XRecordWildCards #-}` pragmas.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
| |
Their use site is now unconditional. Issue #8223.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
| |
Also comes with tests. This closes #8108.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
|
|
|
|
| |
Submitted by: Nathan Hüsken <nathan.huesken@posteo.de>
|
|
|
|
| |
and remove code to support older versions
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Having the ability to set the effective user-id and group-id
enables the application to switch between the real user-id
and set-user-id multiple times.
|
| |
|
|
|
|
| |
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466647
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
functions need to be given a new name, and the header files contain
some __asm hackery in order to let the program call the correct function.
This mean that you need to use the header files in order to call the
correct system functions, which prevents things like "foreign import ccall" from working.
Ghc solves this with wrapper functions for some of the renamed functions,
but it has not been updated for newer versions of NetBSD that has recently
versioned some more functions.
The attached patches introduces wrapper functions for all currently
NetBSD-versioned functions used in libraries/unix. Solves ~20 testsuite
failures.
Contributed by: Krister Walfridsson <krister.walfridsson@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Retry with a larger buffer whenever getgrgid_r(3), getgrnam_r(3),
getpwuid_r(3) or getpwnam_r(3) return ERANGE. Suggested in the
examples sections of IEEE Std 1003.1-2008.
While here, change the default for grBufSize back to 1024.
|
| |
|
| |
|
|
|
|
| |
Fixes trac #2033.
|
|
|
|
|
|
| |
We used to get
*** Exception: getGroupEntryForName: failed (Success)
Fixes trac #1655
|
|
|
|
|
| |
It used to return [] on all but the first call.
Patch from an unidentified guest.
|
|
|
|
|
|
|
|
| |
_SC_GETPW_R_SIZE_MAX.
sysconf(3) returns -1 on failure, but this was not handled when checking _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX in System.Posix.User. This made getUserEntryForID, getUserEntryForName, getGroupEntryForID and getGroupEntryForName fail on OS X 10.4.9 on i386. Just checking that unistd.h defines _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX as was done before does not guarantee that sysconf(3) will succeed.
sysconf(3) failure is now handled by using the same default values as were already used when sysconf(3) is not available, or the parameter names are not defined.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
System.Posix.User was missing pw_gecos and pw_passwd in UserEntry.
I have added them, so now the full struct passwd is represented.
|
|
|
|
| |
Some docs for System.Posix, from Bj?rn Bringert
|
|
|
|
| |
More getpw*_r result checks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix getpwnam_r-handling: getpwnam_r returns (always?) 0, you have
to check result* (pppw[0])!
Truss-log from querying first "root", then "" on SunOS 5.9:
<- libc:__posix_getpwnam_r() = 0
"root"
-> libc:__posix_getpwnam_r(0xff1bf8a8, 0xff1bf460, 0xff1bf490, 0x400)
<- libc:__posix_getpwnam_r() = 0
Yes, that's 0 in both cases. (I wasn't even able to elicit an ERANGE btw.)
Reported by: Peter Simons
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement System.Posix.User.getUserEntryFor{ID,Name} on platforms
without reentrant versions of getpw{uid,nam}. This includes all the BSDs.
While I'm here, close getGroupEntryFor* "Result too large" bug on
OpenBSD, mentioned last year:
http://www.haskell.org/pipermail/glasgow-haskell-bugs/2003-September/003601.html
grBufSize was too small, apparently.
Thanks to Ian Lynagh for hint to do the locking.
|
|
|
|
|
|
| |
Remove redundant _POSIX_PTHREAD_SEMANTICS. It's defined on the command line
and also set too late/in the wrong place (after including system prototypes),
anyway.
|
|
|
|
|
|
|
| |
solaris_TARGET_OS -> solaris2_TARGET_OS
(and tweak the #define while I'm here)
Works for Hugs, still untested for GHC, but presumably needed for STABLE.
|
|
|
|
|
|
| |
code tidyup
merge to stable
|
|
|
|
|
|
|
| |
Untested fix for Solaris to get the right versions of getgrnam_r and
friends.
I'd appreciate it if someone with a Solaris build could test this.
|
|
|
|
| |
rename GHC.Posix as System.Posix.Internals
|
|
|
|
|
|
|
|
| |
Once again: Make Haddock happy.
Running Haddock in addition to ghc (i.e. use 'make all html' instead
of plain 'make') before a commit would be nice, especially as buglets
like this break a 3 hour RPM build just before it can finish... :-(
|
|
|
|
| |
Mac OS X doesn't have the sysconfig constants _SC_GETPW_R_SIZE_MAX and _SC_GETGR_R_SIZE_MAX, so add a configure check
|
|
Fill in some more bits in the new Unix library: specifically the
contents of PosixTTY and PosixDB (now System.Posix.Terminal and
System.Posix.User respectively).
We're now about 95% complete w.r.t. the old posix library. I've
identified the reminaing bits to do in System/Posix.hs.
|