diff options
author | Paul Moore <pmoore@redhat.com> | 2013-11-12 15:14:41 -0500 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2013-11-12 15:14:41 -0500 |
commit | 053bcac036c09966f6b2c8aba38fbcdd3209b63f (patch) | |
tree | f45f9908a35e0f1775ecc92fe06fc8bb5033f6bd /src/api.c | |
parent | 2537127be66891fd42392b581518ad44da6fd6b4 (diff) | |
download | libseccomp-053bcac036c09966f6b2c8aba38fbcdd3209b63f.tar.gz |
api: ensure we return the proper error codes in the syscall resolver functions
At some point we may want to expand __NR_SCMP_ERROR out to different
error codes, but for right now this seems okay.
Reported-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'src/api.c')
-rw-r--r-- | src/api.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -286,15 +286,15 @@ API int seccomp_syscall_resolve_name_arch(uint32_t arch_token, const char *name) const struct arch_def *arch; if (name == NULL) - return -EINVAL; + return __NR_SCMP_ERROR; if (arch_token == 0) arch_token = arch_def_native->token; if (arch_valid(arch_token)) - return -EINVAL; + return __NR_SCMP_ERROR; arch = arch_def_lookup(arch_token); if (arch == NULL) - return -EFAULT; + return __NR_SCMP_ERROR; return arch_syscall_resolve_name(arch, name); } |