Commit Briefs

Omar Polo

listener: handle IMSG_CTL_LOG_VERBOSE

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


Omar Polo

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.



Omar Polo

work around wstat limitation

the previous commit added an explicit check for extra data in messages. The problem is that wstat voluntarily skips reading some fields at the end, so the len will always be greater than zero!


Omar Polo

fail if the received packet is too long

This adds extra checks to every t* function: if the client sent too much data per message, treat is an a protocol violation and terminate the connection. Regress suite still passes, this is just an extra safety check for finding wrong clients implementations. The twrite function was the only one with a check like this.


Omar Polo

fix np_read{8,16,32,64} functions

they should return 0 on failure, not -1


Omar Polo

kamid: change fid fname size to NAME_MAX

the fname field is just the file name, so NAME_MAX is more appropriate. Committing this separately from the rename change so it's easier to roll back eventually.


Omar Polo

kamid: rename field fpath to fname

it's actually just the file name, not a path


Omar Polo

kamid: add wstat

it's not exactly compliant, as 9p requires the changes to be done atomically, but it's not possible to better targeting a UNIX file system. The 9p manpage regarding wstat isn't clear about the behaviour when changing the name of the file: kamid changes the associated fid to reflect the rename. kamid also allows to rename files to other directories, the fid is updated to the new location even in this case.


Omar Polo

the reported length for directories must be zero

plan9' stat(3) says so...


Omar Polo

simplify client proc bootstrap

Drop the IMSG_AUTH_DIR imsg type and stuff everything in a struct kd_auth_proc that gets sent via IMSG_AUTH. Tweak the necessary bits to compile. While here also start documenting what data we send over which imsg. As an added benefit, now we're sending fixed-size messages instead of variable length strings.


Omar Polo

Merge branch 'portable'

Trying to maintain two branches was impossible at this stage for me alone, so I'll recognize my stupidity and merge the portable branch into the main one. The repository will build using autotools.


Omar Polo

fix build on linux


Omar Polo

restructure project and switch build system

use by default the OpenBSD mk infrastructure to build and test all the kamid components.