-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See discussion in #333
- Loading branch information
Conor Schaefer
committed
Mar 4, 2021
1 parent
bdd07b2
commit 9db728f
Showing
5 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
# Create to @deeplow, see discussion in | ||
# https://github.com/freedomofpress/securedrop-workstation/issues/333#issuecomment-789562152 | ||
# Content slightly modified from original. | ||
|
||
# TODO Fully sanitize this $1 parameter to make sure it is only a source's code | ||
# name and nothing else. Otherwise sd-app we will have an RCE in dom0 | ||
# | ||
# TODO Script should read from stdin, not handle args. | ||
|
||
if [ -z "$1" ]; then | ||
# This service requires an argument | ||
exit 1 | ||
fi | ||
|
||
# create a named disposable VM with the and set it to autodestroy once shut down | ||
/usr/bin/qvm-create --class DispVM sd-viewer-$1 --template=sd-viewer \ | ||
--label=red --property auto_cleanup=True | ||
|
||
# Give it a tag so we can target the policy from sd-app onto this new VM | ||
/usr/bin/qvm-tags sd-viewer-$1 set sd-viewer-dvm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters