Created attachment 498900 [details] emerge info while testing bash as /bin/sh dash as /bin/sh Test with: $ gedit admin:///etc/hosts Outcome: gedit hangs and follwing message in syslog: org.gtk.vfs.Daemon[nnn]: Refusing to render service to dead parents. Works fine with app-shells/dash-0.5.8.2 Guessing it might be something to do with /usr/share/gvfs/mounts/admin.mount: [Mount] Type=admin # Add a dummy argument after pkexec, or '/bin/sh -c' will eat the first argument in '$@' Exec=/bin/sh -c 'pkexec /usr/libexec/gvfsd-admin "$@" --address $DBUS_SESSION_BUS_ADDRESS' gvfsd-admin AutoMount=true But editing Exec line to use /bin/bash or changing system /bin/sh to bash doesn't work. Works with dash as /bin/sh and running in a terminal: $ /bin/sh -c 'pkexec /usr/libexec/gvfsd-admin "$@" --address $DBUS_SESSION_BUS_ADDRESS' Problem also exists with gnome-base/gvfs-1.32.1 and out of tree gnome-base/gvfs-1.34.1.
Fixed by this Debian patch, Disable sh -c "command" -> sh -c "exec command" optimization: https://sources.debian.net/src/dash/0.5.8-2.5/debian/diff/0004-SHELL-Disable-sh-c-command-sh-c-exec-command-optimiza.diff/ Was being applied in app-shells/dash-0.5.8.2, applies cleanly to app-shells/dash-0.5.9.1-r3.
Created attachment 499274 [details, diff] gvfs patch to prevent shell optimisation Alternatively fixed for me by patching gvfs /usr/share/gvfs/mounts/admin.mount adding exit $? to the end of the script as suggested here: http://austingroupbugs.net/view.php?id=236 bug 631572 comment 0 suggests other programs are relying on the shell optimisation?
Was this patch upstreamed? Thanks
No. I wasn't sure which upstream! Is the problem with DASH, Debian are still carrying the patch: https://sources.debian.org/patches/dash/0.5.10.2-4/0004-SHELL-Disable-sh-c-command-sh-c-exec-command-optimiza.diff/ or is DASH correct and the others including gvfs doing it wrong?
Working for me OK now with: gnome-base/gvfs-1.38.1 app-shells/dash-0.5.9.1-r3 both without patches. Not sure what fixed it.