Commit Briefs

e114f3d1c1 Omar Polo

gotwebd: retire max_repos setting

Unlike max_repos_display which limits the number of items per page, max_repos is an hard-limit on the number of repos gotwebd would process. "kill it with fire" tracey@ about the idea ok stsp


8762929a1a Omar Polo

gotwebd: add knob for the number of tags and commits in the summary page

ok jamsek


26678adde2 Omar Polo

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@


0c64c2f803 Omar Polo

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@


cdfd248aa7 Omar Polo

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@



89cfaaa7b5 Omar Polo

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@


dfd77022fc Omar Polo

fix typo in previous


c5e111b920 Omar Polo

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

ok plus tweaks stsp@


af09dd3fec Omar Polo

gotwebd: disable listening on interfaces

ok stsp@


a3dc2f5de1 Omar Polo

gotwebd: remove dead ipproto handling in host() and host_if()

ipproto is always -1, so delete the dead code. ok stsp@


20f279724b Omar Polo

gotwebd.conf: unbreak max_repos_display 0

in 1a0c81fb61 I've added a range check too strict for max_repos_display, as zero is allowed and means "show all the repositories".


f4a5cef154 Omar Polo

gotwebd: set chroot path in config_init()

saves a bit fiddling around with ternary operators. sockets_run() will reset the chroot to the default since it calls again config_init(), but at that stage it's not important anymore. ok stsp@


a678036d5f Omar Polo

gotwebd.conf: error if chroot is the empty string



031687baf3 Omar Polo

gotwebd.conf: disallow yes/no for booleans

Supporting both "no" and "on" as valid syntax with an opposite meaning could easily result in accidental misconfiguration. Suggested by stsp, tracey agrees. Patch by Josiah Frentsos, thanks!


f4425f95a5 Omar Polo

gotwebd: disallow 1 for max_commits_display and report range errors

ok stsp


fb30794617 Omar Polo

PF_UNSPEC -> AF_UNSPEC

While they're the same value, it's more correct to use AF_UNSPEC in this case. While here, change SOCK_DGRAM to SOCK_STREAM since it's what we'll be using. ok stsp@


abf3e3f40c Omar Polo

remove host, host_v4 and host_v6; rename host_dns -> host

host_dns() (now just host()) uses getaddrinfo() which knows already how to handle IPv4/IPv6 addresses. Saves a good amount of duplication. ok stsp@


1adf41e808 Omar Polo

gotwebd: drop unused `prefixlen' from struct address

ok stsp@


df2d3cd254 Omar Polo

gotwebd: provide gotweb_render_page() entrypoint for all pages

simplify gotweb_process_request more, handling all the pages inside the big switch. There's only one entrypoint for rendering the templates gotweb_render_page() that takes the page' content as argument. The only real difference is that gotweb_render_index() now skips directory entries which fails to handle. ok tracey@


3a1c1a1b20 Omar Polo

gotwebd.conf: use `listen on socket' syntax for UNIX sockets too

and drop unix_socket and unix_socket_path in server context. ok stsp@


8556b86bf7 Omar Polo

fmt


d5996b9efc Landry Breuil

add respect_exportok flag, defaulting to off

allows to hide repositories if they have the magic git-daemon-export-ok file ok op@ tracey@ stsp@


47b307cd82 Omar Polo

gotwebd.conf: add syntax for defining macros and document them

macros are already supported by parse.y but can only be defined with the -D flag. This adds the ``usual'' syntax for macros: varname = string. While here, fix the markup of the -D flag in the SYNOPSIS and sync the global `grammar' yacc rule with other parse.y grammars in base: - add the /* empty */ comment - increment file->errors on errors ok stsp@, "sure, go for it" tracey@