Skip to content

Commit 7f0f98d

Browse files
committed
Merge remote-tracking branch 'origin/pr/834'
* origin/pr/834: Fix bug in storage/__init__.py dropping "False" config values Pull request description: The _sanitize_config function drops "False" values from the config, resulting in properties such as rw="False" disappearing. As a consequence, the default value of "True" gets reassigned to them. Similar to #829, but does not have any practical consequences I can think of beyond having the correct/expected behavior for the "False" values. To reproduce: ```sh [user@dom0 ~]$ sudo systemctl stop qubesd [user@dom0 ~]$ sudo nano /var/lib/qubes/qubes.xml # Set rw="False" for any domU volume [user@dom0 ~]$ sudo systemctl start qubesd [user@dom0 ~]$ # At this stage, rw="False" is still present [user@dom0 ~]$ # Now, make any edit to the domU - the simplest example is to change the vCPU count, and then apply it [user@dom0 ~]$ # Then, rw="False" will fully disappear in qubes.xml [user@dom0 ~]$ sudo systemctl restart qubesd [user@dom0 ~]$ # Now, make another edit to the domU to trigger a fresh save [user@dom0 ~]$ # Now rw="True" appears in qubes.xml ```
2 parents 6b4411c + 35bf9c3 commit 7f0f98d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

qubes/storage/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,8 @@ def _sanitize_config(config):
11191119
if isinstance(value, bool):
11201120
if value:
11211121
result[key] = "True"
1122+
else:
1123+
result[key] = "False"
11221124
else:
11231125
result[key] = str(value)
11241126
return result

0 commit comments

Comments
 (0)