summarylogtreecommitdiffstats
path: root/brave-dev-bin.sh
diff options
context:
space:
mode:
authorGreg White2018-11-24 21:56:37 -0500
committerGreg White2018-11-24 21:56:37 -0500
commitbd1eb593488213793b39dd50e7a6ce2a95a5a5d6 (patch)
tree3702ebaff535bc02f244b01a9c552bb0daa4e443 /brave-dev-bin.sh
downloadaur-bd1eb593488213793b39dd50e7a6ce2a95a5a5d6.tar.gz
Create
Diffstat (limited to 'brave-dev-bin.sh')
-rw-r--r--brave-dev-bin.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/brave-dev-bin.sh b/brave-dev-bin.sh
new file mode 100644
index 000000000000..0b06ccc7deb9
--- /dev/null
+++ b/brave-dev-bin.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env sh
+
+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
+
+exec "/usr/lib/brave-dev-bin/brave" "$FLAG" -- "$@"