Index: libvirt-1.2.6/src/security/virt-aa-helper.c =================================================================== --- libvirt-1.2.6.orig/src/security/virt-aa-helper.c +++ libvirt-1.2.6/src/security/virt-aa-helper.c @@ -945,9 +945,31 @@ get_files(vahControl * ctl) for (i = 0; i < ctl->def->ndisks; i++) { virDomainDiskDefPtr disk = ctl->def->disks[i]; + fprintf(stderr, "%s: looking at a disk\n", progname); - if (!virDomainDiskGetSource(disk)) + fprintf(stderr, "%s: type %d (volume is %d)\n", progname, disk->src->type, VIR_STORAGE_TYPE_VOLUME); + if (disk->src->type == VIR_STORAGE_TYPE_VOLUME) + { + size_t len; + char *path; + + if (!disk->src->srcpool) { + fprintf(stderr, "srcpool is null\n"); + continue; + } + len = strlen(disk->src->srcpool->pool) + strlen(disk->src->srcpool->volume) + 7; + path = malloc(len); + if (!path) + exit(1); + snprintf(path, len, "/dev/%s/%s", disk->src->srcpool->pool, disk->src->srcpool->volume); + fprintf(stderr, "adding path %s\n", path); + vah_add_file(&buf, path, "rw"); + free(path); + } + if (!virDomainDiskGetSource(disk)) { + fprintf(stderr, "source is NULL\n"); continue; + } /* XXX - if we knew the qemu user:group here we could send it in * so that the open could be re-tried as that user:group. */