diff options
author | Paul Moore <pmoore@redhat.com> | 2014-05-08 17:37:56 -0400 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2014-05-08 18:16:30 -0400 |
commit | 4dae02fefcc52e8a4cc1584293deb743e4cf22b1 (patch) | |
tree | e7ccdeff3bd5caf8a17753b621df0fd2c84a1dde /include | |
parent | e9bb8dee7fef7e4c5971eee59a6e0cb12564c5f6 (diff) | |
download | libseccomp-4dae02fefcc52e8a4cc1584293deb743e4cf22b1.tar.gz |
api: add an API to do translated/rewriten syscall resolution
This patch also converts the seccomp.resolve_syscall() method to use
the new resolution API.
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/seccomp.h.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/seccomp.h.in b/include/seccomp.h.in index e119c8c..76a56fe 100644 --- a/include/seccomp.h.in +++ b/include/seccomp.h.in @@ -375,6 +375,20 @@ char *seccomp_syscall_resolve_num_arch(uint32_t arch_token, int num); int seccomp_syscall_resolve_name_arch(uint32_t arch_token, const char *name); /** + * Resolve a syscall name to a number and perform any rewriting necessary + * @param arch_token the architecture token, e.g. SCMP_ARCH_* + * @param name the syscall name + * + * Resolve the given syscall name to the syscall number for the given + * architecture and do any necessary syscall rewriting needed by the + * architecture. Returns the syscall number on success, including negative + * pseudo syscall numbers (e.g. __PNR_*); returns __NR_SCMP_ERROR on failure. + * + */ +int seccomp_syscall_resolve_name_rewrite_arch(uint32_t arch_token, + const char *name); + +/** * Resolve a syscall name to a number * @param name the syscall name * |