aboutsummaryrefslogtreecommitdiffstats
path: root/g10/g10.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/g10.c')
-rw-r--r--g10/g10.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/g10/g10.c b/g10/g10.c
index 66a106526..85c27d424 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -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 */