1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Implemented -cs and some fixes to the rfc1991 symmetric only mode

This commit is contained in:
Werner Koch 2001-08-20 19:10:34 +00:00
parent 23589ae0a2
commit 98a8843e28
17 changed files with 522 additions and 64 deletions

View file

@ -13,6 +13,10 @@
* memory.c [__riscos__]: Minor patches
* riscos.c (set_filetype): New.
* secmem.c (lock_pool): Under HPUX mlock is broken but we might
have plock, so we use this to lock the entire process. By Albert
Chin.
2001-07-03 Werner Koch <wk@gnupg.org>
* strgutil.c (utf8_to_native): Fixed printing of invalid utf-8

View file

@ -32,6 +32,9 @@
#ifdef USE_CAPABILITIES
#include <sys/capability.h>
#endif
#ifdef HAVE_PLOCK
#include <sys/lock.h>
#endif
#endif
#include "types.h"
@ -120,6 +123,13 @@ lock_pool( void *p, size_t n )
uid = getuid();
#ifdef HAVE_BROKEN_MLOCK
/* ick. but at least we get secured memory. about to lock
entire data segment. */
#ifdef HAVE_PLOCK
err = plock( DATLOCK );
if( err && errno )
err = errno;
#else /*!HAVE_PLOCK*/
if( uid ) {
errno = EPERM;
err = errno;
@ -129,6 +139,7 @@ lock_pool( void *p, size_t n )
if( err && errno )
err = errno;
}
#endif /*!HAVE_PLOCK*/
#else
err = mlock( p, n );
if( err && errno )