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

fixed severe exploit

This commit is contained in:
Werner Koch 1998-07-09 13:37:17 +00:00
parent 5aed77d1db
commit e143f23c23
29 changed files with 1272 additions and 829 deletions

View file

@ -153,8 +153,16 @@ secmem_get_flags(void)
void
secmem_init( size_t n )
{
if( !n )
if( !n ) {
uid_t uid;
disable_secmem=1;
uid = getuid();
if( uid != geteuid() ) {
if( setuid( uid ) )
log_fatal("failed to drop setuid\n" );
}
}
else {
if( n < DEFAULT_POOLSIZE )
n = DEFAULT_POOLSIZE;