Commit Briefs

16753fcd1c Thomas Adam

remove 'bind interface removal' TODO item


d1d263eac7 Thomas Adam

gotwebd: inline and remove IMSG_SIZE_CHECK()

I always find confusing if IMSG_SIZE_CHECK() takes pointers or not, and we had at least a few instances of wrong usages, so inline (with exact size checks) and remove the macro. ok stsp@


ab5bda7ecb Thomas Adam

remove the gotwebd repository cache

It only had 4 slots so was never quite useful, and sharing of sock->pack_fds across cached repositories seems problematic. with help from + ok op@


aea518b567 Thomas Adam

whitespace fix


f422fd17f5 Thomas Adam

gotwebd: ignore SIGPIPE in the sockets processes too


25ebe47068 Thomas Adam

gotwebd: send a UNIQUE temp fd

main_compose_sockets() has the 'feature' of implicitly dup(2)'ing the passed file descriptior. But it's not what we need for the temp fds, since those needs to be unique per-children. debugged with stsp@


1962c34091 Thomas Adam

gotwebd: don't chdir to / before spawning the child processes

allows to run gotwebd from the got checkout again.


aada9b0335 Thomas Adam

gotwebd: move log_init() even earlier. I can't read...


f1e20d0119 Thomas Adam

gotwebd: define constant instead of using the magic number 3

suggested by stsp@


3bb657abe5 Thomas Adam

gotwebd: make main_compose_sockets() close the fd on error

concern raised by stsp@


f85c939fb7 Thomas Adam

gotwebd: get rid of proc.[ch]

proc.c really shines when there's a network of different types of processes, potentially with a various number of instances each, that needs to exchange messages. Gotwebd instead has a much simpler design, and using proc.c causes more overhead (/headaches) than it solves. So, this attempts to provide the same functionalities but with a much simpler implementation that fits gotwebd better. ok stsp@


b38e9a2a17 Thomas Adam

gotwebd: improve gotwebd_assign_querystring()

This prevents the issues that we just hit with forgetting to remove PREVID: instead of relying on the enum value to yield the size of a table, use nitems(). Also, quit as soon as the matching key was found, no need to iterate further. ok stsp@


14b59d1085 Thomas Adam

portable: add back drop_privs


fec7520803 Thomas Adam

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.


a69094689a Thomas Adam

gotwebd: garbage-collect PREVID, removed long time ago

This leftover kept QSELEM__MAX bigger than the querystring_keys[] table and causes gotweb_assign_querystring to go out of bounds. Spotted on alpine (thanks to -portable.)


dc672b1af7 Thomas Adam

portable: remove sockaddr-linux code

Now that socket handling is being done in a portable way upstream, there's no need to carry -portable specific code.


b9c7eb9112 Thomas Adam

gotwebd: move log_init() call a bit earlier

Otherwise the log_warnx() call in the -D case logs to syslog.


7d1d4b6ff2 Thomas Adam

gotwebd: clean up sockets_create_socket a bit

Instead of hardcoding the flags, keep ai_{family,socktype,protocol} from the getaddrinfo() call and apply them here. ok stsp@


2edd250dd9 Thomas Adam

gotadmin: get rid of got_sockaddr.[ch] usage

It was added due to gotwebd weird structure sockaddr_storage handling. Instead, save the size reported by getaddrinfo() and not reach into the struct sockaddr_storage at all (except for extracting the port number for diagnostics purposes.) sockets_conf_new_socket_fcgi() gets an hardcoded ipproto to zero (which is the only value it can get in practice, and keeps for the moment the hardcoded SOCK_STREAM. It'll be cleaned in a follow-up. ok stsp@



e760210d3c Thomas Adam

gotwebd: make get_addrs() take the service name directly

This changes how we handle the port number: bubbles up the local portstr added in previous commit and lets getaddrinfo() deals with port numbers and services name. getservice() can be gc. While here add the missing free() in parse.y. ok stsp@


bdab36da5b Thomas Adam

fix typo in previous


61bbe97771 Thomas Adam

gotwebd: merge host() and get_addrs(); use * instead of "" for any addr

ok plus tweaks stsp@


08f1c78e51 Thomas Adam

gotwebd: disable listening on interfaces

ok stsp@