Commit graph

22 commits

Author SHA1 Message Date
Benjamin Riefenstahl 108d74cb0a cmd/sshfs.c (recvproc): prefer error codes over error strings
Strings for existing codes in the most used server (OpenSSH) just
repeat the error code name.  OTOH we like to have wording of the
strings under our control as much as possible, so we can easier find
and process them.  Error strings are still usefull as fallback for
compatibility with future versions of the server.
2022-01-07 10:37:02 +00:00
Alex Musolino 02f19713a1 sshfs: update usage text to match man page 2020-07-29 13:56:03 +09:30
cinap_lenrek 6716e9ba20 sshfs: fix dir2attrib() memory leak in wstat error case (thanks BurnZeZ) 2019-10-07 12:51:21 +02:00
cinap_lenrek f763dc1640 sshfs: fix race condition between sendproc() and recvproc()
there was a race between the sendproc putting the request on
the sreqrd[] id and the recvproc handling the response, and
potentially freeing the request before the sendproc() was
finished with the request (or the fid).

so we defer allocating a request id and putting it on the
sreqrd[] stage after we have completely generated the
request in vpack(). this prevents the handling of the request
before it is even sent.

this also means that the SReq should not be touched after
calling sendpkt(), submitreq(), submitsreq().

secondly, putsfid() needs to acquire the RWLock to make sure
sendproc() is finished with the request. the scenario is that
recvproc() can call respond() on the request before sendproc()
has unlocked the SFid.
2019-10-07 11:52:14 +02:00
cinap_lenrek 2401794cff sshfs: use threadexits() instead of exits() 2019-10-04 18:51:44 +02:00
BurnZeZ e93a85710e sshfs: add exits(nil) to threadmain 2018-12-10 05:18:05 +00:00
aiju 41013392a1 sshfs(4): replace the much maligned -r option 2018-05-27 11:06:07 +00:00
aiju b8430d5395 sshfs: if we're going to annoy everyone we should at least match documentation 2018-05-15 16:19:28 +01:00
aiju 3cb5494b26 sshfs: usage 2018-03-20 20:51:04 +00:00
aiju 633397bfda sshfs: update qid and filename on Tcreate 2018-03-04 19:52:35 +00:00
cinap_lenrek 7722220ff5 sshfs: use mtime for qid.vers, fix wstat without name change, fix wstat memory leak 2017-09-22 11:48:41 +02:00
cinap_lenrek 6ed716eab6 sshfs: fork ssh in its own namespace so it wont keep the mountpoint open 2017-08-29 21:22:31 +02:00
cinap_lenrek 3e3d8880d1 sshfs: start sendproc and recvproc in the sane notegroup as the fs process so theadexitsall() works on sshfs: ending. 2017-08-29 19:49:38 +02:00
cinap_lenrek c00c60d327 sshfs: fix -r / retulting in "//foo" paths, memory leaks, use estrdup9p()
just use cleanname() to implement pathcat(), which
handles double slashes and ".." elements already.

have to free the partial dir structue on error in
parsedir().

use estrdup9p() instead of strdup().
2017-04-30 18:28:06 +02:00
aiju ca2fa9596b sshfs: add -r and -M options 2017-04-29 18:44:01 +00:00
cinap_lenrek 51eaebf4f0 sshfs: don't crash when no /etc/password file could be read on the remote side
in a cygwin environment, theres no /etc/passwd file to
translate numeric uid/gid's. changing passwdparse() to
ignore nil string argument.
2017-04-29 16:25:48 +02:00
aiju f00488ec70 sshfs: check correctly for directory bits; calculate parent directory correctly 2017-04-28 20:42:38 +00:00
aiju 7cc9d944df sshfs: reset SReq->reqid field to fix double-free of request ids 2017-04-28 18:45:32 +00:00
aiju 5ce3f70f72 sshfs: remove debug print 2017-04-28 18:32:04 +00:00
aiju 825ab5d286 sshfs: don't cache directory contents 2017-04-28 18:21:03 +00:00
aiju 11954a19a6 sshfs: look up uid/gid from /etc/^(passwd group) 2017-04-28 16:34:24 +00:00
aiju 562fd5b134 add sshfs 2017-04-28 15:41:48 +00:00