From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id C37A35A0273 for ; Thu, 9 Mar 2023 05:49:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678337350; h=from:from: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; bh=WlgmTigGD2XGFMX7h2aVjonrp7582+ohZkzih5aYGF4=; b=fxuHez00elbb9UXN7DHH4KoFJFwchHn4kQxv83NaMAXNKsvgfmN+Qwy8AIxdzz89yInluk /GD+AR6g5anLfdo8n5JuzFtcoB3F0saxPtKBzD9GRm2O/rZ3ClUruMNSKfmxsbBNfDfwCk x13L/WqN3j+5GFcqKp058qe/C+nAmhc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-496-Ou0v7B9iNxalsqj_XPmAkQ-1; Wed, 08 Mar 2023 23:49:09 -0500 X-MC-Unique: Ou0v7B9iNxalsqj_XPmAkQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4FEC5101A52E for ; 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) 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-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: KCVL35G5VON7GAT3YUKD55M2FN2JC3OK X-Message-ID-Hash: KCVL35G5VON7GAT3YUKD55M2FN2JC3OK X-MailFrom: laine@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: set useBinarySpecificLabel = 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; - if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, false, NULL) < 0) + if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, true, NULL) < 0) goto error; return 0; -- 2.39.2