From nobody Thu Jul 06 16:26:56 2023 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 4QxhkS53H4z4lfWd; Thu, 6 Jul 2023 16:26:56 +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 4QxhkS3VF1z3KlF; Thu, 6 Jul 2023 16:26:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688660816; 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=Zvk4p/hsWd8jdnS2MSYSfLjm09rljyr1my7yNLUeqFE=; b=yIOSwigJ5e/YUZrjgnRNlxtbV5r0kQSMkxWtpvzz2xkooAvhhV9P7A5492VZn3l6yjfslo dFtQ+w4Oy65VJbdwUvWEoMY2h4c9ARhLCpMjATvCyL0wF37tSaBqpcmT1TgcqSedEOpoIk qa10NPruW/brjCzvXs+7BsxD1jEULplD/oTLX+7/h7lmYJDUMTnptSOkbyMn9fQFeP0jFW LbCH74hAJxAJle+kdWbiOON9Z48QcZOyprcH+1e56mfyjA/ubu7lrxUAc2GCGKmEx1v3Il EseB2OYpSE/MTMTSgU08mc32e8Yk02UxMbVFQDgczKipiI78AI0IPugaA63yXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688660816; 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=Zvk4p/hsWd8jdnS2MSYSfLjm09rljyr1my7yNLUeqFE=; b=BS7mwaOP1UqiNDlQ98UuJQFa6fp77390B9oB5qu1gN5gN9UEOwaHMlfjNX+C7usipi55Ld O8hf27+LEC48XRoxmqIVJdxLWwnpM5fjchP0a5+0+gLZjqh9JtTxFrMxiYVVhKo2KU89Id zBw7d7bhJ+PqWM/tgbq7VKcLYSAXkkLPJ14WRpBeJeGgKVSsUr9Vgl8dG1/g/tPiZ+cfhg uw1d9jlubj/S51xN9TfjS9uOP7gQ7uSG0gBrjOxD3JakAN+ei1DSYXJDLB6caELiQW59ay 37YXC6uDNer3zLjjVrRiXyjRA+KZFTVx4DowvyX60fIAfJZ0wXRRehF6POMc3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688660816; a=rsa-sha256; cv=none; b=hxLq+sbNC4NK4Fefr3sNUzba3sDojl6pn8pfWIjkq7xRx17Zp9ZqiC+6fyKsu51iNAYdU9 Wh8jp5polEQMorSv/kJT3n/1R9WPoQfb3W4Hs/Xw6zIxsfqIpf7wfVWAbPPraA0bAkH4ut 42Mdr7Idy1t73pJwFQpUh/wEh+rY1gcBR/FZ5YC/PJTV0xBkufl5uCfRKJ5n5/yhJ9wdZD gl66FPnmxXcbL+uzh8JsjNLfkSwuB6kS0IP/MG2AhQf29p0ErRgiC8WHyLMGTCTqW8lr82 i2vbTr49/sXsUlOomniM2D/1WzVnH9AhysbU5IcQlxi0YLFPw3QtdwIIHRqZgw== 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 4QxhkS2Z45z13X8; Thu, 6 Jul 2023 16:26:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 366GQupQ083124; Thu, 6 Jul 2023 16:26:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366GQurM083123; Thu, 6 Jul 2023 16:26:56 GMT (envelope-from git) Date: Thu, 6 Jul 2023 16:26:56 GMT Message-Id: <202307061626.366GQurM083123@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 6eabf4ce35ec - main - mac_veriexec ensure label fields are initialized 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6eabf4ce35ec1c79ab9a9dbe70ac934d62d2cd5d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=6eabf4ce35ec1c79ab9a9dbe70ac934d62d2cd5d commit 6eabf4ce35ec1c79ab9a9dbe70ac934d62d2cd5d Author: Simon J. Gerraty AuthorDate: 2023-07-06 16:26:15 +0000 Commit: Simon J. Gerraty CommitDate: 2023-07-06 16:26:15 +0000 mac_veriexec ensure label fields are initialized Obtained from: bkumara@juniper.net --- sys/security/mac_veriexec/veriexec_metadata.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/security/mac_veriexec/veriexec_metadata.c b/sys/security/mac_veriexec/veriexec_metadata.c index 4e25b1672575..b0491bde7d16 100644 --- a/sys/security/mac_veriexec/veriexec_metadata.c +++ b/sys/security/mac_veriexec/veriexec_metadata.c @@ -732,14 +732,12 @@ search: ip->ops = fpops; ip->fileid = fileid; ip->gen = gen; + ip->label = NULL; + ip->labellen = 0; memcpy(ip->fingerprint, fingerprint, fpops->digest_len); if (flags & VERIEXEC_LABEL) ip->labellen = mac_veriexec_init_label(&ip->label, ip->labellen, label, labellen); - else { - ip->label = NULL; - ip->labellen = 0; - } VERIEXEC_DEBUG(3, ("add file %ju.%lu (files=%d)\n", (uintmax_t)ip->fileid,