Commit 84edd42
committed
Use admin.vm.List method to get VM class
Normally, VM class is cached when getting list of all (accessible)
VMs. This means the admin.vm.property.Get+klass is normally not used.
But if there is a case where VM object is created without listing all
VMs first, it will not get the 'klass' property set. Apparently
preloaded disposables trigger this case in audiovm.
The thing is, admin.vm.property.Get+klass is mostly redundant with
admin.vm.List (directed at a specific qube), since admin.vm.List
contains that information already - so it doesn't make much sense to
force everybody to add both to the policy.
Fix this by using admin.vm.List to get the VM class.
Fixes QubesOS/qubes-issues#107171 parent aade160 commit 84edd42
2 files changed
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
450 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
451 | 464 | | |
452 | 465 | | |
453 | 466 | | |
| |||
0 commit comments