Age | Commit message (Collapse) | Author | |
---|---|---|---|
2016-07-02 | check cache tree for collisions when inserting replies. | Ted Unangst | |
if two identical requests are sent out, the first will create a cache entry. the second will not go into the cache tree, but will linger around, causing a crash when we free it and try to remove from the tree. instead, give up if insert fails. diagnosis and initial patch from Duncan. | |||
2016-06-05 | previous change (r1.27) converted to using non blocking sockets and | Ted Unangst | |
spinning on them, trying to preemptively avoid kevent. i've come to conclude this is a poor design. it is exceedingly rare for there to be two requests waiting. instead, we end up burning useless syscalls. | |||
2016-05-31 | with the kernel perm check fixed, we can do this kevent after setuid, | Ted Unangst | |
but still needs to be before pledge. also check for failure. | |||
2016-05-13 | fix logging. | Ted Unangst | |
1. va must be restarted before reuse. 2. don't syslog in debug. assume someone is watching stderr. | |||
2016-05-02 | prepare userland for removing chroot(2) from allowed syscalls under pledge(2). | Sebastien Marie | |
in rebound(8), the worker is still chrooted (and pledged). The supervisor process remains unpledged in order to create workers. ok tedu@ | |||
2016-01-03 | forgot to call RB_INIT. but yet things mostly worked... | Ted Unangst | |
2015-12-17 | add return code to newrequest to distinguish between cache hit and error. | Ted Unangst | |
we want to keep looping for more requests after a hit, not stop. (though i'm reconsidering if the looping is worthwhile. maybe should just return to kevent() after each request.) | |||
2015-12-12 | correct comment | Ted Unangst | |
2015-12-11 | it's not necessary to use a tree to track requests if kevent can do this. | Ted Unangst | |
2015-12-08 | more better fake replies. servfail is the correct response. | Ted Unangst | |
2015-12-05 | all the signal ignoring can be done in one place | Ted Unangst | |
2015-12-05 | pull the config file opening up considerably earlier to fail fast. | Ted Unangst | |
parsing is still done in the child, so we can't guarantee success, but if the file is missing entirely we won't daemonize in that state. | |||
2015-12-04 | refine some logging and error messages. errors will now always go to stderr | Ted Unangst | |
until daemonized and syslog as well. make logerr() work more like err(). | |||
2015-12-04 | push daemon call a little later so if the address is in use we see the | Ted Unangst | |
error message | |||
2015-12-04 | one signal.h should suffice | Ted Unangst | |
2015-12-04 | ignore SIGPIPE. i don't see any way for it to happen, but nevertheless we | Ted Unangst | |
definitely don't want to receive it unexpectedly. | |||
2015-12-04 | - sync usage | Gleydson Soares | |
- add a bit more detail about config alternative file and add -d while here. manpage help from jmc@ schwarze@ thanks a lot! OK tedu jmc schwarze | |||
2015-12-03 | when running on a machine without net, rebound will still receive queries | Ted Unangst | |
from localhost, but then fail to forward them. this causes the resolver to stall waiting for timeouts in situations where it would otherwise fail quickly. we don't know this happens until it's too late, but we can push the resolver forward by sending back empty replies. ok deraadt | |||
2015-12-02 | tell readers about config reloads. | Sebastian Benoit | |
ok tedu | |||
2015-12-01 | add missing fclose(3) | Gleydson Soares | |
ok tedu@ | |||
2015-11-27 | add getpw to pledge. rpath would normally suffice, but there's some double | Ted Unangst | |
checking code in snapshots, and it serves as a useful annotation. from Carlin Bingham | |||
2015-11-24 | use canonical pledge argument ordering | Theo de Raadt | |
2015-11-16 | improve logging slightly | Ted Unangst | |
2015-11-16 | the list insertion needs to occur right after we get a valid socket, | Ted Unangst | |
as that is the hint that the request is on the list. | |||
2015-11-10 | kill the whitespace.. kill the whitespace.. | Theo de Raadt | |
2015-11-01 | chroot to pw_dir instead of the hard-coded /var/empty. Also make the | Reyk Floeter | |
chroot+chdir step look more like in the other privsep daemons. OK tedu@ | |||
2015-10-30 | it is necessary to call tzset() to get syslog timestamps correct. | Ted Unangst | |
i am quite surprised by this, but it's the way things are, so do it. reported by naddy | |||
2015-10-29 | put timeout nullification in correct spot | Ted Unangst | |
2015-10-29 | be a little more precise about checking filters | Ted Unangst | |
2015-10-29 | refold a few lines | Ted Unangst | |
2015-10-29 | collect some cool stats and print them out with SIGUSR1 | Ted Unangst | |
2015-10-28 | impose some limit on the cache size as well. | Ted Unangst | |
2015-10-28 | if accept() fails due to fd exhaustion, stop accepting for one second. | Ted Unangst | |
should only happen for ENFILE, but check for EMFILE too. | |||
2015-10-28 | bug in the request tree code: requests were being added to the tree before | Ted Unangst | |
the socket (the key) was being set. move the enqueue code later, and fix freerequest to only dequeue if socket is set. | |||
2015-10-28 | twiddle with rlimit to give us a few more files. use rlimit as a hint as | Ted Unangst | |
to how many requests to allow open at once. start closing old ones as we approach the limit, which means we track the number of outstanding requests (and count tcp as two). also rename tcp "phase" to tcp, and use it as a more direct indicator. | |||
2015-10-28 | add pledge to main process, though it needs a few more options | Ted Unangst | |
2015-10-28 | use an rb tree for the cache too. modelled after the reqtree. | Ted Unangst | |
2015-10-28 | use an rb tree for finding requests. from Dimitris Papastamos | Ted Unangst | |
2015-10-26 | one second amnesty for timeouts so we don't spin with short timeouts | Ted Unangst | |
2015-10-26 | set listening sockets to nonblocking, then handle as many incoming requests | Ted Unangst | |
as we can in the loop instead of keventing per request. | |||
2015-10-17 | don't need fcntl for non blocking socket, just ask for it upfront | Ted Unangst | |
2015-10-16 | save some file descriptors. instead of a pipe, use kevent to watch parent | Ted Unangst | |
2015-10-16 | naddy would like the child to exit when the parent dies. | Ted Unangst | |
hook up a pipe between them and watch for eof in the child. | |||
2015-10-16 | life is simpler if all requests go in the fifo, and then just remove them | Ted Unangst | |
in the error case instead of duplicating code. | |||
2015-10-16 | deraadt tells me i'm supposed to check if connect() actually worked. | Ted Unangst | |
2015-10-16 | two phase handling for tcp so that slow connects don't stall the process | Ted Unangst | |
2015-10-16 | save request length in cache. naddy noticed we weren't getting any hits. | Ted Unangst | |
2015-10-16 | fine tune the logging some more | Ted Unangst | |
2015-10-16 | simplify logging functions. once a daemon, always a daemon | Ted Unangst | |
2015-10-16 | safety check that we're dealing with the filter we expect | Ted Unangst | |