diff options
author | Greg White | 2018-12-10 11:22:38 -0500 |
---|---|---|
committer | Greg White | 2018-12-10 11:22:38 -0500 |
commit | 5b5cd3ce8d38250ee4566176475f91fce1af7b3b (patch) | |
tree | 25fb05ed9d8cdfee672f5ada4da1e59821ad1695 | |
parent | 0c32147d3e4f764a6af5d5ff6a3a683458bbab2f (diff) | |
download | aur-5b5cd3ce8d38250ee4566176475f91fce1af7b3b.tar.gz |
Be more careful about not disabling sandbox
-rw-r--r-- | PKGBUILD | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | brave-dev-bin.sh | 9 |
2 files changed, 6 insertions, 5 deletions
@@ -3,7 +3,7 @@ pkgname=brave-dev-bin pkgver=0.59.2 -pkgrel=4 +pkgrel=8 pkgdesc='Web browser that blocks ads and trackers by default (dev binary release).' arch=('x86_64') url='https://brave.com/download-dev' diff --git a/brave-dev-bin.sh b/brave-dev-bin.sh index c07de3676cb4..807bc27efca2 100644..100755 --- a/brave-dev-bin.sh +++ b/brave-dev-bin.sh @@ -1,8 +1,9 @@ #!/usr/bin/env sh -if [[ ! -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" - FLAG="--no-sandbox" +if [ -z "$BRAVE_FLAGS" ]; then + 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" + FLAG="--no-sandbox" + fi fi - exec "/usr/lib/brave-dev-bin/brave" "$BRAVE_FLAGS" "$FLAG" -- "$@" |