mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-24 15:17:02 +01:00
See ChangeLog: Thu Jun 8 20:22:00 CEST 2000 Werner Koch
This commit is contained in:
parent
662f328608
commit
bf2ace8a83
@ -1,3 +1,7 @@
|
|||||||
|
Thu Jun 8 20:22:00 CEST 2000 Werner Koch <wk@openit.de>
|
||||||
|
|
||||||
|
* secmem.c (lock_pool,secmem_init): Additional check for dropped privs.
|
||||||
|
|
||||||
Tue May 30 16:37:55 CEST 2000 Werner Koch <wk@openit.de>
|
Tue May 30 16:37:55 CEST 2000 Werner Koch <wk@openit.de>
|
||||||
|
|
||||||
* iobuf.c (iobuf_cancel): Fix for MSDOS.
|
* iobuf.c (iobuf_cancel): Fix for MSDOS.
|
||||||
|
@ -128,7 +128,9 @@ lock_pool( void *p, size_t n )
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( uid && !geteuid() ) {
|
if( uid && !geteuid() ) {
|
||||||
if( setuid( uid ) || getuid() != geteuid() )
|
/* check that we really dropped the privs.
|
||||||
|
* Note: setuid(0) should always fail */
|
||||||
|
if( setuid( uid ) || getuid() != geteuid() || !setuid(0) )
|
||||||
log_fatal("failed to reset uid: %s\n", strerror(errno));
|
log_fatal("failed to reset uid: %s\n", strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,7 +262,7 @@ secmem_init( size_t n )
|
|||||||
disable_secmem=1;
|
disable_secmem=1;
|
||||||
uid = getuid();
|
uid = getuid();
|
||||||
if( uid != geteuid() ) {
|
if( uid != geteuid() ) {
|
||||||
if( setuid( uid ) || getuid() != geteuid() )
|
if( setuid( uid ) || getuid() != geteuid() || !setuid(0) )
|
||||||
log_fatal("failed to drop setuid\n" );
|
log_fatal("failed to drop setuid\n" );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user