Commits
- Commit:
c025ee6f31e47e1c1d5e835c1f8cf2db3d4ac636
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix wrong function name in errno error message
- Commit:
e70fd95218f6bb77ff45fc0c94b8daeb6709ffa7
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
split gotd/session.c into session_read.c and session_write.c
This makes it easier to tweak the read/write code paths separately.
- Commit:
1cb49b67c167a14c547143ce621e7573f59c82a3
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
get rid of gotd client_id field where it is not needed
This ID was necessary back when session and repo processes supported
connections from multiple clients. Nowadays, these processes run per
connection and exit once a single client session has been served.
The other processes already identify the client via the session/repo
file descriptor which has sent an imsg.
- Commit:
ba97b2d7ec97e54a025a39e04c0fd59fdd54a57b
- From:
- Stefan Sperling <stsp@stsp.name>
- 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:
2c52c623be04b56400a5c94cc8d86b6fda214d16
- From:
- Omar Polo <op@omarpolo.com>
- 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:
76a9a38e0c199dfd2ee26f23792b56e2b77952c2
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix swapped format string arguments in gotd verify_imsg_src()
- Commit:
56624d2b65c2b867ab6c9dd5ac2ad51c3a13d47c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make the gotd auth process provide the user's account name for later use
with tweaks from + ok op@
- Commit:
abe89edb698f9d165b74d1fe146b13fade5b52bd
- From:
- Stefan Sperling <stsp@stsp.name>
- 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:
1050403b806ca85666ad4b6a9e83953fdbb5298a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
gotd: stop logging "unexpected end of file" when a client decides to disconnect
- 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