Commits
- 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@
- Commit:
eac23c306591c21ddaa23930159d302f668ae34c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
update client state tracking in the gotd parent process
The session process takes over the old state definitions under
a new name ("session state"). The parent only needs to keep
track of whether a client has been granted access, so it only
uses two states: NEW, and ACCCESS_GRANTED which is set as soon
as the auth process has granted repository access and before
the session and repo_read/repo_write children are started.
Because 'gotctl info' can no longer observe the session state
remove support code for printing it.
ok op@
- Commit:
ee0b2e502f3be1d01835e96bdcd38afed67429f7
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove support for showing client capabilities in 'gotctl info'
The gotd parent process has lost access to client capabilities.
Take the easy way out and remove related code. If needed, client
capabilities can still be found in the debug log with 'gotd -v'.
ok op, jamsek
- Commit:
4da0355e93f589e30bffceac65bfb1a6f2395f36
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove now unused fields from struct gotd_client
- Commit:
ae7c1b785440d9b4e2289d935ca85725f45680f1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add a gotd session process, split off from the parent process
The new session process is able to manipulate files in the repository
and keeps track of the read/write client session state.
The parent process now restricts its view of the filesystem to the
absolute path stored in argv[0], and combines this with unveil "x"
on this path. As a result the parent process can only re-exec itself.
small tweaks + ok op@
- Commit:
9b7f22a6148eb14af6e59de120bb5b1dd0e05469
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
call realpath() during early startup in gotd's parse.y
This ensures that all repositories exist when the process is first started.
It will also help to avoid an "rpath" pledge promise in a future gotd which
uses a separate session process, by avoiding realpath() calls while starting
new processes.
- Commit:
e34d12854902b472e38f40dbc4e1e44acf093240
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
do not treat nonexistent repositories as a fatal error in gotd
- Commit:
c7224e4126f5079e0dcb5b29b8ddb14c242a6c0b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotd: delete unreachable code after gotd_shutdown()
- Commit:
77f619a8442c52e9c02e8060b76c25def0b5f1c6
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
revoke filesystem access in gotd listen process via unveil(2)
This should avoid involuntary use of bind(2) with arbitrary socket paths.
ok op@