Commits
- Commit:
5fb50fce7978aa218c87ec7ac6c3f4e7bf20e5b3
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix typo in a comment
- Commit:
4b3827cd43394b89d2af822dcd1d9a9179c1ee10
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make gitwrapper ignore 'permission denied' for repository paths
We recommend that gotsh users should not have direct filesystem
access to repositories served by gotd. Which means admins will be
setting things up as follows if public read-access should be denied:
chown _gotd /git
chmod 700 /git
su -m _gotd -c 'gotadmin init /git/repo.git"
However, gitwrapper would error out when repositories listed in
gotd.conf were inaccessible to the user invoking gitwrapper:
git-upload-pack: /etc/gotd.conf:2: realpath /git/repo.git: Permission denied
Make gitwrapper ignore such errors as they are expected in this situation.
While here, add a PROC_GITWRAPPER process ID for use as a global variable
parse.y can check while special-casing any specific behaviour required by
gitwrapper. (The worse alternative would have been adding a new global
variable to parse.y just to control the behaviour on realpath errors.)
ok op@
- Commit:
839338f6ab1254d6d0709f19db60b164269288d5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotd: wait asynchronously for children termination
Instead of the current kill() + waitpid(WNOHANG), manage the
subprocesses in a separate queue and handle SIGCHLD. A timer is
installed to ensure that misbehaving subprocesses are still killed.
Fixes the current "child PID 0 terminated" logs due to races with
waitpid(). Issue initially reported by Josiah Frentsos.
ok + tweaks stsp@
- Commit:
ba91039c1a0a3d55f4850e26c24730cbf4b5c239
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add kill_repo_proc() similarly to the other kill_*_proc()
ok stsp@
- Commit:
a328bb1b14dfe7d99e5d66c3fab2d5ebe4c4119a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
missing semicolon... sigh
I can't assume I can blindly add one simple line.
- Commit:
c929736a36ab9616de454d901bd908e0c9512a26
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move gotd_child_proc to gotd.c
make it opaque since it's unused outside of gotd.c. While here,
drop the unused `nhelpers' field.
ok/tweak stsp@
- Commit:
ce986f226790f56efc0cbece296c912d25385599
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
update gotd_proc_names after session process unveil changes
fixes "proc (null)" appearing in gotd logs
- Commit:
b061482840b244c4645851c4a02a9ce9723b9fc5
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
unveil repositories read-only in gotd session process while serving fetches
ok op@
- Commit:
c000aa350eac5ac329beb278a513e5f978d2a463
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
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@
- Commit:
9afa3de221045d529287cc3fa75fdc2915aed5c1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add support for protecting references against 'got send -f' to gotd
ok op@
- Commit:
e9e0377f452e9d3f600011e0714cc6c779f10bab
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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.
- Commit:
b09c127974759a56a6b5273da53d215f8500f5a7
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add gitwrapper(1)
ok op@, tracey@ earlier version
- Commit:
53bf0b541977b66862040d4b633fb6b5d3a3c6c8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rename lib/sha1.c to lib/hash.c
It will soon grow functions to deal with sha256 too. stsp@ agrees.
- Commit:
5822e79e39a8777984e08b5d89a8c55d6aa0356d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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>
- Commit:
90270f794c7f4e1ce2b58c8b5bfdc190df4799b6
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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.
- Commit:
575dc3f9456affacd711c081f85e2b41f2544206
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix gotd and gotsh usage() function declaration
"function declaration isn't a prototype"
should fix the error seen by tracey@ on sparc64
- Commit:
ae0cca99d4999f67c98e04bf1f806bd1147d9721
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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.
- Commit:
d30e708b0a65dfef6454cc4ac87e5e8ab8ab6197
- From:
- Omar Polo <op@omarpolo.com>
- Date:
remove \n from log message
- Commit:
f7eb3370fd07878c7c3a6f1470243c791f38f8a9
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make gotd store own PID after daemon(3), and avoid calling daemon(3) needlessly
ok op, jamsek
- Commit:
b5225f29d85b32692bdfed88b3e93babf8269494
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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
- Commit:
e9e01966df9e3fe005d0e7c8abcc92134838eaf9
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
document the gotd -n option
- Commit:
abe844e2dfc7056150889993b3568fe400af7358
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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
- Commit:
809a54db7c7cec54dcacb53f62eedecc18a833da
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotd: move nrepos check to parse_config
ok jamsek stsp
- Commit:
f4e8c21cb2dc6a468bae32a4dcf3a9e18f269527
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotd: print configuration errors without -d
Defer the absolute path check on argv[0] and log_init so that it
becomes possible to run `gotd -n' to check the configuration file and
get errors without specifying -d. Erorrs in the configuration now are
actually always printed regardless of -d.
While here also tweak an error message and print 'configuration OK' if -n
ok stsp@
- Commit:
f7a854cff3b036707a2322ebff8540f29561a8a5
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use just one pointer variable to keep track of a client's repo process
ok op@