1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

* gpgv.c, keydb.c (keydb_add_resource): Factored keyring creation out to

.. (maybe_create_keyring): .. new.  Make sure that we do the checks in a
locked state.  Problem reported by Stefan Haller.  Try to create the home
directory before acquiring a lock for the keyring. From Werner on stable
branch.

* g10.c (main): Blow up if we didn't lose setuid.  From Werner on stable
branch.
This commit is contained in:
David Shaw 2004-09-30 15:00:58 +00:00
parent 07288476ac
commit 85f9755968
4 changed files with 136 additions and 52 deletions

View file

@ -1685,6 +1685,13 @@ main( int argc, char **argv )
maybe_setuid = 0;
/* Okay, we are now working under our real uid */
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
/* There should be no way to get to this spot while still carrying
setuid privs. Just in case, bomb out if we are. */
if(getuid()!=geteuid())
BUG();
#endif
set_native_charset (NULL); /* Try to auto set the character set */
/* Try for a version specific config file first */