Commits


tweak debug call


drop unnecessary debugging log


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: enable config reload


cache listener flags in struct client this saves us from the small chance that a client accepted before reconf uses the flags from a listener post reconf.


fix restart in listener drop connections in the handshake phase: the listener from where they've been accepted is now being replaced and its id is no more meaningful. Clients for which we have already sent an auth request are kept.


drop unused flag done for clients


remove clients from the splay at the start of close_conn


use serial ids and drop usage of arc4random it's not so useful here and not (directly) used anywhere else.


listener: correctly swap config after reload and don't forget to free the current config!


use STAILQ_INIT instead of memcpy(head, 0) to init the queues


call clear_config from parse.y in listener_shutdown


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


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.