(lock_pool) [_AIX]: Don't use plock.

This commit is contained in:
Werner Koch 2003-10-23 07:38:07 +00:00
parent 9e048bc191
commit 00ec05898e
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2003-10-23 Werner Koch <wk@gnupg.org>
* secmem.c (lock_pool) [_AIX]: Don't use plock.
2003-10-12 David Shaw <dshaw@jabberwocky.com>
* srv.c: OSX 10.2.8/Darwin 6.8 seems to have some #include

View File

@ -132,9 +132,20 @@ lock_pool( void *p, size_t n )
/* ick. but at least we get secured memory. about to lock
entire data segment. */
#ifdef HAVE_PLOCK
# ifdef _AIX
/* The configure for AIX returns broken mlock but the plock has
the strange requirement to somehow set the stack limit first.
The problem might turn out in indeterministic program behaviour
and hanging processes which can somehow be solved when enough
processes are clogging up the memory. To get this problem out
of the way we simply don't try to lock the memory at all.
*/
err = EPERM;
# else /* !_AIX */
err = plock( DATLOCK );
if( err && errno )
err = errno;
# endif /*_AIX*/
#else /*!HAVE_PLOCK*/
if( uid ) {
errno = EPERM;