From nobody Fri Dec 19 22:01:28 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678337405; cv=none; d=zohomail.com; s=zohoarc; b=JJtP3d8s67Jri9qHu5mquTbe5pegZlfHjZD31P1kSEO08rY+cy1ibVRzLFou75cJEkYWefp+fc/v+hvgamSBWLrrILQT8J4PlwGwRtVbJJeTVNut4zbpRPO+gpGWVv+tdUuq9HomLjQXQnKZrrV1kc//bBdUzpYYOd4BDSe3AXE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678337405; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WlgmTigGD2XGFMX7h2aVjonrp7582+ohZkzih5aYGF4=; b=khAoJorKEoe9wLBMBcp9nmPjMFg6ef021F+odarRHOeeDefaZf+kQzJP16NzvAcR2i3VSQXyhhnVs8t56JURiEGcqtFcv9mNJ6JeZgorgFLVDnGVc0FYdq+E4/H9CxdnlwowzJifAqTF2Gzi9DGsMpxDQ1eomlrxOayWuLPxz1I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1678337405292113.83658134430846; Wed, 8 Mar 2023 20:50:05 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-435-rNUkYlVBNkG6hnfUkcrYxw-1; Wed, 08 Mar 2023 23:49:15 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 55BB61C06EE4; Thu, 9 Mar 2023 04:49:12 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9201014171C3; Thu, 9 Mar 2023 04:49:11 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D4F9A1946A49; Thu, 9 Mar 2023 04:49:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 608D019465B5 for ; Thu, 9 Mar 2023 04:49:09 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 52A40C15BA0; Thu, 9 Mar 2023 04:49:09 +0000 (UTC) Received: from vhost3.router.laine.org (unknown [10.2.16.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 361A9C15BAE; Thu, 9 Mar 2023 04:49:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678337404; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=WlgmTigGD2XGFMX7h2aVjonrp7582+ohZkzih5aYGF4=; b=Ej2b/qwsz70ksVNrq35TzN8q98m2ezb3UzPTLpJUhnsCFaB9zXlLaQcMhqsGfUbJpeGZ8c VMZ+CjVFcACod7B2D8/tuTPLaFTog8JGuog2M2TIqqrYQQzU5e1zLeGgN2zVyLYarR1KML 61qbW2xz/jT92pXewvEKYI8qOa2pQmg= X-MC-Unique: rNUkYlVBNkG6hnfUkcrYxw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 4/4] qemu: set SELinux label of passt process to its own binary's label Date: Wed, 8 Mar 2023 23:49:08 -0500 Message-Id: <20230309044908.29316-5-laine@redhat.com> In-Reply-To: <20230309044908.29316-1-laine@redhat.com> References: <20230309044908.29316-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: passt-dev@passt.top Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1678337406821100003 Content-Type: text/plain; charset="utf-8"; x-default="true" set useBinarySpecificLabel =3D true when calling qemuSecurityCommandRun for the passt process, so that the new process context will include the binary-specific label that should be used for passt (passt_t) rather than svirt_t (as would happen if useBinarySpecificLabel was false). (The MCS part of the label, which is common to all child processes related to a particular qemu domain instance, is also set). Resolves: https://bugzilla.redhat.com/2172267 Signed-off-by: Laine Stump --- src/qemu/qemu_passt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c index fd0076077e..2153c0ac46 100644 --- a/src/qemu/qemu_passt.c +++ b/src/qemu/qemu_passt.c @@ -281,7 +281,7 @@ qemuPasstStart(virDomainObj *vm, if (qemuExtDeviceLogCommand(driver, vm, cmd, "passt") < 0) return -1; =20 - if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, false, NULL) < 0) + if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, true, NULL) < 0) goto error; =20 return 0; --=20 2.39.2