Issue #13001: build/linux: Sandbox XDG_DATA_DIRS on AppImage

Closes #13001

XDG_DATA_DIRS is a variable used by many deps (e.g. glib) to
find runtime data. So, let's point XDG_DATA_DIRS to the
appimage bundle so prevent unexpected data from the host.
This commit is contained in:
Bruno Lopes 2025-08-01 10:46:07 -03:00
parent d731a8fc0d
commit bc095d5c83
No known key found for this signature in database

View file

@ -8,11 +8,11 @@ if [ -z "$APPDIR" ]; then
fi
## Minimum runtime paths. See: #13527 and #13603
## Minimum runtime paths. See: #13527, #13603 and #13001
export PATH="$APPDIR"/usr/bin/:"$PATH"
unset LD_PRELOAD
unset LD_LIBRARY_PATH
export XDG_DATA_DIRS="$APPDIR"/usr/share/:"$XDG_DATA_DIRS"
export XDG_DATA_DIRS="$APPDIR/usr/share/"
## Other needed runtime paths (added by 3_dist-gimp-goappimage.sh)