From nobody Thu May 15 14:11:42 2025 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526296571952985.0205518118811; Mon, 14 May 2018 04:16:11 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 761FA30BDE22; Mon, 14 May 2018 11:16:10 +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 176125C25E; Mon, 14 May 2018 11:16:10 +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 9ABD7180B5B6; Mon, 14 May 2018 11:16:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4EBFpBt009813 for ; Mon, 14 May 2018 07:15:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id CA0A22010CDC; Mon, 14 May 2018 11:15:51 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C46420155FD; Mon, 14 May 2018 11:15:49 +0000 (UTC) Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 25A90C107C6C; Mon, 14 May 2018 11:15:38 +0000 (UTC) Received: by mail-pg0-f65.google.com with SMTP id x145-v6so5340924pgx.11; Mon, 14 May 2018 04:15:38 -0700 (PDT) Received: from ps-f25-dev.eng.nutanix.com ([205.209.132.2]) by smtp.gmail.com with ESMTPSA id d4-v6sm13292667pgv.73.2018.05.14.04.15.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 04:15:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ssYSQGjMLBTi4GrZ+ZueARlspDEQTfVE8o3MsIWuuvA=; b=M1odqfgQ2DLFtOcHnxsvzDx4U0el24/CripySUlMOWRMUEaX24jmOwSKuTyedDqY+V VB1mTWj7QXdPUwG3PSs5QC+P0XrPnxW3ci3fO+pf7vVP2e/wmR/wCNaIMoKAtisYSFnH ihHwjj02DVaEeSJQngfV1yv8RSP5PBFZ6e9RyediPNHgrvTlkBLG2heL+zZaKr21VOPj fpq+z/shUFbCe299u31VziOl1re95vVIcQ9soGOkk5u1JWgIB52Il8Z+t2Ts7ChEyah6 WDDl/ooV6j0+M9CaJSLjgFQoAgjUeMs7QQQPbf1jEbZVHHnXh/9t45KccvUVN8LIXfY4 hFLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ssYSQGjMLBTi4GrZ+ZueARlspDEQTfVE8o3MsIWuuvA=; b=tjhEL9u6tMqkfgslqzzwlU22O2rKm/Pq2CsqkoXgTGPHaAwRBRjKOQlXVz5CEiT/Ps uPpPfdOP83qkr3hl35DQuJCFmMrYy3EDTDepzTTyVlKcYQpunVAg62rdUijVSx8lUvmu J2STgH1z8tJddHpHmX32jhgTYHcFbITshm4PNdxD3j96oTzD9d8ltgVfnEoCU/9Jy7E9 Q6EtbEzd8oV7y2dgi+uhL37VSTfF53uE57olar/yIWNUwgqrB3pVBV4aKzGWayv1ginS HGjtCKm9yQsfgY1yo1Y5NJ5lYo1BIFds3rfvsXUlC9EiNC1VyeSNxfhGNnY6gSfXiC6n eBBw== X-Gm-Message-State: ALKqPwcgRl7VAFwKtQveaAfVATC7WI59IWFou/Q2dsPWNgSrWYUcT0Gr QYpPl5GdSo29t0XF0i3hnH06cA== X-Google-Smtp-Source: AB8JxZoiTuCqqRK+G68ldb3qNkjlW4h5rFOJtFzQSJ/xcd2y6OtR2H4tzbI1fRRIvXIiRs4pDWupZQ== X-Received: by 2002:a62:c615:: with SMTP id m21-v6mr10019416pfg.232.1526296537455; Mon, 14 May 2018 04:15:37 -0700 (PDT) From: Prerna Saxena To: libvir-list@redhat.com Date: Mon, 14 May 2018 04:15:18 -0700 Message-Id: <20180514111522.4363-9-saxenap.ltc@gmail.com> In-Reply-To: <20180514111522.4363-1-saxenap.ltc@gmail.com> References: <20180514111522.4363-1-saxenap.ltc@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 14 May 2018 11:15:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 14 May 2018 11:15:38 +0000 (UTC) for IP:'74.125.83.65' DOMAIN:'mail-pg0-f65.google.com' HELO:'mail-pg0-f65.google.com' FROM:'saxenap.ltc@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 74.125.83.65 mail-pg0-f65.google.com 74.125.83.65 mail-pg0-f65.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, mprivozn@redhat.com Subject: [libvirt] [PATCH 08/12] virt-aa-helper: Adjust references to loader & nvram elements to correctly parse the virStorageSource types. 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: , MIME-Version: 1.0 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 14 May 2018 11:16:11 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Prerna Saxena --- src/security/virt-aa-helper.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index d0f9876..8217d67 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -1063,12 +1063,18 @@ get_files(vahControl * ctl) if (vah_add_file(&buf, ctl->def->os.slic_table, "r") !=3D 0) goto cleanup; =20 - if (ctl->def->os.loader && ctl->def->os.loader->path) - if (vah_add_file(&buf, ctl->def->os.loader->path, "rk") !=3D 0) + if (ctl->def->os.loader && + ctl->def->os.loader->src && + ctl->def->os.loader->src->type =3D=3D VIR_STORAGE_TYPE_FILE && + ctl->def->os.loader->src->path) + if (vah_add_file(&buf, ctl->def->os.loader->src->path, "rk") !=3D = 0) goto cleanup; =20 - if (ctl->def->os.loader && ctl->def->os.loader->nvram) - if (vah_add_file(&buf, ctl->def->os.loader->nvram, "rwk") !=3D 0) + if (ctl->def->os.loader && + ctl->def->os.loader->nvram && + ctl->def->os.loader->nvram->type =3D=3D VIR_STORAGE_TYPE_FILE && + ctl->def->os.loader->nvram->path) + if (vah_add_file(&buf, ctl->def->os.loader->nvram->path, "rwk") != =3D 0) goto cleanup; =20 for (i =3D 0; i < ctl->def->ngraphics; i++) { --=20 1.8.1.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list