Commits


don't treat unhandled signals as a fatal error in gotwebd The default action of some signals may be to terminate the process, but this does not apply to all signals.


In parse_ref_file, release lock when fstat fails It's released in case of other errors. This seems to be an oversight. ok stsp@


Explicitly test S_ISREG in parse_ref_file parse_ref_file previously detected directories in the refs directory by trying to read and checking for EISDIR. This doesn't work on NetBSD, and the S_ISREG should exclude other kinds of non-regular files. ok stsp@


use proper namespacing for gotwebd imsg type symbols


document the actual repository name restrictions enforced in gotsys.conf(5) The previous text came from gotd.conf(5) and suggested that repository names could contain path separators. However, the current gotsys implementation forbids them, and parts of gotsysd assume that a repository name corresponds to a directory entry. So we cannot allow path separators, at least for now.


remove a TODO item that is done


allow setting the repository HEAD reference via gotsys.conf


do not forget to actually free the repo itself in gotsys_repo_free()


some typos courtesy of codespell; ok stsp@


remove a duplicate imsgbuf_clear() call


remove another gotsysd todo item that is done


make gotsys-apply-conf use gotd reload instead of stop + restarting


set close-on-exec flag on more files used during gotd reload


repair build of gotctl and gotsh following the gotd_imsg file split


move duplicated gotd_imsg functions into a single source file


provide imsg-based variants of gotsys check/apply for gotd to use This allows for better inter-process communication, making error reporting easier. It also avoids closing standard output and standard error channels in a freshly forked child process, which seems to be a bad idea.


set close-on-exec flag on gotd socket to avoid it leaking during reloads


avoid double-close of gotd_reload_conf_fd


in gotsys-apply-conf, avoid using a -1 socket fd if gotd is not running


Xr gotctl and document SIGHUP issue


implement reload support in gotd, triggered via gotctl reload Reload must be triggered via 'gotctl reload' rather than SIGHUP because once gotd has dropped root privileges the gotd-secrets.conf file becomes permanently inaccessible. When SIGHUP is received gotd now logs a message which points the user at 'gotctl reload'.


set close-on-exec flag on client connections in gotd parent process Ensures that existing clients will be properly disconnected once the gotd reload feature is introduced.


remove closefrom() in gotd when gotsys is run closefrom doesn't have the desired effect as it may affect unrelated open files in the parent process. The right way to deal with this seems to be setting the close-on-exec flag on file descriptors instead.


drop pointless imsgbuf_allow_fdpass() calls from gotctl


merge two subsequent if (proc_id == GOTD_PROC_GOTD) blocks.