Skip to content

Commit

Permalink
move usb autoattach files into securedrop_salt
Browse files Browse the repository at this point in the history
  • Loading branch information
rocodes committed May 27, 2024
1 parent 00a07fc commit 9a6862c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions securedrop_salt/99-sd-devices.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Class 08 == storage, subclass 06 == SCSI
# Class 07 == printer, subclass 01 == printer
# https://www.usb.org/defined-class-codes
# https://www.usb.org/document-library/mass-storage-class-specification-overview-14
# https://www.usb.org/document-library/printer-device-class-document-11
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0806??:*|*:0701??:*", RUN+="/usr/local/bin/sd-attach-export-device"
6 changes: 6 additions & 0 deletions securedrop_salt/sd-attach-export-device
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/bash

# udev action for attaching USB export devices to sd-devices

QDEVNAME="$(basename "$DEVPATH")"
echo sys-usb "$QDEVNAME" | qrexec-client-vm sd-devices qubes.USBAttach

0 comments on commit 9a6862c

Please sign in to comment.