Skip to content

Commit

Permalink
bypass spot-sandbox for Flatpak applications started not via flatpak run
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Jun 11, 2023
1 parent e20b645 commit 2e4bd56
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions woof-code/rootfs-skeleton/usr/sbin/run-as-spot
Expand Up @@ -19,10 +19,18 @@ esac

PROG="$1"

case "$PROG" in
*/*) EXEC="$PROG" ;;
*)
EXEC=`command -v "$PROG"`
[ -z "$EXEC" ] && EXEC="$PROG"
;;
esac

# if spot-sandbox is present, run the shell inside a sandbox
SANDBOX=
case "$PROG" in
*.AppImage|flatpak|*/flatpak) ;;
case "$EXEC" in
*.AppImage|flatpak|*/flatpak|/var/lib/flatpak/exports/bin/*) ;;
dbus-daemon) ;; # Landlock breaks xdg-desktop-portal, which fails to open /proc/%u/root
*) SANDBOX=`command -v spot-sandbox` ;;
esac
Expand Down

0 comments on commit 2e4bd56

Please sign in to comment.