From 2ecbdbe5ebbef9e9f305a207fdcbfda5d7b27801 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 6 Jan 2007 17:34:56 +0000 Subject: [PATCH] * Hack to allow the setuid root program fusermount to work. svn path=/nixpkgs/trunk/; revision=7542 --- pkgs/os-specific/linux/fuse/builder.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/os-specific/linux/fuse/builder.sh b/pkgs/os-specific/linux/fuse/builder.sh index c0c468e228b0..5f0d53954e7e 100644 --- a/pkgs/os-specific/linux/fuse/builder.sh +++ b/pkgs/os-specific/linux/fuse/builder.sh @@ -4,4 +4,13 @@ export MOUNT_FUSE_PATH=$out/sbin export INIT_D_PATH=$out/etc/init.d export UDEV_RULES_PATH=$out/etc/udev/rules.d +# This is ugly. Normally, FUSE executes $out/bin/fusermount to mount +# the file system. However, fusermount should be setuid root, but Nix +# doesn't support setuid binaries, so fusermount will fail. By +# setting FUSERMOUNT_DIR to a non-existant path, FUSE will fall back +# to searching for fusermount in $PATH. The user is responsible for +# (e.g.) setting up a setuid-wrapper for fusermount and adding it to +# $PATH. +export NIX_CFLAGS_COMPILE="-DFUSERMOUNT_DIR=\"/no-such-path\"" + genericBuild