This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.24-674-g53aa04a
- From: siddhesh at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 4 Feb 2017 06:33:09 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.24-674-g53aa04a
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 53aa04a86c10f49b7481e73d2ca045ecd6ed2df7 (commit)
from d675eaf7d99096a952c1d140abfed82c939fb259 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=53aa04a86c10f49b7481e73d2ca045ecd6ed2df7
commit 53aa04a86c10f49b7481e73d2ca045ecd6ed2df7
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date: Sat Feb 4 12:02:37 2017 +0530
tunables: Fail tests correctly when setgid does not work
The child process of the tst-env-setuid process was failing correctly
with EXIT_UNSUPPORTED but the parent did not carry that status forward
and failed instead. This patch fixes this so that tests on nosuid
/tmp fails gracefully with UNSUPPORTED. Tested by making my tmpfs
nosuid.
* elf/tst-env-setuid.c (do_execve): Return EXIT_UNSUPPORTED in
parent if child exited in that manner. Print WEXITSTATUS
instead of the raw status.
(do_test_prep): Rename to do_test.
(do_test): Return the result of run_executable_sgid.
(TEST_FUNCTION_ARGV): Adjust.
diff --git a/ChangeLog b/ChangeLog
index 9ed7ff6..767e22a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-02-04 Siddhesh Poyarekar <siddhesh@sourceware.org>
+
+ * elf/tst-env-setuid.c (do_execve): Return EXIT_UNSUPPORTED in
+ parent if child exited in that manner. Print WEXITSTATUS
+ instead of the raw status.
+ (do_test_prep): Rename to do_test.
+ (do_test): Return the result of run_executable_sgid.
+ (TEST_FUNCTION_ARGV): Adjust.
+
2017-02-03 Alexandre Oliva <aoliva@redhat.com>
Florian Weimer <fweimer@redhat.com>
Carlos O'Donell <carlos@redhat.com>
diff --git a/elf/tst-env-setuid.c b/elf/tst-env-setuid.c
index 85d423d..6ec3fa5 100644
--- a/elf/tst-env-setuid.c
+++ b/elf/tst-env-setuid.c
@@ -87,10 +87,13 @@ do_execve (char **args)
return 1;
}
+ if (WEXITSTATUS (status) == EXIT_UNSUPPORTED)
+ return EXIT_UNSUPPORTED;
+
if (!WIFEXITED (status) || WEXITSTATUS (status) != CHILD_STATUS)
{
printf ("Unexpected exit status %d from child process\n",
- status);
+ WEXITSTATUS (status));
return 1;
}
return 0;
@@ -235,7 +238,7 @@ test_parent (void)
#endif
static int
-do_test_prep (int argc, char **argv)
+do_test (int argc, char **argv)
{
/* Setgid child process. */
if (argc == 2 && strcmp (argv[1], SETGID_CHILD) == 0)
@@ -270,13 +273,12 @@ do_test_prep (int argc, char **argv)
exit (0);
}
- if (run_executable_sgid (target) == 0)
- exit (0);
+ return run_executable_sgid (target);
}
/* Something went wrong and our argv was corrupted. */
_exit (1);
}
-#define TEST_FUNCTION_ARGV do_test_prep
+#define TEST_FUNCTION_ARGV do_test
#include <support/test-driver.c>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 9 +++++++++
elf/tst-env-setuid.c | 12 +++++++-----
2 files changed, 16 insertions(+), 5 deletions(-)
hooks/post-receive
--
GNU C Library master sources