cybersecurity · intermediate · ~15 min · safe pentest lab
Model an allowlist filter.
Implement int syscall_allowed(const int *allow, int n, int nr) returning 1 if syscall number nr is in the allowlist array, else 0.
int syscall_allowed(const int *allow, int n, int nr) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.