From nobody Fri Nov 15 13:00:43 2024 X-Original-To: dev-commits-src-all@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 4XqcZg5LY6z5d6gL; Fri, 15 Nov 2024 13:00:43 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqcZg4K9kz4ntB; Fri, 15 Nov 2024 13:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675643; 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=uWooGjbu2FGS+1agvTJQ4MMcDpY7wyAw/IL0npQ5FQU=; b=wTsDp/mIvthdwsb1X9I608Og105F6ky53pSN9JCTHlY1w/6U/gXh/XLTkGS25ubRC+Vg5e IUMqnY+ZYjSK7IqPHf10424swkwDKmzp7AkCdCZnr7VBA1CBrhH8oZ1/5VGVO4r0QZfMqM xJYrW/+jCTiLPbG5f5Anj7lGi7RwxUwKaSf5pMYrHERIAhaH6WSiY3BK9mEP7ffIlDgc+O PbOptVGo4Hi5aZxwTTqJoJHPuw+OfCInWMoJvCi+KaiSsI183rfPzZ0aEB7g7NbUGOgKNL jdTf+ca30kd57quyWgXOEsNDzEEyyTkoyjfWHMzjZq2bnPn5naIOewz4BA3pEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675643; 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=uWooGjbu2FGS+1agvTJQ4MMcDpY7wyAw/IL0npQ5FQU=; b=c6oEOTbnshin2Po1HXRCurWm70ol/8mVwpZ1XoxMiemMfWc/lhdPib1pm3gYP1aY9Tu3YE 1op6zMsP/fk2O5T2ZEHrpp5eVd7B4wxwZqKoTEl/jPh7sn+ldO2kRGqNjvElnX04KxOyfx VtjB4HfWRW53vqxABSoBIQrs+pCCJOJmIHhVOUwGFi6aTk5BRDgzqWH/e86lB4cwirCytB UlY4F0VnjwaAL47SfIvuA6mn2jANS/opFvhXGZLdYvufWcZ/nmUV0zne8l7gVaOTwjp3YF MoH1EJWXlDmrDxikyd11fj2UuXuI4chJJJN2MNce0j/NMwSkKjJ2r5gIAM8wqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675643; a=rsa-sha256; cv=none; b=eivPYLlykBHRn4mUdgDPv9d9LBaFMi017jyea5f/wNAfA1xFSlol6o0xOCXaG2Nj9boz44 m0oBrcnHIA4aCLPGKW5jklylpTAcN1RQ4SGcRDj+nHD3r/lRfOuyWs5+9oVZHU2ncbF0uG m5MyOs8kOe8BtOsEZpFNFkP7qPZBt9C60+HqhJfE1PLQ/Stlp38zeHQMx46fE5eAsYq2WZ bhOCUeYZBK1aR1/VruG6Irx5AVIkkcaynykiz0jMMmW8+rz/Vbd1AGORRp9RADGx1d15wJ wdKV2k0gJ05iXrOyKilfzf4Vu5oSGP9jjBP8a1/UJzLGS8Mt0q5zvU3PpMHwQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4XqcZg3chCzNvM; Fri, 15 Nov 2024 13:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFD0he4069786; Fri, 15 Nov 2024 13:00:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0hqw069783; Fri, 15 Nov 2024 13:00:43 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:43 GMT Message-Id: <202411151300.4AFD0hqw069783@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 5e0787bf710f - stable/13 - cred: Constify signature of groupmember() and realgroupmember() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 5e0787bf710f1e8c0ae186a32ff39fa2c3ded25d Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5e0787bf710f1e8c0ae186a32ff39fa2c3ded25d commit 5e0787bf710f1e8c0ae186a32ff39fa2c3ded25d Author: Olivier Certner AuthorDate: 2024-10-30 10:59:49 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:07 +0000 cred: Constify signature of groupmember() and realgroupmember() Reviewed by emaste Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47343 (cherry picked from commit b15110fb0dc6f0480482616f22bda3a2a19fbd80) Approved by: markj (mentor) --- share/man/man9/groupmember.9 | 6 +++--- sys/kern/kern_prot.c | 4 ++-- sys/sys/ucred.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index ae7ccd477955..ea1a7fdbebd4 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd August 18, 2023 +.Dd October 31, 2024 .Dt GROUPMEMBER 9 .Os .Sh NAME @@ -35,9 +35,9 @@ .In sys/param.h .In sys/ucred.h .Ft int -.Fn groupmember "gid_t gid" "struct ucred *cred" +.Fn groupmember "gid_t gid" "const struct ucred *cred" .Ft int -.Fn realgroupmember "gid_t gid" "struct ucred *cred" +.Fn realgroupmember "gid_t gid" "const struct ucred *cred" .Sh DESCRIPTION The .Fn groupmember diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index c80db8efeee8..0ec3df305048 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1303,7 +1303,7 @@ group_is_supplementary(const gid_t gid, const struct ucred *const cred) * supplementary groups). */ int -groupmember(gid_t gid, struct ucred *cred) +groupmember(gid_t gid, const struct ucred *cred) { /* @@ -1324,7 +1324,7 @@ groupmember(gid_t gid, struct ucred *cred) * groups). */ int -realgroupmember(gid_t gid, struct ucred *cred) +realgroupmember(gid_t gid, const struct ucred *cred) { if (gid == cred->cr_rgid) return (1); diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 837c33757317..74e2d59c57ea 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -158,8 +158,8 @@ void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); -int groupmember(gid_t gid, struct ucred *cred); -int realgroupmember(gid_t gid, struct ucred *cred); +int groupmember(gid_t gid, const struct ucred *cred); +int realgroupmember(gid_t gid, const struct ucred *cred); #endif /* _KERNEL */ #endif /* !_SYS_UCRED_H_ */