-
-
Notifications
You must be signed in to change notification settings - Fork 115
Prevent backing up dom0 it itself (in home dir) #731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
In case there is no an existing backup profile, select sys-usb as the default target. In case there is no `sys-usb` (e.g. on live Qubes scenario), still revert to dom0 If dom0 is included in backup and target is user home dir in dom0, another patch to core shows an error message. Cover it as well resolves: QubesOS/qubes-issues#10127 depends: QubesOS/qubes-core-admin#731
1c00d73 to
8f742cb
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #731 +/- ##
==========================================
- Coverage 70.41% 70.30% -0.11%
==========================================
Files 61 61
Lines 13679 13649 -30
==========================================
- Hits 9632 9596 -36
- Misses 4047 4053 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
8f742cb to
273b5a9
Compare
In case there is no an existing backup profile, select sys-usb as the default target. In case there is no `sys-usb` (e.g. on live Qubes scenario), still revert to dom0 If dom0 is included in backup and target is user home dir in dom0, another patch to core shows an error message. Cover it as well resolves: QubesOS/qubes-issues#10127 depends: QubesOS/qubes-core-admin#731
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025100312-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025081011-4.3&flavor=update
Failed tests8 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/149225#dependencies 83 fixed
Unstable testsPerformance TestsPerformance degradation:15 performance degradations
Remaining performance tests:165 tests
|
273b5a9 to
15b16b7
Compare
|
both test failed, with different message this time: |
15b16b7 to
5a29ecc
Compare
Applied the fix. |
qubes/backup.py
Outdated
| home_dir = pwd.getpwnam(local_user).pw_dir | ||
|
|
||
| # Checking if target is not user home directory in dom0 | ||
| if self.target_dir in ["", "~", None] \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on earlier error, None shouldn't actually be refused, as it doesn't really mean to backup into user home - it means you don't know where is the target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is also done. But I believe in practice, None is never passed to qubes.backup.Backup constructor as the value of target directory. Since the Admin API always expects presence of target directory here.
e802ee9 to
c21b307
Compare
0a93398 to
199aafa
Compare
98a9903 to
6f4fa7c
Compare
6f4fa7c to
301e66f
Compare
|
openQA failed again. I had to pass except_failure=True to make_backup |
resolves: QubesOS/qubes-issues#10127