1#include "capsicum.h"
2#include "capsicum-test.h"
3
4#ifdef HAVE_SYSCTL
5#include <sys/sysctl.h>
6
7// Certain sysctls are permitted in capability mode, but most are not.  Test
8// for the ones that should be, and try one or two that shouldn't.
9TEST(Sysctl, Capability) {
10  int oid[2] = {CTL_KERN, KERN_OSRELDATE};
11  int ii;
12  size_t len = sizeof(ii);
13  EXPECT_OK(sysctl(oid, 2, &ii, &len, NULL, 0));
14}
15#endif
16