aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2012-09-04 09:25:18 +0200
committerFlorian Weimer <fweimer@redhat.com>2012-09-04 14:36:56 +0200
commit292378045ce335a3aabfc2724dbc499f026995f3 (patch)
treeea05d12402f743ef1dd23d658f75f35fa1f26879 /stdlib
parent60160d83a09c659d8d9338b210ff92be77cc87d5 (diff)
downloadglibc-292378045ce335a3aabfc2724dbc499f026995f3.tar
glibc-292378045ce335a3aabfc2724dbc499f026995f3.tar.gz
glibc-292378045ce335a3aabfc2724dbc499f026995f3.tar.bz2
glibc-292378045ce335a3aabfc2724dbc499f026995f3.zip
stdlib/tst-secure-getenv.c (alternative_main): Only warn on SGID failures
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/tst-secure-getenv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/stdlib/tst-secure-getenv.c b/stdlib/tst-secure-getenv.c
index 276b0aff7b..b52aaf0b19 100644
--- a/stdlib/tst-secure-getenv.c
+++ b/stdlib/tst-secure-getenv.c
@@ -228,9 +228,10 @@ alternative_main (int argc, char **argv)
{
if (getgid () == getegid ())
{
- printf ("SGID failed: GID and EGID match (%jd)\n",
+ /* This can happen if the file system is mounted nosuid. */
+ fprintf (stderr, "SGID failed: GID and EGID match (%jd)\n",
(intmax_t) getgid ());
- exit (2);
+ exit (MAGIC_STATUS);
}
if (getenv ("PATH") == NULL)
{