summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg White2018-12-10 11:22:38 -0500
committerGreg White2018-12-10 11:22:38 -0500
commit5b5cd3ce8d38250ee4566176475f91fce1af7b3b (patch)
tree25fb05ed9d8cdfee672f5ada4da1e59821ad1695
parent0c32147d3e4f764a6af5d5ff6a3a683458bbab2f (diff)
downloadaur-5b5cd3ce8d38250ee4566176475f91fce1af7b3b.tar.gz
Be more careful about not disabling sandbox
-rw-r--r--PKGBUILD2
-rwxr-xr-x[-rw-r--r--]brave-dev-bin.sh9
2 files changed, 6 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8093967b8041..35c6c7475ee6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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" -- "$@"