mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 02:12:36 +02:00
container: Take SELinux labels into account
Take SELinux labels into account when mounting a file to the Dangerzone container. Use the `:Z` flag (which is a no-op in non-SELinux systems) to clear the existing SELinux label for a file, and apply one that matches the container's. Refs #335
This commit is contained in:
parent
d733890ca0
commit
ea73f5d820
1 changed files with 4 additions and 4 deletions
|
@ -260,9 +260,9 @@ class Container(IsolationProvider):
|
|||
]
|
||||
extra_args = [
|
||||
"-v",
|
||||
f"{document.input_filename}:/tmp/input_file",
|
||||
f"{document.input_filename}:/tmp/input_file:Z",
|
||||
"-v",
|
||||
f"{pixel_dir}:/dangerzone",
|
||||
f"{pixel_dir}:/dangerzone:Z",
|
||||
"-e",
|
||||
f"ENABLE_TIMEOUTS={self.enable_timeouts}",
|
||||
]
|
||||
|
@ -280,9 +280,9 @@ class Container(IsolationProvider):
|
|||
]
|
||||
extra_args = [
|
||||
"-v",
|
||||
f"{pixel_dir}:/dangerzone",
|
||||
f"{pixel_dir}:/dangerzone:Z",
|
||||
"-v",
|
||||
f"{safe_dir}:/safezone",
|
||||
f"{safe_dir}:/safezone:Z",
|
||||
"-e",
|
||||
f"OCR={ocr}",
|
||||
"-e",
|
||||
|
|
Loading…
Reference in a new issue