Skip to content

Commit

Permalink
First draft on per-source DispVMs
Browse files Browse the repository at this point in the history
  • Loading branch information
Conor Schaefer committed Mar 4, 2021
1 parent 7e71b30 commit 85fb128
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion securedrop_client/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.0"
__version__ = "0.4.1"
11 changes: 9 additions & 2 deletions securedrop_client/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,9 +855,16 @@ def on_file_open(self, file: db.File) -> None:
if not self.qubes:
return

command = "qvm-open-in-vm"
args = ["--view-only", "$dispvm:sd-viewer", file.location(self.data_dir)]
vm_prep_cmd = "qrexec-client-vm"
source_name = file.source.journalist_filename
dispvm_name = f"sd-viewer-{source_name}"
vm_prep_args = ["dom0", f"securedrop.CreateSourceDispVM+{source_name}"]
process = QProcess(self)
logger.info("Creating DispVM: {}".format(dispvm_name))
process.execute(vm_prep_cmd, vm_prep_args)
logger.info("Opening file in DispVM: {}".format(dispvm_name))
command = "qvm-open-in-vm"
args = ["--view-only", f"sd-viewer-{source_name}", file.location(self.data_dir)]
process.start(command, args)

def run_printer_preflight_checks(self):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setuptools.setup(
name="securedrop-client",
version="0.4.0",
version="0.4.1",
author="Freedom of the Press Foundation",
author_email="[email protected]",
description="SecureDrop Workstation client application",
Expand Down

0 comments on commit 85fb128

Please sign in to comment.