aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-10-23 07:47:02 +0000
committerWerner Koch <[email protected]>2003-10-23 07:47:02 +0000
commit5c67438a67d124502708e26b10365406698ef43f (patch)
treea6ffb9be8c79a8b3c405cd7ebc0a07ffcbc1dd6a
parent* configure.ac (PRINTABLE_OS_NAME): Remove special case for The (diff)
downloadgnupg-5c67438a67d124502708e26b10365406698ef43f.tar.gz
gnupg-5c67438a67d124502708e26b10365406698ef43f.zip
* secmem.c (lock_pool) [_AIX]: Don't use plock.
-rw-r--r--util/ChangeLog4
-rw-r--r--util/secmem.c11
2 files changed, 15 insertions, 0 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index d8d586d9b..2dad265ba 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,7 @@
+2003-10-23 Werner Koch <[email protected]>
+
+ * secmem.c (lock_pool) [_AIX]: Don't use plock.
+
2003-07-30 Werner Koch <[email protected]>
* ttyio.c: Typo fixes.
diff --git a/util/secmem.c b/util/secmem.c
index 5ebc7db56..e1ec6c93c 100644
--- a/util/secmem.c
+++ b/util/secmem.c
@@ -130,9 +130,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;