Stop SSHFS hanging, and name the real reason Gatekeeper refuses an app

With macFUSE's FSKit extension off, sshfs waits forever and ignores TERM;
sftp_mount gives it 30 seconds, then stops it and says to turn macFUSE on.

On a Mac that allows only App Store apps, app_install said the download
"isn't notarized"; it now says the Mac only allows App Store apps, and where
to change that.

The vanilla image is like that and since macOS 15 only System Settings or
MDM can change it, so 70-apps checks the message and skips the installs
there. 85-sftp checks that add_sftp gives up while the extension is off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
David Young
2026-11-11 15:01:03 -07:00
co-authored by Claude Opus 5.5
parent f2e6908dfd
commit eab26c0888
5 changed files with 74 additions and 11 deletions
+18 -5
View File
@@ -38,6 +38,15 @@ remounts() {
sftp_mounted "$point"
}
# add_sftp fails, within sftp_mount's 30 seconds and not by asking to turn
# the extension on (which waits 5 minutes), and leaves nothing mounted
gives_up() {
local start=$SECONDS
add_sftp "$URL" < /dev/null && return 1
[ $((SECONDS - start)) -le 60 ] || return 1
! sftp_mounted "/Volumes/localhost-sftp-source"
}
scenario() {
local backend id
check "fuse_backend picks one" fuse_backend
@@ -59,11 +68,6 @@ scenario() {
fskit_enabled || pluginkit -e use -i "$id" 2> /dev/null
sleep 2
fi
if ! fskit_ready; then
skip "Turning macFUSE's extension on needs a click in System Settings: check mounting by hand"
return
fi
step "A folder from this Mac, over SSH"
mkdir -p "$HOME/.ssh" "$SOURCE_DIR"
echo "hello over sftp" > "$SOURCE_DIR/hello.txt"
@@ -73,6 +77,15 @@ scenario() {
mkdir -p "$CONF_DIR"
: > "$STORAGE_CONF"
check "sftp_key_works" sftp_key_works "$URL"
# The extension needs a click in System Settings, so it's usually off here
fskit_enabled
case $? in
1) skip "Turning macFUSE's extension on needs a click in System Settings: check mounting by hand"
return ;;
2) check "add_sftp gives up, rather than hanging, while macFUSE's extension isn't on" gives_up
skip "Turning macFUSE's extension on needs a click in System Settings: check mounting by hand"
return ;;
esac
check "add_sftp mounts it and adds it to the list" add_sftp "$URL"
check "launchd has the job" job_loaded
check "a file reads through the mount" reads_through_mount