From nobody Thu Jun 4 11:07:17 2026 X-Original-To: dev-commits-src-main@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 4gWMGZ00TGz6gXXX for ; Thu, 04 Jun 2026 11:07:18 +0000 (UTC) (envelope-from git@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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gWMGY3Qcgz3HH5 for ; Thu, 04 Jun 2026 11:07:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780571237; 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=8yyxFvo0+rXSVFArxJjb5OpdHSnVYr1cZuVwOhWK3JY=; b=mti0bVs76S7p9KLbRRFx7l+rbom7A6s5iZ3OVSH91oYn/KtqpPTj2zsPVBAKFMEx7qROub BM8fy+h02qGHhEc4rt4YtmumI9k9616LlL6uvNRbPZGiMnZVD6l3CtoSKDDZ7CA/WJ6qRG W7R+9dJWj75KYQeQu/7XyNIgy1KdLQivm5jECuHzF+ExmuWfmhrQ5u+vmI8icmeZ6FbboW DZUm+FJb+9T09t3k18Sj5hr5xzX1rASXvOOlentXPCaoXkolLKXjp/3HG25FRZdkAY6Mxj NiDwCabFu04zA9B3YyUoFFzIp+i/V4WJRduLFlnZcuS7zWQDrNftSpyj7KR0Lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780571237; a=rsa-sha256; cv=none; b=RaIKfR36yTH4GAEIGDogeMT7q0YRkQT9WuJoyIS13qdZaL1dKtl82wlhg9NCV4pMg0fCPl QJuCQ4FMJsrFi+79+BXQGm2hC2cpxliF9gsbsnYKabspeP0G4j9NG7nd1BrC4Xy/W296AA iUPojUAK//WZLTDdANJZJSwemVJxYfsmbEgUqa3jw71RNE/htG2nhJ8kpzI0cZFZmT3NBS Xw4OMqIr9/9Pj36Zo9WMhlWW6tAVG6xupD0tHspAs/bWCdKoVElVQ9LNCPMDRIaRpB6cUi DTVbQp++pdCaXKUe2DEKSHGJRI9tsqgXTNf/8wSQVTNDgVL8CepMrL65pjZU8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780571237; 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=8yyxFvo0+rXSVFArxJjb5OpdHSnVYr1cZuVwOhWK3JY=; b=IKExOfGqinzxfTaMlAif2kg/helFoYGRhsXss4EwoHey5EP/Iyo5GnD+2V06g7zZ9w/0L3 Phj14h27stxi/HxHQL8VMwOtXAu2Non1qxyIsoBXMbFIkxGGJbnqYtcATmsqg1oTBCpJx2 NpQF7vG0XCLDu1yPIriuLfuKwMEAayMxHGJ5sH6JalrQEm5p5DDOkEt9ilwTeHzBHslPDM cTyPhdVYWbkdYaLpbRgXDFHg8pX8ONd9yBW94f1yh3N2bB79BWFnlkYD4L6cOsd6R/590e /+7ZG8K2W6SaK+6Bq7eqjBM9kSGjr2MCtaqH4MGJqXQ3T6PaNQymL4dpt8ZAnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gWMGY2gYxzvp1 for ; Thu, 04 Jun 2026 11:07:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d1e6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 04 Jun 2026 11:07:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 0c2d64ce3da9 - main - MAC/do: Clarify comments about flags attached per-ID or per-ID-type List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c2d64ce3da9c042da133c8b6d7391abb177f2c9 Auto-Submitted: auto-generated Date: Thu, 04 Jun 2026 11:07:17 +0000 Message-Id: <6a215c65.1d1e6.4f247672@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=0c2d64ce3da9c042da133c8b6d7391abb177f2c9 commit 0c2d64ce3da9c042da133c8b6d7391abb177f2c9 Author: Olivier Certner AuthorDate: 2026-06-04 10:01:23 +0000 Commit: Olivier Certner CommitDate: 2026-06-04 11:06:39 +0000 MAC/do: Clarify comments about flags attached per-ID or per-ID-type No functional change. MFC after: 3 days Sponsored by: The FreeBSD Foundation --- sys/security/mac_do/mac_do.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 7bb3e2a150c5..d150c8bcb228 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -123,20 +123,22 @@ _Static_assert(sizeof(uid_t) == sizeof(u_int) && (uid_t)-1 >= 0 && * encoding for simplicity. * * There is currently room for "only" 16 bits. As these flags are purely - * internal, they can be renumbered and/or their type changed as needed. + * internal, they can be renumbered and/or the underlying type changed as + * needed. * * See also the check_*() functions below. */ typedef uint16_t flags_t; -/* (i,gid) Specification concerns primary groups. */ +/* (i,gid) Group can appear as a primary group. */ #define MDF_PRIMARY (1u << 0) -/* (i,gid) Specification concerns supplementary groups. */ +/* (i,gid) Group can appear as a supplementary group. */ #define MDF_SUPP_ALLOW (1u << 1) /* (i,gid) Group must appear as a supplementary group. */ #define MDF_SUPP_MUST (1u << 2) /* (i,gid) Group must not appear as a supplementary group. */ #define MDF_SUPP_DONT (1u << 3) +/* (i,gid) Mask to detect a supplementary group specification. */ #define MDF_SUPP_MASK (MDF_SUPP_ALLOW | MDF_SUPP_MUST | MDF_SUPP_DONT) #define MDF_ID_MASK (MDF_PRIMARY | MDF_SUPP_MASK) @@ -144,8 +146,8 @@ typedef uint16_t flags_t; * (t) All IDs allowed. * * For GIDs, MDF_ANY only concerns primary groups. The MDF_PRIMARY and - * MDF_SUPP_* flags never apply to MDF_ANY, but can be present if MDF_CURRENT is - * present also, as usual. + * MDF_SUPP_* flags do not apply to MDF_ANY, but can be present if MDF_CURRENT + * is present also, as for explicit IDs. */ #define MDF_ANY (1u << 8) /* (t) Current IDs allowed. */