From: Theodore Ts'o Date: Sat, 16 Apr 2005 17:56:03 +0000 (-0400) Subject: Fix typo so that we actually ignore environment variables when gid != egid. X-Git-Tag: E2FSPROGS-1_38-WIP-0509~26 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=09f3eba28a4d3c050a548eab571b73352b131021;p=tools%2Fe2fsprogs.git Fix typo so that we actually ignore environment variables when gid != egid. --- diff --git a/lib/blkid/cache.c b/lib/blkid/cache.c index 5813bbc..0ecaa2d 100644 --- a/lib/blkid/cache.c +++ b/lib/blkid/cache.c @@ -33,7 +33,7 @@ int blkid_debug_mask = 0; static char *safe_getenv(const char *arg) { - if ((getuid() != geteuid()) || (getgid() != getgid())) + if ((getuid() != geteuid()) || (getgid() != getegid())) return NULL; #if HAVE_PRCTL if (prctl(PR_GET_DUMPABLE) == 0) diff --git a/lib/ext2fs/test_io.c b/lib/ext2fs/test_io.c index f4d9b99..3720f0a 100644 --- a/lib/ext2fs/test_io.c +++ b/lib/ext2fs/test_io.c @@ -142,7 +142,7 @@ static void test_abort(io_channel channel, unsigned long block) static char *safe_getenv(const char *arg) { - if ((getuid() != geteuid()) || (getgid() != getgid())) + if ((getuid() != geteuid()) || (getgid() != getegid())) return NULL; #if HAVE_PRCTL if (prctl(PR_GET_DUMPABLE) == 0) diff --git a/lib/ss/pager.c b/lib/ss/pager.c index 4030c7f..9aaa72a 100644 --- a/lib/ss/pager.c +++ b/lib/ss/pager.c @@ -43,7 +43,7 @@ extern char *getenv PROTOTYPE((const char *)); char *ss_safe_getenv(const char *arg) { - if ((getuid() != geteuid()) || (getgid() != getgid())) + if ((getuid() != geteuid()) || (getgid() != getegid())) return NULL; #if HAVE_PRCTL if (prctl(PR_GET_DUMPABLE) == 0)