]> git.ipfire.org Git - thirdparty/systemd.git/commit
seccomp: mmap test results depend on kernel/libseccomp/glibc 14167/head
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Wed, 4 Dec 2019 10:44:32 +0000 (11:44 +0100)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Thu, 5 Dec 2019 06:19:12 +0000 (07:19 +0100)
commit49219b5c2a654ee6639887aa21a78b41da0576f1
tree6af7aaf161a2789fc6d451a4c69b714a904331cf
parent5ef3ed97e3c718be790b1f38928ca66cb68250a8
seccomp: mmap test results depend on kernel/libseccomp/glibc

Like with shmat already the actual results of the test
test_memory_deny_write_execute_mmap depend on kernel/libseccomp/glibc
of the platform it is running on.

There are known-good platforms, but on the others do not assert success
(which implies test has actually failed as no seccomp blocking was achieved),
but instead make the check dependent to the success of the mmap call
on that platforms.

Finally the assert of the munmap on that valid pointer should return ==0,
so that is what the check should be for in case of p != MAP_FAILED.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
src/test/test-seccomp.c