diff options
author | Werner Koch <[email protected]> | 1999-01-09 15:06:59 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1999-01-09 15:06:59 +0000 |
commit | 002b1a8632d2c2795deb4682ba6db8be120db9b4 (patch) | |
tree | 33a0e8c96550f24d9aa1747b05a9f471f975e7a7 /util/secmem.c | |
parent | See ChangeLog: Thu Jan 7 18:00:58 CET 1999 Werner Koch (diff) | |
download | gnupg-002b1a8632d2c2795deb4682ba6db8be120db9b4.tar.gz gnupg-002b1a8632d2c2795deb4682ba6db8be120db9b4.zip |
See ChangeLog: Sat Jan 9 16:02:23 CET 1999 Werner Koch
Diffstat (limited to '')
-rw-r--r-- | util/secmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/secmem.c b/util/secmem.c index 30396f3c3..e9bc05abd 100644 --- a/util/secmem.c +++ b/util/secmem.c @@ -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 |