deploy_chrome: set the security context
context applied to paths: /opt/google/chrome
security.SELinuxARC was failing due to unexpected/ missing SELinux
permissions.
BUG=chromium:968155
TEST=security.SELinuxFilesARC
Change-Id: I37ea481fa65288f7fcca160ce9a725b9e52b7ed4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1720906
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Miah Sanchez <miahsanchez@google.com>
Commit-Queue: Miah Sanchez <miahsanchez@google.com>
diff --git a/scripts/deploy_chrome.py b/scripts/deploy_chrome.py
index 2d63bcf..185090e 100644
--- a/scripts/deploy_chrome.py
+++ b/scripts/deploy_chrome.py
@@ -276,6 +276,9 @@
compress=self._ShouldUseCompression(),
debug_level=logging.INFO,
verbose=self.options.verbose)
+ # Set the security context.
+ if self.options.target_dir == _CHROME_DIR:
+ self.device.RunCommand(['restorecon', '-R', _CHROME_DIR])
for p in self.copy_paths:
if p.mode: