diff options
author | Kenta Tada <Kenta.Tada@sony.com> | 2020-04-15 17:14:44 +0900 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-05-30 09:53:38 -0400 |
commit | ab57460fa781a1ef9e3860f1314a3cb8738f94ed (patch) | |
tree | 3386b9192b0df1bbcd5347c93216133a75cab215 | |
parent | 7780b0853eff8521bbf79611656c68fadc1dab3d (diff) | |
download | libseccomp-ab57460fa781a1ef9e3860f1314a3cb8738f94ed.tar.gz |
api: fix api update to check if SCMP_ACT_NOTIFY is supported
Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
-rw-r--r-- | include/seccomp.h.in | 3 | ||||
-rw-r--r-- | src/api.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/seccomp.h.in b/include/seccomp.h.in index 8115b50..0266e12 100644 --- a/include/seccomp.h.in +++ b/include/seccomp.h.in @@ -413,6 +413,9 @@ const struct scmp_version *seccomp_version(void); * support for the SCMP_ACT_KILL_PROCESS action * 4 : support for the SCMP_FLTATR_CTL_SSB filter attrbute * 5 : support for the SCMP_ACT_NOTIFY action + * support for using seccomp_notify_receive() + * support for using seccomp_notify_respond() + * support for using seccomp_notify_id_valid() * */ unsigned int seccomp_api_get(void); @@ -115,7 +115,8 @@ static unsigned int _seccomp_api_update(void) level = 4; if (level == 4 && - sys_chk_seccomp_flag(SECCOMP_FILTER_FLAG_NEW_LISTENER) == 1) + sys_chk_seccomp_flag(SECCOMP_FILTER_FLAG_NEW_LISTENER) == 1 && + sys_chk_seccomp_action(SCMP_ACT_NOTIFY) == 1) level = 5; /* update the stored api level and return */ |