94 Commits

Author SHA1 Message Date
Mike Belopuhov
1c6061c4af Don't waste time with DNS response if the session is going away.
Downgrade DNS failures to LOG_DEBUG while here.
2014-10-28 02:48:30 +01:00
Mike Belopuhov
96a2e311af Reset is->group pointer in icb_remove so that we won't try to LIST_REMOVE
multiple times (happens when free is delayed by the DNS resolution).
2014-10-28 02:44:46 +01:00
Florian Obser
e68221bca4 Check that the reverse resolved hostname resolves back to the
connecting IP.
2014-06-23 15:02:33 +02:00
Mike Belopuhov
120eedde50 prevent icbd_drop from freeing an icb session while dns is in progress 2014-06-17 13:46:35 +02:00
Mike Belopuhov
94404148eb check that reverse dns entry can be resolved 2014-06-17 13:33:22 +02:00
Mike Belopuhov
d45051e8e7 make sure to abort bufferevent processing after icbd_drop was called 2014-06-17 13:31:02 +02:00
Mike Belopuhov
383d37b46d don't allow to boot yourself 2014-06-17 13:31:02 +02:00
Florian Obser
dab4135734 Use libevent asr helpers; from eric@
"please commit them now" mikeb@
2014-06-17 12:50:41 +02:00
Florian Obser
ee0e95fea0 new and public asr api; from eric@
OK mikeb
2014-03-31 16:14:10 +02:00
Florian Obser
cdd2ff5fd2 Opportunisticly chdir to "core" (should be writeable by _icbd) after
chroot to get working core dumps.
2014-03-14 22:37:05 +01:00
Mike Belopuhov
ad8b08d940 Chdir to /core after start 2014-03-14 22:22:54 +01:00
Mike Belopuhov
28c4fd37b1 Florian has pointed out that logger code suffers from the same problem
as the main code.  So first of all don't forget to subtract the amount
of what's already read from the total length; secondly correct the
condition to check partial read.
2014-03-14 21:40:28 +01:00
Mike Belopuhov
de862308b5 Don't forget to subtract the amount of what's already read from the
total length.
2014-03-14 20:57:31 +01:00
Mike Belopuhov
1bcb666958 Change the "Bummer" message to the more informative one 2014-03-13 12:16:21 +01:00
Mike Belopuhov
fe81e9ad68 Sprinkle some __func__ into the syslog messages 2014-03-10 13:15:14 +01:00
Mike Belopuhov
7882a6f262 Get rid of the icbd callbacks interface
I believe the idea was initially to have both icb and irc in one
daemon but that's not going to happen.
2014-03-10 13:13:22 +01:00
Mike Belopuhov
e80f9fcc8a Convert dns_* functions to use icbd_log instead of syslog 2014-03-10 13:11:56 +01:00
Mike Belopuhov
b6c9dd34d7 Don't cleanup trailing spaces from open and personal messages. 2014-03-10 11:22:15 +01:00
Florian Obser
c102bbf4a0 Make pidgin-icb /who and /msg work for real.
pidgin-icb seems to treat "." as the current group, so return the who
output for the group the icb session is connected to.
Turns out the previous commit doesn't fix anything - the tests were
wrong, so revert that.
2014-03-09 23:42:06 +01:00
Florian Obser
c4a43f1f8f make /who and /msg work in pidgin-icb 2014-03-09 18:15:27 +01:00
Mike Belopuhov
dcbd425530 Remove the session tree 2014-03-09 16:10:52 +01:00
Mike Belopuhov
e87ab6d0e4 Convert DNS code to use ASR 2014-03-09 16:09:45 +01:00
Mike Belopuhov
718d0c9314 Remove jokes that are not fun anymore 2014-03-09 15:04:11 +01:00
Mike Belopuhov
709589d8fd A couple of fixups for icbd_modupdate 2014-03-09 14:58:22 +01:00
Mike Belopuhov
82d3c1fc7b stat(2) the modtab every time pass is requested
plus some minor style changes
2014-03-07 18:37:37 +01:00
Mike Belopuhov
9c04f2a610 Make dns_done read loop work the same way dns_dispatch does 2014-03-07 17:40:24 +01:00
Mike Belopuhov
2cdab10177 Reset modtabcnt each time we (re)load modtab 2014-03-07 17:32:09 +01:00
Mike Belopuhov
145faa6040 Client can exit before DNS has a chance to update the information 2014-03-07 17:25:18 +01:00
Mike Belopuhov
bacf9da559 line break 2014-03-07 17:24:57 +01:00
Mike Belopuhov
d06af04d84 Don't log default group ("1") messages 2014-03-07 17:08:56 +01:00
Mike Belopuhov
a76f86650f Improve the read loop in dns_dispatch before we switch to bufferevents 2014-03-07 16:45:28 +01:00
Mike Belopuhov
72898238c8 Change DNS resolver to ignore hostnames longer than 39 symbols and
prefer IP/IPv6 addresses instead;  substitute "localhost" with
"unknown".
2014-03-07 16:42:03 +01:00
Mike Belopuhov
88719535c4 Better 2014-03-07 16:23:09 +01:00
Mike Belopuhov
a2fadb4bf6 Get rid of ICB_MSGSIZE+1, fix various off-by-ones and do some truncation
where necessary.
2014-03-07 16:21:30 +01:00
Florian Obser
270fd23c1f Move modtab into the chroot and make it reloadable by SIGHUB
input mikeb, manpage bits benno
2014-03-07 16:20:42 +01:00
Florian Obser
a6b8c8ddaa typo 2014-03-07 15:42:20 +01:00
Mike Belopuhov
058b664099 Make sure the we don't overflow the logfiles table 2014-03-07 15:17:03 +01:00
Mike Belopuhov
e13307d836 Move icbd_ioerr before the dispatch 2014-03-07 15:16:04 +01:00
Mike Belopuhov
be3ad87cfc Rewrite logger_dispatch to use bufferevents to simplify error processing
This also ensures that we're dealing with partial messages correctly and
don't get out of sync with the main process.
2014-03-07 15:14:54 +01:00
Mike Belopuhov
460786f474 Add command line switch '-n' to disable DNS 2014-03-06 16:30:44 +01:00
Mike Belopuhov
f3c60e6c62 After some deliberation we have decided that if modtab is enabled
then it should be possible to steal the moderation.
2014-03-06 16:30:44 +01:00
Florian Obser
3fdebb84a9 log "Today is...", input mikeb 2014-03-06 14:56:10 +01:00
mbelop
709c3bcf05 Merge pull request #1 from bentley/master
Use more semantic mdoc macros.
2014-03-06 14:02:42 +01:00
Sebastian Benoit
6e89d69069 accept throttling on EM/ENFILE, add checks for other errnos 2014-03-06 12:34:15 +01:00
Anthony J. Bentley
21477e97bc Use more semantic mdoc macros. 2014-03-06 00:57:08 -07:00
Mike Belopuhov
9a2a7036c7 Stuff logger_setts into the logger_tick directly 2014-03-06 00:36:39 +01:00
Florian Obser
c1888a5fa8 rotate logs 2014-03-06 00:04:58 +01:00
Florian Obser
23ca6f1881 log group status messages 2014-03-05 23:19:53 +01:00
Mike Belopuhov
87dc6acc86 Remove an strlcpy leftover 2014-03-05 23:02:32 +01:00
Stuart Henderson
e54f151f05 chdir(/) immediately after chroot 2014-03-05 21:48:17 +00:00