diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2023-12-13 12:44:50 +0100 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2023-12-20 08:41:06 +0100 |
commit | 3150cc0c9019bf9da841419f86dda8e7f26d676d (patch) | |
tree | 3d49bd90f1ee04d140f2824bfd4e509ad5d11435 /elf/Makefile | |
parent | 50bef9bd63e7fb94f1d2cc8b7809256ffc73b2ef (diff) | |
download | glibc-3150cc0c9019bf9da841419f86dda8e7f26d676d.tar glibc-3150cc0c9019bf9da841419f86dda8e7f26d676d.tar.gz glibc-3150cc0c9019bf9da841419f86dda8e7f26d676d.tar.bz2 glibc-3150cc0c9019bf9da841419f86dda8e7f26d676d.zip |
Fix elf/tst-env-setuid[-static] if test needs to be rerun.
If /tmp is mounted nosuid and make xcheck is run,
then tst-env-setuid fails UNSUPPORTED with "SGID failed: GID and EGID match"
and /var/tmp/tst-sonamemove-runmod1.so.profile is created.
If you then try to rerun the test with a suid mounted test-dir
(the SGID binary is created in test-dir which defaults to /tmp)
with something like that:
make tst-env-setuid-ENV="TMPDIR=..." t=elf/tst-env-setuid test
the test fails as the LD_PROFILE output file is still available
from the previous run.
Thus this patch removes the LD_PROFILE output file in parent
before spawning the SGID binary.
Even if LD_PROFILE is not supported anymore in static binaries,
use a different library and thus output file for tst-env-setuid
and tst-env-setuid-static in order to not interfere if both
tests are run in parallel.
Furthermore the checks in test_child are now more verbose.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/Makefile')
-rw-r--r-- | elf/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/elf/Makefile b/elf/Makefile index afec7be084..87aac923ba 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -3015,6 +3015,7 @@ tst-env-setuid-ARGS = -- $(host-test-program-cmd) # Reuse a module with a SONAME, to specific as the LD_PROFILE. $(objpfx)tst-env-setuid: $(objpfx)tst-sonamemove-runmod2.so +$(objpfx)tst-env-setuid-static.out: $(objpfx)tst-sonamemove-runmod1.so # The object tst-nodeps1-mod.so has no explicit dependencies on libc.so. $(objpfx)tst-nodeps1-mod.so: $(objpfx)tst-nodeps1-mod.os |