From nobody Mon Feb 9 12:24:19 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1566208919; cv=none; d=zoho.com; s=zohoarc; b=JHqe8nBuMCMzfZ+WLV0yx9LeAsVE3wKbJzDxd9lODDxaZ33411rC2bXRsVAb94wFfbEhhJwdVmgtZc+Hyqc7JthX1Sajk8lsh5zEfD+HoH1xr8eg3IlJYMAsFi23EvPn9K0tUm6HN50HMvmqGbRtch/QU/m7TjqFaLdsDYjkbLw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566208919; h=Content-Type:Content-Transfer-Encoding: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:ARC-Authentication-Results; bh=sqlUuTDbzDtK7+TyXKbamfVaW7xWB3uUJHlgFGIeYLM=; b=ADhxjjN02uO2AxzyDt7IMzdwdya7NdAn9RjFzcn8XQk7fhHirIdDitiDhssh+ktQFLFfdjRNGdGk6+wlLvtSjAwjCuOFw+Ys6+IWprlFUUfPYaVc//HL+YGf+lNE7R2IPjSruSIL6X7Hbv5ROypno71Q60lbdnYrIq/QKgZyjd4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566208919451442.26939699631805; Mon, 19 Aug 2019 03:01:59 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2CEE73078A2E; Mon, 19 Aug 2019 10:01:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 07FB11E1; Mon, 19 Aug 2019 10:01:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B86DF180BA99; Mon, 19 Aug 2019 10:01:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7JA1mrE002041 for ; Mon, 19 Aug 2019 06:01:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 69F1C841D2; Mon, 19 Aug 2019 10:01:48 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E96F882489 for ; Mon, 19 Aug 2019 10:01:47 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 19 Aug 2019 12:01:40 +0200 Message-Id: <20190819100142.16104-2-abologna@redhat.com> In-Reply-To: <20190819100142.16104-1-abologna@redhat.com> References: <20190819100142.16104-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/3] virt-aa-helper: Use virCommand APIs directly X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 19 Aug 2019 10:01:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Right now we're using the virRun() convenience API, but that doesn't allow the kind of control we want. Use the virCommand APIs directly instead. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- src/security/virt-aa-helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index ad9a7dda94..c5080f698a 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -170,7 +170,9 @@ parserCommand(const char *profile_name, const char cmd) const char * const argv[] =3D { "/sbin/apparmor_parser", flag, profile, NULL }; - if ((ret =3D virRun(argv, &status)) !=3D 0 || + VIR_AUTOPTR(virCommand) command =3D virCommandNewArgs(argv); + + if ((ret =3D virCommandRun(command, &status)) !=3D 0 || (WIFEXITED(status) && WEXITSTATUS(status) !=3D 0)) { if (ret !=3D 0) { vah_error(NULL, 0, _("failed to run apparmor_parser")); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list