Fix typo so that we actually ignore environment variables when gid != egid.

This commit is contained in:
Theodore Ts'o 2005-04-16 13:56:03 -04:00
parent 5e91614349
commit 09f3eba28a
3 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)