From nobody Sat Nov 6 02:25:16 2021 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 39321183BD7E; Sat, 6 Nov 2021 02:25:17 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HmLnT0WpNz3j9m; Sat, 6 Nov 2021 02:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 DB08722FB8; Sat, 6 Nov 2021 02:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1A62PGp5077369; Sat, 6 Nov 2021 02:25:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1A62PG3S077368; Sat, 6 Nov 2021 02:25:16 GMT (envelope-from git) Date: Sat, 6 Nov 2021 02:25:16 GMT Message-Id: <202111060225.1A62PG3S077368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3b4baefca925 - stable/13 - do_execve(): switch boolean locals to use bool type 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3b4baefca9256b976963add91e8e8082c3e281fd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3b4baefca9256b976963add91e8e8082c3e281fd commit 3b4baefca9256b976963add91e8e8082c3e281fd Author: Konstantin Belousov AuthorDate: 2021-10-23 14:47:28 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-06 02:12:31 +0000 do_execve(): switch boolean locals to use bool type (cherry picked from commit 9d58243fbc4a1931aba618f8f5f6872779656c42) --- sys/kern/kern_exec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 15af8f402b05..1fd11e34a048 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -391,10 +391,10 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p, struct ktr_io_params *kiop; #endif struct vnode *oldtextvp = NULL, *newtextvp; - int credential_changing; + bool credential_changing; #ifdef MAC struct label *interpvplabel = NULL; - int will_transition; + bool will_transition; #endif #ifdef HWPMC_HOOKS struct pmckern_procexec pe; @@ -525,14 +525,14 @@ interpret: * XXXMAC: For the time being, use NOSUID to also prohibit * transitions on the file system. */ - credential_changing = 0; + credential_changing = false; credential_changing |= (attr.va_mode & S_ISUID) && oldcred->cr_uid != attr.va_uid; credential_changing |= (attr.va_mode & S_ISGID) && oldcred->cr_gid != attr.va_gid; #ifdef MAC will_transition = mac_vnode_execve_will_transition(oldcred, imgp->vp, - interpvplabel, imgp); + interpvplabel, imgp) != 0; credential_changing |= will_transition; #endif