Date: Thu, 01 Dec 2022 16:59:07 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 268101] Inconsistent use of errno in cap_sysctl.h Message-ID: <bug-268101-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268101 Bug ID: 268101 Summary: Inconsistent use of errno in cap_sysctl.h Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: asomers@FreeBSD.org If WITH_CASPER is defined, then all of the functions in cap_sysctl.h will s= et errno on failure. However, if it is not defined, then all of those functio= ns' stubs will fail yet not set errno. errno will be populated with some stale value. Instead, the stubs should set errno. Perhaps EOPNOTSUPP? Or even EDOOFUS because the caller shouldn't be using those functions without defining WITH_CASPER? In fact, I think it would've been a better design decision if those functio= ns would succeed whenever capability mode is disabled, much like caph_enter. = But that horse has left the barn. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268101-227>