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