# HG changeset patch # User Pascal Bellard # Date 1402993570 -7200 # Node ID fc1b989581918f57a01562e7617c1173fcd99b5e # Parent b30ed17e47a2c4529f29b52e3b948a26d9244473 sshfs-fuse/rsshfs: do not trust remote read-only option diff -r b30ed17e47a2 -r fc1b98958191 sshfs-fuse/stuff/rsshfs --- a/sshfs-fuse/stuff/rsshfs Tue Jun 17 04:55:00 2014 +0300 +++ b/sshfs-fuse/stuff/rsshfs Tue Jun 17 10:26:10 2014 +0200 @@ -19,7 +19,9 @@ *) fifo=/tmp/rsshfs-$$ mkfifo $fifo - sftp-server < $fifo | \ - ssh "$rhost" sshfs -o slave ":$lpath" "$rpath" "$@" > $fifo + case " $@ " in + *\ -o\ ro\ *) sftp-server -R ;; + *) sftp-server ;; + esac <$fifo | ssh "$rhost" sshfs -o slave ":$lpath" "$rpath" "$@" >$fifo rm -f $fifo esac