Skip to content

Commit

Permalink
Merge 613e601 into c95cdad
Browse files Browse the repository at this point in the history
  • Loading branch information
casantos committed Oct 19, 2019
2 parents c95cdad + 613e601 commit 557ed16
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/system.c
Expand Up @@ -215,10 +215,12 @@ static int _sys_chk_seccomp_flag_kernel(int flag)
/* this is an invalid seccomp(2) call because the last argument
* is NULL, but depending on the errno value of EFAULT we can
* guess if the filter flag is supported or not */
if (sys_chk_seccomp_syscall() == 1 &&
syscall(_nr_seccomp, SECCOMP_SET_MODE_FILTER, flag, NULL) == -1 &&
errno == EFAULT)
int rc;
if (sys_chk_seccomp_syscall() == 1) {
rc = syscall(_nr_seccomp, SECCOMP_SET_MODE_FILTER, flag, NULL);
if (rc == -1 && errno == EFAULT)
return 1;
}

return 0;
}
Expand Down

0 comments on commit 557ed16

Please sign in to comment.