Commits
- Commit:
b2ce1dae7426855da5636b9762b278f2d89651de
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: enable got-notify-email
Now that gotd has the start of helpers, got-notify-email is the first.
This is still behind the --enable-gotd flag.
- Commit:
ce1bfad9f1f7c6b1599e0bfed0a1b169d4a30781
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add initial support for commit notifications to gotd(8)
At present only email notifications are implemented.
Code for HTTP notifications is not yet finished, hence HTTP-related
documentation remains hidden for now.
This adds a new 'notify' process which has an "exec" pledge. It runs
helper programs which implement the notification transport layer,
such as got-notify-email which speaks SMTP. This design avoids having
to link all of gotd with network libraries and related crypto libraries.
Notification content is generated by the 'repo_write' process. Commit log
messages and diffstats are written to a file which the 'notify' process
will pass on to its helpers on stdin. The default output looks similar
to 'got log -d'. If too many new commits are present the output looks
similar to 'got log -s' instead. Tags always look like 'got tag -l'.
The session process coordinates generation of notifications. It maintains
a notification queue which holds one notification per updated reference,
and passes notification requests from this queue to the 'repo_write'
process for notification content creation and then to the 'notify'
process for notification delivery.
Only one notification can be in flight at a time to avoid file descriptor
starvation if many references get updated in a single client session.
ok op@
- Commit:
3d97effaa4fe16c79f725bf260f06220e62e5c6a
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
convert to use imsg_get_fd()
While here also fix a fd leak in got-read-pack. We were dup'ing
imsg.fd without closing imsg.fd later; instead just use imsg_get_fd()
to extract the file descriptor.
Tested by falsifian and Kyle Ackerman, thanks!
'go ahead' stsp@
- Commit:
72657dc95c57d4424da879f2d70ea0510077562f
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix swapped format string arguments in gotd verify_imsg_src()
- Commit:
bb12a5063c996cf9604bfcb3c6c459d8dbf1771d
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make the gotd auth process provide the user's account name for later use
with tweaks from + ok op@
- Commit:
14b59d10858a4042d92f9ec960c38c34fd7e39a6
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: add back drop_privs
- Commit:
fec752080379fa1d041ed3937dfd4ce3fee33fbf
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
allow gotd repo read/write processes to max out data-size resource limits
Proccessing large pack files can easily result in out-of-memory errors
if the datasize limit is too conservative.
- Commit:
1636f5f1250f97681e81b91ecba276e147cbc4ec
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: gotd: re-enable chroot
Reads (git clone) are working but writes (git push) run into an error
- Commit:
4efc8dcb177f6c378c12a7d91f51e6ae4e80078b
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: gotd/gitwrapper: update for libs
Bring gotd and gitwrapper closer to how libraries are detected.
- Commit:
febe25b7cf7410d2a34c127b3981acd3b98edc2d
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: gotd: listen
Include listen.c; make it portable.
- Commit:
2f1efc186f6bda57e8357f593f19883a7edb7895
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: enable compiling gotd
This enables gotd -- for now, this is opt-in at compile-time, via:
./configure --enable-gotd
- Commit:
a6153ffb9ee91bb4fc544a98fae8d50cf2963841
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotd: stop logging "unexpected end of file" when a client decides to disconnect
- 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.