Commit graph

13 commits

Author SHA1 Message Date
kvik e5894dccea pre-lib9p servers: fix incorrect Tversion handling
version(5) says:

	If the server does not understand the client's version
	string, it should respond with an Rversion message (not
	Rerror) with the version string the 7 characters
	``unknown''.

Pre-lib9p file servers -- all except cwfs(4) -- do return Rerror.

lib9p(2) follows the above spec, although ignoring the next part
concerning comparison after period-stripping.  It assumes an
Fcall.version starting with "9P" is correctly formed and returns
the only supported version of the protocol, which seems alright.

This patch brings pre-lib9p servers in accordance with the spec.
2020-08-01 15:27:28 +02:00
cinap_lenrek ac88ce4f7f make bind(2) error handling consistent
The mount() and bind() syscalls return -1 on error,
and the mountid sequence number on success.

The manpage states that the mountid sequence number
is a positive integer, but the kernels implementation
currently uses a unsigned 32-bit integer and does not
guarantee that the mountid will not become negative.

Most code just cares about the error, so test for
the -1 error value only.
2020-05-02 17:32:01 +02:00
cinap_lenrek 1eca33b48c always zero initialize Tm structure for tm2sec() 2019-12-03 08:22:02 +01:00
cinap_lenrek 1132d1b9df tapefs: handle more cpio formats (thanks qrstuv) 2017-03-17 00:45:48 +01:00
cinap_lenrek a0d4c5e208 make error handling in 9p service loops consistent
when we get eof, stop the loop immidiately and do not
rely on the read to eventually return an error.

when convM2S() fails to decode the message, error out
and stop the loop. there is no point in continuing.
2016-07-24 02:21:32 +02:00
cinap_lenrek d24610fe38 tapefs: remove dependency to <authsrv.h> 2015-08-21 23:38:56 +02:00
cinap_lenrek 041d732be7 tar, tarfs: implement longname support
this allows extracting tar archives that use longnames extension,
where the real filename is stored in a special entry with
linkflag == 'L' before the file entry. also skip longlink entries
with linkflag == 'K'.
2015-05-19 12:39:45 +02:00
cinap_lenrek 7f57d5d9c5 unzip/zipfs: handle optional data descriptor signature in trailer 2013-10-10 07:42:13 +02:00
cinap_lenrek 7ad47f1083 tarfs: make file name safe, canonical and free of . and .. (from sources) 2013-10-03 17:30:03 +02:00
cinap_lenrek 6baaf0a773 unzip/zipfs: skip over variable length comment in end of table of content record 2012-08-06 02:25:22 +02:00
cinap_lenrek 92f22e7b5a tapefs: case insensitive walks 2011-09-17 05:21:19 +02:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen e5888a1ffd Import sources from 2011-03-30 iso image 2011-03-30 15:46:40 +03:00