Files
src/tests/sys/capsicum/sysctl.cc
T
Alan Somers fba81b33aa capsicum-tests: remove Linux support
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
2026-02-16 17:29:32 -07:00

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));
}