diff options
Diffstat (limited to 'brave-bin.sh')
-rw-r--r-- | brave-bin.sh | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/brave-bin.sh b/brave-bin.sh index 641135bc726d..398934ae497f 100644 --- a/brave-bin.sh +++ b/brave-bin.sh @@ -8,8 +8,8 @@ if [[ -f $USER_FLAGS_FILE ]]; then USER_FLAGS="$(cat $USER_FLAGS_FILE | sed 's/#.*//')" fi -if [[ ! (-r /proc/sys/kernel/unprivileged_userns_clone && $(< /proc/sys/kernel/unprivileged_userns_clone) == 1 && -n $(zcat /proc/config.gz | grep CONFIG_USER_NS=y) ) ]]; then - >&2 echo "User namespaces are not detected as enabled on your system, Brave will run with the sandbox disabled" +if [[ -f /proc/sys/kernel/unprivileged_userns_clone && $(< /proc/sys/kernel/unprivileged_userns_clone) == 0 ]]; then + >&2 echo "User namespaces are detected as disabled on your system, Brave will run with the sandbox disabled" SANDBOX_FLAG="--no-sandbox" fi @@ -19,9 +19,4 @@ if [[ -f $BRAVE_PEPPER_FLASH_SO && $BRAVE_USE_FLASH_IF_AVAILABLE == "true" ]]; t PEPPER_FLASH_FLAG="--ppapi-flash-path=$BRAVE_PEPPER_FLASH_SO --ppapi-flash-version=$BRAVE_PEPPER_FLASH_VERSION" fi -# OR true included because Brave currently segfaults when a second -# window is opened from running the brave binary. -# GH Issue: https://github.com/brave/brave-browser/issues/4142 -# NOTE: Replace with an exec call once we don't have to work around -# this bug by having the browser be a subprocess of this script -/usr/lib/brave-bin/brave "$@" $SANDBOX_FLAG $PEPPER_FLASH_FLAG $USER_FLAGS || true +exec /usr/lib/brave-bin/brave "$@" $SANDBOX_FLAG $PEPPER_FLASH_FLAG $USER_FLAGS |