fba81b33aa
Now that this project is part of freebsd-src, it no longer needs to be portable. Remove Linux-only tests, cross-os compatibility code, and compatibility with older FreeBSD versions. Leave in place some originally Linux-only tests that could now be ported to FreeBSD, like the pipe2 tests. Sponsored by: ConnectWise Reviewed by: oshogbo Differential Revision: https://reviews.freebsd.org/D54985
14 lines
377 B
C++
14 lines
377 B
C++
#include "capsicum.h"
|
|
#include "capsicum-test.h"
|
|
|
|
#include <sys/sysctl.h>
|
|
|
|
// Certain sysctls are permitted in capability mode, but most are not. Test
|
|
// for the ones that should be, and try one or two that shouldn't.
|
|
TEST(Sysctl, Capability) {
|
|
int oid[2] = {CTL_KERN, KERN_OSRELDATE};
|
|
int ii;
|
|
size_t len = sizeof(ii);
|
|
EXPECT_OK(sysctl(oid, 2, &ii, &len, NULL, 0));
|
|
}
|