summarylogtreecommitdiffstats
path: root/brave-dev-bin.sh
diff options
context:
space:
mode:
authorGreg White2018-12-10 11:22:38 -0500
committerGreg White2018-12-10 11:22:38 -0500
commit5b5cd3ce8d38250ee4566176475f91fce1af7b3b (patch)
tree25fb05ed9d8cdfee672f5ada4da1e59821ad1695 /brave-dev-bin.sh
parent0c32147d3e4f764a6af5d5ff6a3a683458bbab2f (diff)
downloadaur-5b5cd3ce8d38250ee4566176475f91fce1af7b3b.tar.gz
Be more careful about not disabling sandbox
Diffstat (limited to 'brave-dev-bin.sh')
-rwxr-xr-x[-rw-r--r--]brave-dev-bin.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/brave-dev-bin.sh b/brave-dev-bin.sh
index c07de3676cb..807bc27efca 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" -- "$@"