View | Details | Raw Unified | Return to bug 236857 | Differences between
and this patch

Collapse All | Expand All

(-)tests/sys/audit/process-control.c (-2 / +7 lines)
Lines 40-45 Link Here
40
#include <sys/wait.h>
40
#include <sys/wait.h>
41
41
42
#include <atf-c.h>
42
#include <atf-c.h>
43
#include <errno.h>
43
#include <fcntl.h>
44
#include <fcntl.h>
44
#include <signal.h>
45
#include <signal.h>
45
#include <stdint.h>
46
#include <stdint.h>
Lines 1515-1522 Link Here
1515
	int capinfo;
1516
	int capinfo;
1516
	size_t len = sizeof(capinfo);
1517
	size_t len = sizeof(capinfo);
1517
	const char *capname = "kern.features.security_capability_mode";
1518
	const char *capname = "kern.features.security_capability_mode";
1518
	ATF_REQUIRE_EQ(0, sysctlbyname(capname, &capinfo, &len, NULL, 0));
1519
1519
1520
	if (sysctlbyname(capname, &capinfo, &len, NULL, 0) == -1)
1521
 		atf_tc_skip("sysctl for %s failed: %s", capname, strerror(errno));
1522
1520
	/* Without CAPABILITY_MODE enabled, cap_enter() returns ENOSYS */
1523
	/* Without CAPABILITY_MODE enabled, cap_enter() returns ENOSYS */
1521
	if (!capinfo)
1524
	if (!capinfo)
1522
		atf_tc_skip("Capsicum is not enabled in the system");
1525
		atf_tc_skip("Capsicum is not enabled in the system");
Lines 1553-1560 Link Here
1553
	int capinfo, modep;
1556
	int capinfo, modep;
1554
	size_t len = sizeof(capinfo);
1557
	size_t len = sizeof(capinfo);
1555
	const char *capname = "kern.features.security_capability_mode";
1558
	const char *capname = "kern.features.security_capability_mode";
1556
	ATF_REQUIRE_EQ(0, sysctlbyname(capname, &capinfo, &len, NULL, 0));
1557
1559
1560
	if (sysctlbyname(capname, &capinfo, &len, NULL, 0) == -1)
1561
		atf_tc_skip("sysctl for %s failed: %s", capname, strerror(errno));
1562
1558
	/* Without CAPABILITY_MODE enabled, cap_getmode() returns ENOSYS */
1563
	/* Without CAPABILITY_MODE enabled, cap_getmode() returns ENOSYS */
1559
	if (!capinfo)
1564
	if (!capinfo)
1560
		atf_tc_skip("Capsicum is not enabled in the system");
1565
		atf_tc_skip("Capsicum is not enabled in the system");

Return to bug 236857