TOCTTOU
Overview
Example
if (!access("/tmp/X", W_OK))
{
/* the real user has the write permission. */
f = open("/tmp/X", O_WRITE);
write_to_file(f);
}
else
{
/* the real user does not have the write permission. */
fprintf(stderr, "Permission denied\n");
}Reference
Last updated