Commits


work around missing LOGIN_NAME_MAX Both Linux and OpenBSD have LOGIN_NAME_MAX available when including limits.h, FreeBSD, Darwin and possibly others don't. FreeBSD (and maybe Darwin) have MAXLOGNAME, so try to use that if available. Otherwise use _POSIX_LOGIN_NAME_MAX, but only has a fallback since it has a lower value (9 at the time of writing). If everything fails, use 32 which is what OpenBSD use by default; OpenSMTPd also defaults to it. See also github issue #1


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.


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


export clear_config from parse.y


retire now unused IMSG_CONTROLFD


move control to the main process We may want to be able to run multiple listener process eventually, so the first step is to drop IMSG_CONTROLFD and keep the ctl stuff in the main process.


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.


move table definitions to table.h


restructure project and switch build system use by default the OpenBSD mk infrastructure to build and test all the kamid components.