From patchwork Tue Oct 8 16:22:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 175524 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5922193ill; Tue, 8 Oct 2019 09:26:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyi9UlxVfvxwnFv9xtBc08LADdTmVyWK9JlhciNp352pax8MwSMIzoJggprMqjm4R6uDXju X-Received: by 2002:a6b:6617:: with SMTP id a23mr1243436ioc.10.1570551988334; Tue, 08 Oct 2019 09:26:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570551988; cv=none; d=google.com; s=arc-20160816; b=ArbolOHPA2Ki2DH7sPK6r6Lfy2OCg86k4kXewvCt1Q7o+nNFd+RlIr3FElzj7lJvOm S0SgOFAWArt7284prYCJXYe0qh5UPJLWzzSBVi6NmoQpJZZrgJYPyvxHaxaxoCpbFy7q Xg7sY3qRUO96VLJfNRqmZs8Vugf9C/yNCuSOc6oNFYfNNP37nZamPMo5rNPmX90Jdtjk pj53qM1EBGFZs4tWNBgNML2iKP/gNmJkzR9WR3GhnGK1dIrFx4U1JPsPCal51ix8QU7P o/vZy717Je6NckP6r+yv7uBx+digOOptcCW3631xL5PB35apz9ATGrZokoAj2DHb9aJd 5Xzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=Ox08Dh1OcdqceiNjxJAOavhzOAi4laWQDO4EeWKqoMI=; b=urnh2YKunq5auJIFs31OsKO0eWNdt5HRXeDUqTGbmCJauMVD2G7rvNahATvWxuRHiD sr12NfxOAJgwHjr3mS4m22HZtiLDF5AIj7YbhXxrC7gESx95osoneNqveVYtS2c4l49t yl5jxAA3NQGI7wrNwinWjma9IRLSVqdmHBzofyWigI709fofCk4tzavClkMyyeIqWGlH 9Kn8tUM+GgLlqMwz6wUztWYVXodk507lobnWZETZ5tIx5QP23dKIvFfbe+iEnpvJbjqy EPv3BVUkEKTwS4JKOKmK7GIDTafjOxnrwFO+mkVuye8JJunqGLqC1VCA5S2Nh1APpHqe fDdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id y25si25710728jad.20.2019.10.08.09.26.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Oct 2019 09:26:28 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1802F3082E66; Tue, 8 Oct 2019 16:26:27 +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 E23845B6A5; Tue, 8 Oct 2019 16:26:26 +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 97361180BA9B; Tue, 8 Oct 2019 16:26:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x98GM26u008709 for ; Tue, 8 Oct 2019 12:22:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id B457760606; Tue, 8 Oct 2019 16:22:02 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.bos.redhat.com (dhcp-17-175.bos.redhat.com [10.18.17.175]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B81560605; Tue, 8 Oct 2019 16:22:02 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Tue, 8 Oct 2019 12:22:27 -0400 Message-Id: <70ec368459c0bdd748dec360de106c0f9423bd8e.1570551720.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: christian.ehrhardt@canonical.com Subject: [libvirt] [PATCH 7/7] security: apparmor: Make storage_source_add_files recursively callable 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 08 Oct 2019 16:26:27 +0000 (UTC) This will simplify adding support for qcow2 external data_file Signed-off-by: Cole Robinson --- src/security/virt-aa-helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index b675572144..d9f6b5638b 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -939,9 +939,9 @@ add_file_path(virStorageSourcePtr src, static int storage_source_add_files(virStorageSourcePtr src, - virBufferPtr buf) + virBufferPtr buf, + size_t depth) { - size_t depth = 0; virStorageSourcePtr tmp; for (tmp = src; virStorageSourceIsBacking(tmp); tmp = tmp->backingStore) { @@ -994,7 +994,7 @@ get_files(vahControl * ctl) /* XXX should handle open errors more careful than just ignoring them. */ - if (storage_source_add_files(disk->src, &buf) < 0) + if (storage_source_add_files(disk->src, &buf, 0) < 0) goto cleanup; }