0

Derive name of the Linux SUID sandbox executable from the main one.

Bug: 1037808
Change-Id: I0319edefde8c7faee772f350d6b183f9dc6e3073
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1981751
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Auto-Submit: Francois Marier <francois@brave.com>
Cr-Commit-Position: refs/heads/master@{#730661}
This commit is contained in:
Francois Marier
2020-01-13 18:43:52 +00:00
committed by Commit Bot
parent ef2405debb
commit 07dd9f6fb1
3 changed files with 6 additions and 4 deletions
AUTHORS
chrome/installer/linux/common
sandbox/linux/suid/client

@ -288,6 +288,7 @@ Fernando Jiménez Moreno <ferjmoreno@gmail.com>
Finbar Crago <finbar.crago@gmail.com>
François Beaufort <beaufort.francois@gmail.com>
Francois Kritzinger <francoisk777@gmail.com>
Francois Marier <francois@brave.com>
Francois Rauch <leopardb@gmail.com>
Frankie Dintino <fdintino@theatlantic.com>
Franklin Ta <fta2012@gmail.com>

@ -391,7 +391,7 @@ stage_install_common() {
exit 1
fi
local expected_perms=777
elif [ "${base_name}" = "chrome-sandbox" ]; then
elif [ "${base_name}" = "${PROGNAME}-sandbox" ]; then
local expected_perms=4755
elif [[ "${base_name}" = "nacl_irt_"*".nexe" ]]; then
local expected_perms=644

@ -119,9 +119,10 @@ bool SetuidSandboxHost::IsDisabledViaEnvironment() {
base::FilePath SetuidSandboxHost::GetSandboxBinaryPath() {
base::FilePath sandbox_binary;
base::FilePath exe_dir;
if (base::PathService::Get(base::DIR_EXE, &exe_dir)) {
base::FilePath sandbox_candidate = exe_dir.AppendASCII("chrome-sandbox");
base::FilePath exe_path;
if (base::PathService::Get(base::FILE_EXE, &exe_path)) {
base::FilePath sandbox_candidate =
exe_path.InsertBeforeExtensionASCII("-sandbox");
if (base::PathExists(sandbox_candidate))
sandbox_binary = sandbox_candidate;
}