cybersecurity · intermediate · ~15 min
Recognise the symlink-refusal flag.
Implement int uses_nofollow(const char *flags) returning 1 if the open-flags string contains "O_NOFOLLOW", else 0.
#include <string.h>
int uses_nofollow(const char *flags) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.