Signed-off-by: Prerna Saxena <saxenap.ltc(a)gmail.com>
---
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") != 0)
goto cleanup;
- if (ctl->def->os.loader && ctl->def->os.loader->path)
- if (vah_add_file(&buf, ctl->def->os.loader->path, "rk") !=
0)
+ if (ctl->def->os.loader &&
+ ctl->def->os.loader->src &&
+ ctl->def->os.loader->src->type == VIR_STORAGE_TYPE_FILE &&
+ ctl->def->os.loader->src->path)
+ if (vah_add_file(&buf, ctl->def->os.loader->src->path,
"rk") != 0)
goto cleanup;
- if (ctl->def->os.loader && ctl->def->os.loader->nvram)
- if (vah_add_file(&buf, ctl->def->os.loader->nvram, "rwk")
!= 0)
+ if (ctl->def->os.loader &&
+ ctl->def->os.loader->nvram &&
+ ctl->def->os.loader->nvram->type == VIR_STORAGE_TYPE_FILE &&
+ ctl->def->os.loader->nvram->path)
+ if (vah_add_file(&buf, ctl->def->os.loader->nvram->path,
"rwk") != 0)
goto cleanup;
for (i = 0; i < ctl->def->ngraphics; i++) {
--
1.8.1.2