diff options
author | Paul Moore <paul@paul-moore.com> | 2020-08-16 14:31:49 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-08-18 11:41:36 -0400 |
commit | bee43d3e884788569860a384e6a38357785a3995 (patch) | |
tree | f0fff0f62b46f292f865b80a8da16f393ee1603d /doc | |
parent | 5cd9059618a0810ee47c21e6b44c5a876b75e23d (diff) | |
download | libseccomp-bee43d3e884788569860a384e6a38357785a3995.tar.gz |
tests: use smaller "magic" numbers in 51-live-user_notification
On an x32 based system, and perhaps other 32-bit systems, the magic
value in test 51-live-user_notification was too large and resulted
in a failed comparison even when the userspace notification mechanism
was working properly.
This patch addresses this problem by using the parent process's PID
for the magic number. For all arches/ABIs we know it is a valid
return value for getpid() while also being one of the few PIDs that
the child process should never legitimately get from a call to
getpid().
This patch also restricts the use of SCMP_SYS() to only the
libseccomp API calls. This should help us catch arches/ABIs that
don't implement getpid(). I'm also not sure we want to be
responsible for using SCMP_SYS() outside of the libseccomp API.
Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions