aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index a88e6d702..c226b1e35 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -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;