Commits
- Commit:
9bc2ee804d400559347917989bde415da69cbc20
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: allow to change the user
ok stsp@
- Commit:
1220d7ea84811c79f71a7f24917d77cb2f10b02a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
got{,web}d: unify log.c
gotd and gotwebd are using almost the same log.c file, so unify.
This only slightly changes gotwebd logs to include the process name,
like gotd.
ok stsp@
- Commit:
c16cda05743b8a017d150757f0b9da0bc5bffa83
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: remove unix_socket_name
Now that `listen' is a top-level, `unix_socket_name' is useless.
The default socket remains /var/www/run/gotweb.sock, to listen on
an alternate socket now `listen on socket "/some/other/sock" can
be used.
part of a larger diff that's ok stsp@
- Commit:
d68a7b14eb6995f6fc4c877ea24276f6b0174f85
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: make `listen' a top-level statement
gotwebd only uses the server name (i.e. the Host HTTP header) to
match the server blocks. Since gotwebd by design sits behind an
http server which is expected to filter virtual hosts, there's
little point in having `listen' per-server.
part of a larger diff that's ok stsp@
- Commit:
360794246d58ac20752da51536158584a51d1478
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: simplify handling of unix sockets
- don't assume an implicit "listen on socket" when another listen was
specified in a server block
- allow servers to share the sockets they're listening on
- fix unix_socket_name; now it's actually used
- remove `listen on socket off' and `unix_socket off' options that
are now no longer useful
- unify the internal handling of the sockets, i.e. don't consider
unix socket special.
ok tracey@
- Commit:
eb916dafa2967bc60a8996ea7cc0a23a661ed88e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: plug leak in get_addrs() error path
h is free'd by add_addr in case of error, but we still leak the
getaddrinfo result. while here make the check strictier: addr_addr()
fails with -1.
- Commit:
e114f3d1c194932aef73612868f0bedc33110110
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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
- Commit:
8762929a1a8555f4108c4495bd52ca6dd7f7aefc
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: add knob for the number of tags and commits in the summary page
ok jamsek
- Commit:
26678adde25a1fb7fa3e4b78c82a888cc3b767e4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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@
- Commit:
0c64c2f8032e7c3de8b5b3ca5c5bd9047b89b17c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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@
- Commit:
cdfd248aa718819d40d0bf972b7efbb2eabd31c9
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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@
- Commit:
b8b20b3c52fa4f90a1ac5b20e7d8a24fae8d9e27
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: improve error message in get_addrs(); noticed by stsp@
- Commit:
89cfaaa7b56bbfa063ed42929ced2ab244443f62
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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@
- Commit:
dfd77022fc31b33c39f1e800698a2d43644666fa
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix typo in previous
- Commit:
c5e111b920bf4b059fe47aa7dcee5630ad5c3363
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: merge host() and get_addrs(); use * instead of "" for any addr
ok plus tweaks stsp@
- Commit:
af09dd3fec1090c7273f680a0ae5bf50d2183390
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: disable listening on interfaces
ok stsp@
- Commit:
a3dc2f5de198c4a5c70d7b2be4db9179531c4456
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: remove dead ipproto handling in host() and host_if()
ipproto is always -1, so delete the dead code. ok stsp@
- Commit:
20f279724bc851d5e6b52144ce9a6ba987d5fc5d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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".
- Commit:
f4a5cef1546205afab47f148edefabcf77c06d3b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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@
- Commit:
a678036d5fc91d90d799f3ed394f0f721d227d12
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd.conf: error if chroot is the empty string
- Commit:
1a0c81fb613b80af38dbc7f37c12f42a34b363d6
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd.conf: range-check numeric values and raise errors
- Commit:
031687baf3081932383b85041c49de781c43e432
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Omar Polo <op@omarpolo.com>
- Date:
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!
- Commit:
f4425f95a55d6c26f06ecef7b3b8aa6a4a4247de
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: disallow 1 for max_commits_display and report range errors
ok stsp
- Commit:
fb307946174c95e32d2048584c6ab1ce24f3ea00
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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@
- Commit:
abf3e3f40c20ebf4efdce3c7e83efe11d0065ed0
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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@