Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/463'
Browse files Browse the repository at this point in the history
* origin/pr/463:
  Refuse to delete an entire volume group
  • Loading branch information
marmarek committed Nov 28, 2022
2 parents 6e939bc + e14956a commit 93f269e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions qubes/storage/lvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@ def _get_lvm_cmdline(cmd):
if action == 'remove':
assert len(cmd) == 2, 'wrong number of arguments for remove'
assert not cmd[1].startswith('/'), 'absolute path to ‘remove’???'
assert '/' in cmd[1], 'refusing to delete entire volume group'
lvm_cmd = ['lvremove', '--force', '--', cmd[1]]
elif action == 'clone':
assert len(cmd) == 3, 'wrong number of arguments for clone'
Expand Down

0 comments on commit 93f269e

Please sign in to comment.