Commit Briefs
gotd: return early after disconnect on auth event error
This fixes a segv reported by Mikhail. In this path, any error is already logged, client freed, and event_del() called so we don't need to cleanup in done. ok stsp@
avoid gitwrapper printing a warning when /etc/gotd.conf does not exist
gotd still requires the config file, of course, but gitwrapper must treat is as optional and remain silent if the file cannot be found.
add gitwrapper(1)
ok op@, tracey@ earlier version
rename lib/sha1.c to lib/hash.c
It will soon grow functions to deal with sha256 too. stsp@ agrees.
include sha2.h too where sha1.h is included
In preparation for wide sha256 support; stsp@ agrees. Change done mechanically with find . -iname \*.[cy] -exec sam {} + X ,x/<sha1\.h>/i/\n#include <sha2.h>
fix gotd segfault in libevent while disconnecting clients
Sending a DISCONNECT message to the repo process and then killing it and freeing its structure won't work. The message ends up on internal libevent queues and will soon crash because we have freed the memory for the event structre. Sending that message is a leftover from the times when the repo procs were persistent.
fix gotd and gotsh usage() function declaration
"function declaration isn't a prototype" should fix the error seen by tracey@ on sparc64
make gotd parent dispatch handlers more robust during teardown
We have observed gotd exiting after "cannot find client for fd N" errors. If this occurs then we are likely in the process of disconnecting a client session while processing an event from a child process. Treat the above error as non-fatal and stop processing more events from the child process.
gotd: disconnect on client EOF too
Otherwise gotd keeps the (client-closed) sockets around and may prevent new connections from being established since they still count for the limits. ok jamsek, stsp
gotd: move socket path check to parse.y and error from the main process
It's handy to have a "bad unix socket path" error being reported directly from the main process since can get caught by `gotd -n'. ok jamsek stsp
gotd: move nrepos check to parse_config
ok jamsek stsp