From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#21142: Sshfs-fuse requires fuse Date: Sun, 29 Nov 2015 12:18:45 +0100 Message-ID: <87si3pm4tm.fsf@gnu.org> References: <20150727150532.GA18963@debian> <87wpxk2wjh.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a301V-0006PS-Pd for bug-guix@gnu.org; Sun, 29 Nov 2015 06:20:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a301S-00087O-MF for bug-guix@gnu.org; Sun, 29 Nov 2015 06:20:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:40846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a301S-00087K-JZ for bug-guix@gnu.org; Sun, 29 Nov 2015 06:20:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a301S-0005Ho-4B for bug-guix@gnu.org; Sun, 29 Nov 2015 06:20:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87wpxk2wjh.fsf@netris.org> (Mark H. Weaver's message of "Tue, 28 Jul 2015 10:20:50 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Mark H Weaver Cc: 21142@debbugs.gnu.org Mark H Weaver skribis: > Claes Wallin (=E9=9F=8B=E5=98=89=E8=AA=A0) writes: > >> On 27-Jul-2015 5:06 pm, "Andreas Enge" wrote: >>> >>> Hello, >>> >>> when trying to execute sshfs from the sshfs-fuse package, I obtain >>> fuse: failed to exec fusermount: No such file or directory >>> >>> I think that fuse should be a propagated input of sshfs-fuse. >> >> Maybe it's less intrusive toward the user to wrap sshfs to add fuse to >> its PATH? > > Or patch the reference to 'fusermount' to be an absolute path? This what libfuse does by default in lib/mount.c: --8<---------------cut here---------------start------------->8--- static void exec_fusermount(const char *argv[]) { execv(FUSERMOUNT_DIR "/" FUSERMOUNT_PROG, (char **) argv); execvp(FUSERMOUNT_PROG, (char **) argv); } --8<---------------cut here---------------end--------------->8--- However, we explicitly patch it because in practice the =E2=80=98fusermount= =E2=80=99 binary must be at least set-user-gid to fuse, per mount.fuse(8): --8<---------------cut here---------------start------------->8--- ;; This hack leads libfuse to search for 'fusermount' in ;; $PATH, where it may find a setuid-root binary, instead of ;; trying solely $out/sbin/fusermount and failing because ;; it's not setuid. (substitute* "lib/Makefile" (("-DFUSERMOUNT_DIR=3D[[:graph:]]+") "-DFUSERMOUNT_DIR=3D\\\"/var/empty\\\"")) --8<---------------cut here---------------end--------------->8--- On GuixSD, this is addressed by having =E2=80=98fusermount=E2=80=99 setuid-= root in /run/setuid-programs, so things just work. On foreign distros, there=E2=80=99s not much we can do: Users have to set a= dd a setuid =E2=80=98fusermount=E2=80=99 in their PATH. Closing this bug as =E2=80=9Cwontfix.=E2=80=9D Ludo=E2=80=99.