diff options
author | Werner Koch <wk@gnupg.org> | 2008-07-17 21:40:53 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2008-07-17 21:40:53 +0200 |
commit | 9d5a10a4530c8579b034f7e7492ad4829ae883a8 (patch) | |
tree | 127fca25e584b5189a957297e6f984a1271b5612 /g10 | |
parent | Minor fixes. (diff) | |
download | gnupg2-9d5a10a4530c8579b034f7e7492ad4829ae883a8.tar.xz gnupg2-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 'g10')
-rw-r--r-- | g10/ChangeLog | 5 | ||||
-rw-r--r-- | g10/exec.c | 6 | ||||
-rw-r--r-- | g10/gpg.c | 6 |
3 files changed, 11 insertions, 6 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 4aa1ed114..342c012ee 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,8 @@ +2008-07-17 Werner Koch <wk@g10code.com> + + * gpg.c (main): Do not run the setuid test for root. + * exec.c (exec_write): Ditto. + 2008-06-25 Marcus Brinkmann <marcus@g10code.de> * gpg.c (enum cmd_and_opt_values): Remove option 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) @@ -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; |