From nobody Mon Dec 16 14:45:52 2024 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 4YBjRh6qCKz5hWcQ; Mon, 16 Dec 2024 14:45:52 +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 4YBjRh2vfFz4dKl; Mon, 16 Dec 2024 14:45:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734360352; 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=O3KAaF2XtozGOTPSqlEtFWuwHZJhf8RJ/8+jq4Pst3k=; b=EkbfLEbAOjY4n79s8jACiD2++Zbbxs5DPqJ3yPCa60ufTJRVcobwC9LE5jlTgSU+c3aGME AUp+yW/LYkV6OtCBI/uCTpiOdljzy73VJrpDU+p9LHhOkoja9leFcrlgnvwpRcvBnCmr+z tSiPK9muRcPiX8gZ7lzP5fg883GNyfW3S5gHj7k+3QcrtIqxurPyM5S5V2HzYv3khYPbMc lzezOqUJxnUFhU+QUK2U+D+3s4sATOt+3kK443HeAMHrqmWYDDEiQu+A+MT+FGj+uw5FLX iuqSyQOBXtD6ypIpiVRYRRcLrbv2618nZuGTPmwcXNG8ecPw/MEfSE+KqiGMQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734360352; 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=O3KAaF2XtozGOTPSqlEtFWuwHZJhf8RJ/8+jq4Pst3k=; b=RPEc6guBuIL3nLyp+CfeuTOY2uRO2FHya3pdCVHMk9M05Rq0x6OqXQunfwPSlUj13uZmG3 QB9g/UUP5iWxpQx90zQf7UQvJAIAM4sCAAsOm+SDWcghekliaztu9fQ3dragp4cObx3+Dj RGDO4samFjH7vLS9Yg8HU6y3CTj6R1I/UnPl1pp8dPM/O18jZfyQTKaRQmRI6jbNyM/GTa kj9MVEuKsVPSfnx9mCpf6QuzVAG7UeLnjD8oZ+xp6CzlpgocpULkbsHkwLM17uf1SsryJ0 si5WCZXRXsIOeWIcYTmTVWYoroT7Qy4RaWLXoZDyu2LvDZ2LZE5XGgURTakuWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734360352; a=rsa-sha256; cv=none; b=G3iW1xaTFkd8jU6VFYhbsqP5qYNEmHjbzm+LzHXqSGFKAhe7aFEn4fiujM+ggH1jb1vme9 io5HYVLitL9moAHNXIeweXSfEJng9PWB0NcZiWKxZY2E8E5CibhedUZAyAdboeUGM35mlh 3mk/euibX1TGDkhv98KFFaN8/B3s8x/0NoBC3iANFE13BooihauZrRUYZyTmoZRFQCWf8y KempmBQ79ppGuUQcHeHtXLnSz4gnNQsnfaTqLI9BAsWvWLOxgIBqMANTkJxc+4mNUdZfOU i2zeZ9sT82k8ZlpdxFOGeaWcX4M6CRImZR1nxy/LHgWYBzpc9ErARwP/lQF59g== 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 4YBjRh2PBWzxWw; Mon, 16 Dec 2024 14:45:52 +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 4BGEjqO1053143; Mon, 16 Dec 2024 14:45:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BGEjqiV053140; Mon, 16 Dec 2024 14:45:52 GMT (envelope-from git) Date: Mon, 16 Dec 2024 14:45:52 GMT Message-Id: <202412161445.4BGEjqiV053140@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: 73cecc0ef78e - main - MAC/do: Move destroy() to a better place 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 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: 73cecc0ef78e49295cd9cd8df1bf271f5b8c437d Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=73cecc0ef78e49295cd9cd8df1bf271f5b8c437d commit 73cecc0ef78e49295cd9cd8df1bf271f5b8c437d Author: Olivier Certner AuthorDate: 2024-07-03 13:52:33 +0000 Commit: Olivier Certner CommitDate: 2024-12-16 14:42:35 +0000 MAC/do: Move destroy() to a better place No functional change intended. Reviewed by: bapt Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47604 --- sys/security/mac_do/mac_do.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 8ce84d7ba099..cb166cfd6128 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -329,12 +329,6 @@ SYSCTL_PROC(_security_mac_do, OID_AUTO, rules, 0, 0, sysctl_rules, "A", "Rules"); -static void -destroy(struct mac_policy_conf *mpc) -{ - osd_jail_deregister(mac_do_osd_jail_slot); -} - static int mac_do_prison_set(void *obj, void *data) { @@ -452,6 +446,12 @@ init(struct mac_policy_conf *mpc) sx_sunlock(&allprison_lock); } +static void +destroy(struct mac_policy_conf *mpc) +{ + osd_jail_deregister(mac_do_osd_jail_slot); +} + static bool rule_applies(struct ucred *cred, struct rule *r) {