From 09f3eba28a4d3c050a548eab571b73352b131021 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 16 Apr 2005 13:56:03 -0400 Subject: [PATCH] Fix typo so that we actually ignore environment variables when gid != egid. --- lib/blkid/cache.c | 2 +- lib/ext2fs/test_io.c | 2 +- lib/ss/pager.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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) -- 1.8.3.1