Date: Fri, 22 Mar 2019 12:16:09 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 236714] Clang problem with rctl(8) Message-ID: <bug-236714-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236714 Bug ID: 236714 Summary: Clang problem with rctl(8) Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: trasz@FreeBSD.org I've stumbled upon something that seems to me to be a miscompilation issue in rctl(8). Basically, this code in usr.bin/rctl/rctl.c: racct_enable_len = sizeof(racct_enable); error = sysctlbyname("kern.racct.enable", &racct_enable, &racct_enable_len, NULL, 0); if (error != 0) { if (errno == ENOENT) errx(1, "RACCT/RCTL support not present in kernel; see rctl(8) for details"); err(1, "sysctlbyname"); } if (racct_enable == 0) errx(1, "RACCT/RCTL present, but disabled; enable using kern.racct.enable=1 tunable"); Doesn't work as expected unless the racct_enable is initialized before calling sysctlbyname(3). Without this change: % doas rctl rctl: failed to show rules for '::': Function not implemented With the change: % doas rctl rctl: RACCT/RCTL present, but disabled; enable using kern.racct.enable=1 tunable -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236714-227>
