1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-14 21:47:19 +02:00

See ChangeLog: Sat Jan 9 16:02:23 CET 1999 Werner Koch

This commit is contained in:
Werner Koch 1999-01-09 15:06:59 +00:00
parent 7d0efec7cf
commit 002b1a8632
35 changed files with 829 additions and 521 deletions

View file

@ -1,5 +1,5 @@
/* secmem.c - memory allocation from a secure heap
* Copyright (C) 1998 Free Software Foundation, Inc.
* Copyright (C) 1998,1999 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@ -104,7 +104,7 @@ lock_pool( void *p, size_t n )
#endif
if( uid && !geteuid() ) {
if( setuid( uid ) )
if( setuid( uid ) || getuid() != geteuid() )
log_fatal("failed to reset uid: %s\n", strerror(errno));
}
@ -223,7 +223,7 @@ secmem_init( size_t n )
disable_secmem=1;
uid = getuid();
if( uid != geteuid() ) {
if( setuid( uid ) )
if( setuid( uid ) || getuid() != geteuid() )
log_fatal("failed to drop setuid\n" );
}
#endif