From nobody Thu Dec 01 16:59:07 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NNMjm0Q7Vz4jhRj for ; Thu, 1 Dec 2022 16:59:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NNMjl6Fnyz4TdN for ; Thu, 1 Dec 2022 16:59:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669913947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3eXXrNAfVdmNliPs8XEr2Pm0A+c9mSITTfw9Aa7y45E=; b=VadeB9WE6fiYzhl9pmnFfaQCRrP5TblRshuNRuAn9oFsEMAqC9VYrrtvacgG4l2iEXdVh7 kOrfyLPS8ItiZkQIZ9DHc+jMoa6RUU+nMmlrrUs5cZsx9rajr8YpBMAdL94tvpZeWKQFic ioIfL17gSB+bx03XAsfwA41l4fJ6HG34L+0lvYkAvX8LH7OKxJJI4afKsf40Vn7vo73U+E 2VoXwKMRu4dv2Bs1BsVTYM0MmAsD6oswbQCkUCbApul6Z0aHUkl6gM01OhB1AcyspNFC3k M5XPQDB+jr8CRyPQfMk2PuHHtoUXYVtzyPwgyT0vpH3Wq+siIh5e39QYn+sTRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669913947; a=rsa-sha256; cv=none; b=bvNukPBB0OxZ4uZg7axOuymNlDZMPtbaoDzg1yhYY1jYZM33oMMMnefd2CWHdlKnnJM+sH cv4zh8oFplJ3qxo6zBssc9RNLlO3NNHIOkaoETwIh6KjVcRkhmK6tLlDqtgJU33CKcOyeT ws126+3wTyFShgI3Qe/0vTi55AUE3j/OC5NxNOleqeOvrMtEu8zwxnkJitEi4vRyLDZpTN FUAv/LeyqlGAfsVEXT3U3HfzbFbx3k7sZQxVvk2DU/GzdOo1p6FJWJ/9qgiDv+1MDkaApQ cvRnGqRo5BCGZvz3fzXitjY55evEwpEVhzE3lnzqCn2yak1UHRbqOUNE2q0DkQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NNMjl5BdTzkSZ for ; Thu, 1 Dec 2022 16:59:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 2B1Gx7qO078116 for ; Thu, 1 Dec 2022 16:59:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2B1Gx7HI078115 for bugs@FreeBSD.org; Thu, 1 Dec 2022 16:59:07 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 268101] Inconsistent use of errno in cap_sysctl.h Date: Thu, 01 Dec 2022 16:59:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: asomers@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N 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.=