From e61c4acce5afd0f63e5f63aa0059b6380d70c0e2 Mon Sep 17 00:00:00 2001 From: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com> Date: Tue, 14 Nov 2023 10:49:25 -0800 Subject: [PATCH] Desktop: Resolves #9136: Install script: Work around unprivlidged user namespace restrictions by adding the --no-sandbox flag to the launcher (#9137) --- Joplin_install_and_update.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Joplin_install_and_update.sh b/Joplin_install_and_update.sh index 760a6a299..022e4060d 100755 --- a/Joplin_install_and_update.sh +++ b/Joplin_install_and_update.sh @@ -205,9 +205,16 @@ if command -v lsb_release &> /dev/null; then # Check for "The SUID sandbox helper binary was found, but is not configured correctly" problem. # It is present in Debian 1X. A (temporary) patch will be applied at .desktop file # Linux Mint 4 Debbie is based on Debian 10 and requires the same param handling. - if [[ $DISTVER =~ Debian1. ]] || [ "$DISTVER" = "Linuxmint4" ] && [ "$DISTCODENAME" = "debbie" ] || [ "$DISTVER" = "CentOS" ] && [[ "$DISTMAJOR" =~ 6|7 ]] + # + # This also works around Ubuntu 23.10+'s restrictions on unprivileged user namespaces. Electron + # uses these to sandbox processes. Unfortunately, it doesn't look like we can get around this + # without writing the AppImage to a non-user-writable location (without invalidating other security + # controls). See https://discourse.joplinapp.org/t/possible-future-requirement-for-no-sandbox-flag-for-ubuntu-23-10/. + if [[ $DISTVER = "Ubuntu23.10" || $DISTVER =~ Debian1. || ( "$DISTVER" = "Linuxmint4" && "$DISTCODENAME" = "debbie" ) || ( "$DISTVER" = "CentOS" && "$DISTMAJOR" =~ 6|7 ) ]] then SANDBOXPARAM="--no-sandbox" + print "${COLOR_YELLOW}WARNING${COLOR_RESET} Electron sandboxing disabled." + print " See https://discourse.joplinapp.org/t/32160/5 for details." fi fi