Commit Briefs


Stefan Sperling

make it harder to leak notification credentials over plaintext HTTP

ok op@



Omar Polo

add got-notify-http

ok stsp@


Omar Polo

fix gotd_parse_url()

A path of "/" is valid and trailing slashes must be preserved. ok stsp@


Omar Polo

plug memleak in parsing the notify options

The strings need to be released regardless of the process parsing the file.


Stefan Sperling

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@


Stefan Sperling

allow setting variables in gotd.conf; code from gotwebd/parse.y

ok op@


Stefan Sperling

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@


Omar Polo

drop unused strlen; ok stsp@


Stefan Sperling

remove dependency of gitwrapper on gotd/auth.c

Move gotd_auth_parseuid() from auth.c to parse.y as gotd_parseuid(), and remove auth.c from the list of source files required by gitwrapper.


Stefan Sperling

remove dependency of gitwrapper on gotd/listen.c

Move gotd_find_uid_connection_limit() from listen.c into parse.y and remove listen.c from the list of source files required by gitwrapper.


Stefan Sperling

make gotd/gitwrapper start up even if a repository is missing on disk

This should result in more useful behaviour when gitwrapper runs and repositories listed in gotd.conf do not yet exist or do no longer exist.


Stefan Sperling

grammar fix for parse.y error message


Stefan Sperling

reject overlapping protected branch vs. tag namespaces

ok op@


Omar Polo

gotd.conf: free STRINGS in all code paths

ok stsp@



Stefan Sperling

add support for protecting references against 'got send -f' to gotd

ok op@


Stefan Sperling

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.


Stefan Sperling

add gitwrapper(1)

ok op@, tracey@ earlier version


Stefan Sperling

gotd requires a config file; don't fail silently when gotd.conf cannot be read

Fixes an issue encountered by mlarkin@ where the auth process was working with an empty list of repositories and kept saying it could not find a repository which was obviously listed in gotd.conf. Now we can see errors from fopen() in the logs instead. Old code was copied from gotwebd where the config file is optional.


Omar Polo

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>


Tracey Emery

rm unused boolean grammar. ok stsp@


Omar Polo

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


Omar Polo

gotd: move nrepos check to parse_config

ok jamsek stsp