void test_open(const char *path)
{
	int fd = open(path, O_RDONLY);
	if (fd >= 0) {
		fprintf(stderr, "leak at open of %s\n", path);
		exit(1);
	}
	if (errno != ENOENT) {
		fprintf(stderr, "leak at open of %s: errno was %d\n", path, 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.