summarylogtreecommitdiffstats
path: root/brave-dev-bin.sh
diff options
context:
space:
mode:
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" -- "$@"