This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] tunables: Fail tests correctly when setgid does not work


On Thu, Feb 2, 2017 at 1:31 PM, Siddhesh Poyarekar
<siddhesh@sourceware.org> wrote:
> 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.

This works as expected.

Both tests are now UNSUPPORTED on my system where /tmp is mounted as nosuid.

For this test to pass I need to use a TMPDIR which is not nosuid.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]