Skip to content

Commit

Permalink
q-dev: move deny-list's path constant
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Aug 27, 2024
1 parent 170894e commit 0168517
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions qubesadmin/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ class is implemented by an extension.
DeviceAssignment, VirtualDevice)


DEVICE_DENY_LIST = "/etc/qubes/device-deny.list"


class DeviceCollection:
"""Bag for devices.
Expand Down
4 changes: 1 addition & 3 deletions qubesadmin/tools/qvm_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from qubesadmin.device_protocol import (Port, DeviceInfo, UnknownDevice,
DeviceAssignment, VirtualDevice,
DeviceInterface)
from qubesadmin.devices import DEVICE_DENY_LIST


def prepare_table(dev_list):
Expand Down Expand Up @@ -252,9 +253,6 @@ def assign_device(args):
f"{assignment.backend_domain}:{assignment.port_id}")


DEVICE_DENY_LIST = "/etc/qubes/device-deny.list" # TODO


def is_on_deny_list(device, dest):
"""
Checks if *any* interface of the device is on the deny list for `dest` vm.
Expand Down

0 comments on commit 0168517

Please sign in to comment.