From 2d2eca8c9d942abab8bfb28cd4a068ef1b7e1189 Mon Sep 17 00:00:00 2001 From: Anton Lindqvist Date: Tue, 1 Dec 2020 19:30:50 +0100 Subject: sys/openbsd: neutralize sysctl kern.witness Do not fiddle with witness since we explicit values as part of the kernel configuration in dashboard/config/openbsd. --- sys/openbsd/init.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys/openbsd/init.go') diff --git a/sys/openbsd/init.go b/sys/openbsd/init.go index c72a80931..e90ffb115 100644 --- a/sys/openbsd/init.go +++ b/sys/openbsd/init.go @@ -20,6 +20,7 @@ func InitTarget(target *prog.Target) { DIOCKILLSTATES: target.GetConst("DIOCKILLSTATES"), KERN_MAXCLUSTERS: target.GetConst("KERN_MAXCLUSTERS"), KERN_MAXTHREAD: target.GetConst("KERN_MAXTHREAD"), + KERN_WITNESS: target.GetConst("KERN_WITNESS"), S_IFCHR: target.GetConst("S_IFCHR"), S_IFMT: target.GetConst("S_IFMT"), MCL_FUTURE: target.GetConst("MCL_FUTURE"), @@ -40,6 +41,7 @@ type arch struct { DIOCKILLSTATES uint64 KERN_MAXCLUSTERS uint64 KERN_MAXTHREAD uint64 + KERN_WITNESS uint64 S_IFCHR uint64 S_IFMT uint64 MCL_FUTURE uint64 @@ -247,6 +249,11 @@ func (arch *arch) neutralizeSysctlKern(mib []*prog.ConstArg) bool { return true } + if len(mib) >= 2 && + mib[0].Val == arch.CTL_KERN && mib[1].Val == arch.KERN_WITNESS { + return true + } + return false } -- cgit mrf-deployment