void test_unlink(const char *path)
{
	if (unlink(path) == 0) {
		fprintf(stderr, "leak at unlink of %s\n", path);
		exit(1);
	}
	if (errno != ENOENT && errno != ENOSYS) {
		fprintf(stderr, "leak at unlink of %s: errno was %s\n", path, strerror(errno));
		exit(1);
	}
}
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.