Commits


fail on "jumbo" requests (except for Twrite) except for Twrite, all other requests are passed via a single imsg. We don't handle "jumbo" request for anything outside Twrite, nor it does make sense actually, so let's drop it. (well, for Twstat an argument can be made, maybe)


proper err handling for parse_message


allow Twrite with size bigger than ~16K Until now I've been using a single imsg to handle each messages and the imsg framework has a limit of around 16K for message. For almost all requests, this is fine. Except for Twrite and Tread. This is an attempt to make Twrite handle bigger buffers. The listener process just looks at how big a request is and split it up in multiple messages and the client process tries to remember the fid, position and missing data to continue the write. This means that a single Twrite can be split up in multiple write(2)s.


reject connections with an msize ridiculously small


fix twstat handling of mode bits twstat was truncating out the user mode bits. Found the hard way by cage.


fix parsing of Twstat


stat: fix `mode' format Select only the lower two and set the correct bit for directory entries. While the lower two bytes seems to behave just as on UNIX, the upper ones don't (at least on OpenBSD.)


serialize_stat: fix overflow check, report failure


don't expose the "." ad ".." directory entries


Tattach: handle aname "" 9front uses aname "" during Tattach, at least with 9fs without special arguments, so convert it to our current representation.


fix format of Rstat `count' should be a 2-byte (16-bit) value and we're not neither accounting for it nor sending it.


client_send_listener: send correct peerid fix typo in previous commit where `0' was used instead of peerid. Spotted by cage, thanks!


add IMSG_CTL_DEBUG to debug the opened fid meant to be used from kamictl to dump all the opened fid by every connection.


listener: handle IMSG_CTL_LOG_VERBOSE adjust the logging level and forward it to every client process so they can do so too.


wstat: missing read for size 9p stat message have a leading 2 bytes long size field. It's meant to simplify the parsing, because while reading the contents of a directory it's necessary to know how much long an entry is, so the length field is present even in the Rstat reply and in the Twstat input. Previously we didn't consume that bit and thus mis-read all of the following fields.