diff options
author | Werner Koch <[email protected]> | 2008-07-17 19:40:53 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2008-07-17 19:40:53 +0000 |
commit | 9d5a10a4530c8579b034f7e7492ad4829ae883a8 (patch) | |
tree | 127fca25e584b5189a957297e6f984a1271b5612 /g10/gpg.c | |
parent | Minor fixes. (diff) | |
download | gnupg-9d5a10a4530c8579b034f7e7492ad4829ae883a8.tar.gz gnupg-9d5a10a4530c8579b034f7e7492ad4829ae883a8.zip |
Do not run the setuid test if running under as root proper.
Documentation fixes.
Some enhancements for the new OpenPGP Card.
Diffstat (limited to '')
-rw-r--r-- | g10/gpg.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2015,9 +2015,9 @@ main (int argc, char **argv) got_secmem = 1; #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(); + setuid privs. Just in case, bomb out if we are (and are not root). */ + if (getuid () && getuid () != geteuid ()) + BUG (); #endif maybe_setuid = 0; |