From 07c655c3e879c4cabe743c02a06d0ae3c75a7bfa Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Sun, 16 Mar 2014 16:38:03 +0100 Subject: [PATCH] sshfs: only pass allow_root if /etc/fuse.conf agrees Signed-off-by: Alejandro Mery --- lib/sshfs_wrapper.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/sshfs_wrapper.sh b/lib/sshfs_wrapper.sh index 637b740..ea77077 100755 --- a/lib/sshfs_wrapper.sh +++ b/lib/sshfs_wrapper.sh @@ -40,7 +40,14 @@ fi case "$M" in sshfs) - exec "$M" -o allow_root -o reconnect -C "$@" \ + sshfs_opt="-o reconnect -C" + if grep -q '^user_allow_other$' /etc/fuse.conf 2> /dev/null; then + sshfs_opt="$sshfs_opt -o allow_root" + else + echo "please enable user_allow_other in /etc/fuse.conf and make it readable" >&2 + fi + + exec "$M" $sshfs_opt "$@" \ "$R" "$D" ;; flickrfs)