summaryrefslogtreecommitdiffstats
path: root/g10/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/exec.c')
-rw-r--r--g10/exec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/exec.c b/g10/exec.c
index 804437674..40561e871 100644
--- a/g10/exec.c
+++ b/g10/exec.c
@@ -318,9 +318,9 @@ int exec_write(struct exec_info **info,const char *program,
#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
if(program==NULL && args_in==NULL)