Commits
- Commit:
f7abcac262b10952aa804b9a77dde3c728250227
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix typo in a comment
- Commit:
f3807fe5829048c18652abf3e9c2b5f0bb3d0599
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
2c8fb90b1e0dde9cdb762321686cdff591863d11
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
b993e8cc5032750ca5c8382d60cf1def7057abea
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add kill_repo_proc() similarly to the other kill_*_proc()
ok stsp@
- Commit:
3bf0392a5e17709e942bc7eb135e03d901095766
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
missing semicolon... sigh
I can't assume I can blindly add one simple line.
- Commit:
789434649a5946c62ea73cf86e25f2c14a2c25f5
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
844dda16b0ff0b9351544d7d94bd2d299be509c6
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
update gotd_proc_names after session process unveil changes
fixes "proc (null)" appearing in gotd logs
- Commit:
7fed8fa426806e627fcf1e344e4ce134b17a0474
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
unveil repositories read-only in gotd session process while serving fetches
ok op@
- Commit:
f1553d4fd658ca1516a0a238c20ca62e675a3b95
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
6d7eb4f7d125c942358a1f8edf1d350e74141112
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add support for protecting references against 'got send -f' to gotd
ok op@
- Commit:
7554713a026de839e0b958d7885d5d1286b3f547
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
5dcb3a437bc93a9d9e2670049ca9deac25b36dc4
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add gitwrapper(1)
ok op@, tracey@ earlier version
- Commit:
4fccd2fe0ffbbc668b66abe63614470635f92f1b
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: configure: split out dependencies
Rather than assume all dependencies are required for all programs, split
them out.
This will make packaging easier, as well as splitting the code to use
subprojects.
Note that due to the use of config.h semantics, in most cases the
got_compat.h header file is now at the top of the .c file it is included
in, so that it can handle the system header inclusion properly.
- Commit:
98670ba726486c39efff220ab1e074c62023aae7
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: rework SHA detection
Simply the SHA detection by not predicating on libcrypto, but instead
checking individual header files.
- Commit:
4680f704353811c8bb6ce65eac3714d1bd200c26
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: remove sha1.h; found portably
Remove sha1.h as this is found portably across systems.
- Commit:
be288a59f42e0b5e203e2c5545bf3e042ff4b79f
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
rename lib/sha1.c to lib/hash.c
It will soon grow functions to deal with sha256 too. stsp@ agrees.
- Commit:
588a8092bc282294ee23585991e81586905a8fd4
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
52939b686ae906897e9b7956b61d15c255539e6d
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
96d694ac3bc159099a9ad93aa49ec7ac1764b18d
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix gotd and gotsh usage() function declaration
"function declaration isn't a prototype"
should fix the error seen by tracey@ on sparc64
- Commit:
b7acbe65b9c3861892ccd85dce82d78aeb285f54
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
e17294f7d5e2865bd321c133f76d9d4a9e8e44ea
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
remove \n from log message
- Commit:
1f1613cf295163e120025e06b138cda25d5e52f1
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make gotd store own PID after daemon(3), and avoid calling daemon(3) needlessly
ok op, jamsek
- Commit:
f5f71a04830c68cddf72cca7f77c8dec97451abb
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
c855c9f037399e518322eeca99fb2944103555a1
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
document the gotd -n option
- Commit:
7348ded8f8bf5a82c1b0361e0e7591a1af96ff89
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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