From 9d5a10a4530c8579b034f7e7492ad4829ae883a8 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 17 Jul 2008 19:40:53 +0000 Subject: Do not run the setuid test if running under as root proper. Documentation fixes. Some enhancements for the new OpenPGP Card. --- g10/exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'g10/exec.c') 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) -- cgit v1.2.3