aboutsummaryrefslogtreecommitdiffstats
path: root/util/secmem.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-10-23 07:38:07 +0000
committerWerner Koch <[email protected]>2003-10-23 07:38:07 +0000
commit00ec05898e463edfaf9fca8f8f7ccfe0f8c98d7d (patch)
tree302fec3c461d743fd9394d65d8098fff20428b3c /util/secmem.c
parent(DLLIBS): Do not include -ldl in the mingw32 case. (diff)
downloadgnupg-00ec05898e463edfaf9fca8f8f7ccfe0f8c98d7d.tar.gz
gnupg-00ec05898e463edfaf9fca8f8f7ccfe0f8c98d7d.zip
(lock_pool) [_AIX]: Don't use plock.
Diffstat (limited to '')
-rw-r--r--util/secmem.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/util/secmem.c b/util/secmem.c
index 7dfa668c2..2d260a382 100644
--- a/util/secmem.c
+++ b/util/secmem.c
@@ -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;