wok rev 16762

sshfs-fuse/rsshfs: do not trust remote read-only option
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jun 17 10:26:10 2014 +0200 (2014-06-17)
parents b30ed17e47a2
children f378d6411e2c
files sshfs-fuse/stuff/rsshfs
line diff
     1.1 --- a/sshfs-fuse/stuff/rsshfs	Tue Jun 17 04:55:00 2014 +0300
     1.2 +++ b/sshfs-fuse/stuff/rsshfs	Tue Jun 17 10:26:10 2014 +0200
     1.3 @@ -19,7 +19,9 @@
     1.4  	
     1.5  *)	fifo=/tmp/rsshfs-$$
     1.6  	mkfifo $fifo
     1.7 -	sftp-server < $fifo | \
     1.8 -	ssh "$rhost" sshfs -o slave ":$lpath" "$rpath" "$@" > $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  	rm -f $fifo
    1.14  esac