stdlib/tst-secure-getenv.c (alternative_main): Only warn on SGID failures
authorFlorian Weimer <fweimer@redhat.com>
Tue, 4 Sep 2012 07:25:18 +0000 (09:25 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 4 Sep 2012 12:36:56 +0000 (14:36 +0200)
ChangeLog
stdlib/tst-secure-getenv.c

index 9a041eb..9606f3c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-04  Florian Weimer  <fweimer@redhat.com>
+
+       * stdlib/tst-secure-getenv.c (alternative_main): Only warn on SGID
+       failures.
+
 2012-09-04  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #9914]
index 276b0af..b52aaf0 100644 (file)
@@ -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)
        {