wok rev 16763

sshfs-fuse/rsshfs: allow non root users
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jun 17 10:52:03 2014 +0200 (2014-06-17)
parents fc1b98958191
children 76e26408ec90
files sshfs-fuse/stuff/rsshfs
line diff
     1.1 --- a/sshfs-fuse/stuff/rsshfs	Tue Jun 17 10:26:10 2014 +0200
     1.2 +++ b/sshfs-fuse/stuff/rsshfs	Tue Jun 17 10:52:03 2014 +0200
     1.3 @@ -18,10 +18,12 @@
     1.4  	;;
     1.5  	
     1.6  *)	fifo=/tmp/rsshfs-$$
     1.7 +	ro=""
     1.8  	mkfifo $fifo
     1.9  	case " $@ " in
    1.10 -	*\ -o\ ro\ *) sftp-server -R ;;
    1.11 -	*) sftp-server ;;
    1.12 -	esac <$fifo | ssh "$rhost" sshfs -o slave ":$lpath" "$rpath" "$@" >$fifo
    1.13 +	*\ -o\ ro\ *) ro="-R"
    1.14 +	esac
    1.15 +	/usr/sbin/sftp-server $ro <$fifo | \
    1.16 +	ssh "$rhost" sshfs -o slave ":$lpath" "$rpath" "$@" >$fifo
    1.17  	rm -f $fifo
    1.18  esac