release: sync public installer asset remount-fuse.sh

This commit is contained in:
2026-09-04 14:07:27 +00:00
parent 95a320b8c3
commit 895914d3cf
+4 -5
View File
@@ -21,13 +21,12 @@ case "$install_dir" in ''|/|*[![:print:]]*) die 'installation directory is inval
[ -d "$install_dir" ] || die "installation directory does not exist: $install_dir" [ -d "$install_dir" ] || die "installation directory does not exist: $install_dir"
install_dir=$(CDPATH='' cd -- "$install_dir" && pwd -P) || die 'cannot canonicalize installation directory' install_dir=$(CDPATH='' cd -- "$install_dir" && pwd -P) || die 'cannot canonicalize installation directory'
[ "$(id -u)" -eq 0 ] || die 'FUSE maintenance requires root (euid 0)' [ "$(id -u)" -eq 0 ] || die 'FUSE maintenance requires root (euid 0)'
INSTALL_PATH="$install_dir" python3 - <<'PY' || die 'installation path components must be root-owned and not group/world writable' INSTALL_PATH="$install_dir" python3 - <<'PY' || die 'installation directory must be root-owned and not group/world writable'
import os, pathlib, stat import os, pathlib, stat
path = pathlib.Path(os.environ['INSTALL_PATH']) path = pathlib.Path(os.environ['INSTALL_PATH'])
current = pathlib.Path(path.root) info = path.lstat()
for part in path.parts[1:]: # Parent directories may belong to the account that owns the home directory.
current /= part # The installation directory and protected files remain root-owned below.
info = current.lstat()
if info.st_uid != 0 or info.st_mode & 0o022: if info.st_uid != 0 or info.st_mode & 0o022:
raise SystemExit(1) raise SystemExit(1)
PY PY