diff options
author | Max Rees <maxcrees@me.com> | 2020-12-14 14:53:23 -0500 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2021-03-05 18:52:15 -0500 |
commit | 83d7b022fa7ef8c24516cc668efc879e5398403f (patch) | |
tree | ef0457d7fb1b0f5233fadba7412e2c09ed971c5c /doc | |
parent | 6d5a0bb22c8162c167900a47d57ebdeeb22ff8c0 (diff) | |
download | libseccomp-83d7b022fa7ef8c24516cc668efc879e5398403f.tar.gz |
system: use old SECCOMP_IOCTL_NOTIF_ID_VALID number if necessary
Kernel commit 47e33c05f9f0 ("seccomp: Fix ioctl number for
SECCOMP_IOCTL_NOTIF_ID_VALID") changed the public definition of
SECCOMP_IOCTL_NOTIF_ID_VALID for correctness sake because it had the
wrong direction (no current functional change). If libseccomp is built
against kernel headers after this commit but is run on a kernel that was
built prior to this commit, then the ioctl will always return -1 EINVAL
and thus seccomp_notify_id_valid will incorrectly return -ENOENT.
Copy the (now non-public) definition of the old ioctl number and try it
if the ioctl with the number from the kernel headers fails with -1
EINVAL.
Also, update the fallback definition of SECCOMP_IOCTL_NOTIF_ID_VALID to
the new value.
Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Max Rees <maxcrees@me.com>
[PM: tweak some vertical whitespace, subject line]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions