diff options
author | David Shaw <[email protected]> | 2004-09-30 15:00:58 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-09-30 15:00:58 +0000 |
commit | 85f975596887930f8488f9008367d052b9aa660d (patch) | |
tree | 4be8d9c27425689a9f43eee28ae06e5ff45fe94f /g10/g10.c | |
parent | * util.h: Prototype destroy_dotlock(). From Werner on stable branch. (diff) | |
download | gnupg-85f975596887930f8488f9008367d052b9aa660d.tar.gz gnupg-85f975596887930f8488f9008367d052b9aa660d.zip |
* 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.
Diffstat (limited to 'g10/g10.c')
-rw-r--r-- | g10/g10.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 */ |