Commit Briefs
move setproctitle/privsep_process earlier
We don't always do privilege dropping (as we may start as unprivileged user), so set these two beforehand so when we skip privdrop we don't miss to set privsep_process and set the process' title.
rework load_file to use pread()
avoids issues since the same file is sent to multiple processes after being dup()'ed. Since these files are meant to be regular files, I don't expect short reads.
simplify ocsp sending using config_send_file
while here add an explicit flush to avoid a fd rampage.
change config_send_file to take the process id as argument
i.e. not hardcode PROC_SERVER
gencert: use secp384r1
prime256v1 should be perfectly fine for all I understand, but OpenBSD' acme-client uses secp384r1 and who am I to disagree :)
parse the config file only once
Don't have all the processes read gmid.conf. The parent needs to do that, and the will send the config to the children (already happening.) The other processes were reading the config anyway to figure out the user and the chroot (if enabled); make the parent pass additional flag to propagate that info. We dissociate a bit from the "usual" proc.c but it's a change worth having.
parse_conf: don't die on error, return -1
this avoids having the daemon dieing on SIGHUP with a bad config file.