From nobody Mon Dec 16 14:45:39 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 4YBjRS47m9z5hWQq; Mon, 16 Dec 2024 14:45:40 +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 4YBjRR5z8Cz4d9b; Mon, 16 Dec 2024 14:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734360339; 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=N93wm6J3mOnuwSzH6bfueUsuQi7IA+Es8CqrmawNY1U=; b=yrgbCb34ysxHPUCXZY8JOej3+6nJr4mCzAG6Pw2fW9gvsDronn7N8mDENdHEAJCkWtCc/R POdQy3pp5zsHwdvMwVhDL06fOMhz/aU89v+BrIpDaVM1iChJn9UyU52T4zTl0f0Did3VQD r9jn9hal5yLWEsbajAIWJceHO1+/QUiMLOhKsCyVho0Zj8/CK4M+13Ld2Pm6fVHHM2kost ImfVCsNpnpJVU6SOcBCbfiQ0+rpB29B2YSYMBFJQh/qCA8dQkrB5u3HBy82KoF6/oFFh7S KfdipVD32tnXWREQwLOC5jnQwJ/fASpU8XLcv6/k1CSr0ndVeM2b1HlCCwrBlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734360339; 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=N93wm6J3mOnuwSzH6bfueUsuQi7IA+Es8CqrmawNY1U=; b=IqMPn4cuPXJH8JBPDb3LfU83pnHNfPl6jTHJMA+z3KEM5ymXnIULx7QbloKApcYSmNryKq 2JF2yfZazuPkrrunx7D7A94gOG6SkolY0cg8VaSasY6lkE9iVP/yTXXG9xzWkmHposp9zp InoRomUUdDtCD1VlbKwwQE6vAvhYzl1nbztTWxMJ5f65t31T6ghjBJ2bzfz5I+OXMtyCYA YIa8aZqr8GnDx8UQ3H1fR5SbArZm98DM3kTvXuXHzOfTqTd3LgUBr1trSd2UcatEVMmC6H zhcGNvZmd2InylTZ6KSP0lTwJ0L9FiWk+vEZ4mugurYHYxPzi4O52WWIhNFY+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734360339; a=rsa-sha256; cv=none; b=sChxeTWz5BJPuO/upW6MwbJWvoTUTYzsn2dMMbEA7Nas+bllagqcdDo+G/8OsItDgsQ+EI zcpbJfZ1GOWfskRYz2MWt8x1wCZRNWa8hHu42HqdJDm63c0WGj70sYjmcbdAAJ7z7AAn7U Se9mMNUV0ExC32nfkmWGZXOaR8PKwNGxOeDnS6tobDGOaR2HaRkQ2bA3K55oliga9kOgPv w9v7QKiOtP6eIEgwOLCdYOySAZ40xM5egVPyvExArxiVbAgETzw+rGatXPmVNLJPzAE3n2 SvV4I7gxC1EQa16/xtHqdygpr67JOWCgxMezPzTmEAhtFKOURNjgWU3XVAnI2Q== 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 4YBjRR5ZKWzxWs; Mon, 16 Dec 2024 14:45:39 +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 4BGEjdWK052590; Mon, 16 Dec 2024 14:45:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BGEjdNj052587; Mon, 16 Dec 2024 14:45:39 GMT (envelope-from git) Date: Mon, 16 Dec 2024 14:45:39 GMT Message-Id: <202412161445.4BGEjdNj052587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 02ed945ccec4 - main - MAC/do: Rename private struct 'mac_do_rule' => 'rules' 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/main X-Git-Reftype: branch X-Git-Commit: 02ed945ccec43340208d3a9c152fb98f55dbed69 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=02ed945ccec43340208d3a9c152fb98f55dbed69 commit 02ed945ccec43340208d3a9c152fb98f55dbed69 Author: Olivier Certner AuthorDate: 2024-07-01 14:28:20 +0000 Commit: Olivier Certner CommitDate: 2024-12-16 14:42:33 +0000 MAC/do: Rename private struct 'mac_do_rule' => 'rules' To simplify and be consistent with 'struct rule'. Reviewed by: bapt Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47593 --- sys/security/mac_do/mac_do.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 4cc2a7971545..5ac77974379c 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -53,12 +53,12 @@ struct rule { TAILQ_ENTRY(rule) r_entries; }; -struct mac_do_rule { +struct rules { char string[MAC_RULE_STRING_LEN]; TAILQ_HEAD(rulehead, rule) head; }; -static struct mac_do_rule rules0; +static struct rules rules0; static void toast_rules(struct rulehead *head) @@ -153,11 +153,11 @@ out: return (error); } -static struct mac_do_rule * +static struct rules * mac_do_rule_find(struct prison *spr, struct prison **prp) { struct prison *pr; - struct mac_do_rule *rules; + struct rules *rules; for (pr = spr;; pr = pr->pr_parent) { mtx_lock(&pr->pr_mtx); @@ -181,7 +181,7 @@ sysctl_rules(SYSCTL_HANDLER_ARGS) char *new_string; struct rulehead head, saved_head; struct prison *pr; - struct mac_do_rule *rules; + struct rules *rules; int error; rules = mac_do_rule_find(req->td->td_ucred->cr_prison, &pr); @@ -229,10 +229,10 @@ destroy(struct mac_policy_conf *mpc) } static void -mac_do_alloc_prison(struct prison *pr, struct mac_do_rule **lrp) +mac_do_alloc_prison(struct prison *pr, struct rules **lrp) { struct prison *ppr; - struct mac_do_rule *rules, *new_rules; + struct rules *rules, *new_rules; void **rsv; rules = mac_do_rule_find(pr, &ppr); @@ -261,7 +261,7 @@ done: static void mac_do_dealloc_prison(void *data) { - struct mac_do_rule *r = data; + struct rules *r = data; toast_rules(&r->head); } @@ -272,7 +272,7 @@ mac_do_prison_set(void *obj, void *data) struct prison *pr = obj; struct vfsoptlist *opts = data; struct rulehead head, saved_head; - struct mac_do_rule *rules; + struct rules *rules; char *rules_string; int error, jsys, len; @@ -319,7 +319,7 @@ mac_do_prison_get(void *obj, void *data) { struct prison *ppr, *pr = obj; struct vfsoptlist *opts = data; - struct mac_do_rule *rules; + struct rules *rules; int jsys, error; rules = mac_do_rule_find(pr, &ppr); @@ -348,7 +348,7 @@ static int mac_do_prison_remove(void *obj, void *data __unused) { struct prison *pr = obj; - struct mac_do_rule *r; + struct rules *r; mtx_lock(&pr->pr_mtx); r = osd_jail_get(pr, mac_do_osd_jail_slot); @@ -420,7 +420,7 @@ priv_grant(struct ucred *cred, int priv) { struct rule *r; struct prison *pr; - struct mac_do_rule *rule; + struct rules *rule; if (do_enabled == 0) return (EPERM); @@ -449,7 +449,7 @@ check_setgroups(struct ucred *cred, int ngrp, gid_t *groups) char *fullpath = NULL; char *freebuf = NULL; struct prison *pr; - struct mac_do_rule *rule; + struct rules *rule; if (do_enabled == 0) return (0); @@ -484,7 +484,7 @@ check_setuid(struct ucred *cred, uid_t uid) char *fullpath = NULL; char *freebuf = NULL; struct prison *pr; - struct mac_do_rule *rule; + struct rules *rule; if (do_enabled == 0) return (0);