Alexander Barton
5d88030bd1
Support non-standard vsnprintf() return code
...
C99 states that vsnprintf() "returns the number of characters that
would have been printed if the n were unlimited"; but according to the
Linux manual page "glibc until 2.0.6 would return -1 when the output
was truncated" -- so we have to handle both cases ...
2014-01-04 23:57:05 +01:00
Alexander Barton
8872653ef6
Partially revert bc098794: don't require autoconf 2.67
...
GNU autoconf 2.61 is still sufficient to generate the configure script, even
after updating configure.{ng|in}, so don't require a newer version.
2014-01-04 23:12:56 +01:00
Alexander Barton
4d4512cd72
doc/Platforms.txt: Update some systems to ngIRCd 21
...
- update i686/pc/cygwin, gcc 4.8.2
- update x86_64/apple/darwin13.0.0, Apple clang 5.0
- update x86_64/unknown/freebsd8.4, gcc 4.2.1
- update x86_64/unknown/freebsd9.1, gcc 4.2.1
- update x86_64/unknown/linux-gnu, gcc 4.8.2
- update x86_64/unknown/linux-gnu, Open64
- update x86_64/unknown/openbsd4.8, gcc 4.2.1
- update x86_64/unknown/openbsd5.1, gcc 4.2.1
2014-01-02 18:36:18 +01:00
Alexander Barton
bc098794ee
Update configure.ng for autoconf 2.67
...
We already require GNU autoconf 2.67 for generating our build system (at
least this is what the INSTALL document states), so update the build system
accordingly and implement all changes that autoupdate(1) suggests:
- Update AC_PREREQ and AC_INIT
- Use AC_LINK_IFELSE, AC_RUN_IFELSE, and AC_COMPILE_IFELSE
- Remove AC_TYPE_SIGNAL (we don't use RETSIGTYPE)
2014-01-02 15:33:39 +01:00
Alexander Barton
788da901ee
Update Copyright notices for 2014
2014-01-02 15:27:07 +01:00
Alexander Barton
2a40112f09
Merge branch 'bug167-WebircIPAnoDNS' of git://arthur.barton.de/ngircd-alex
...
* 'bug167-WebircIPAnoDNS' of git://arthur.barton.de/ngircd-alex:
WEBIRC: Don't respect hostname when DNS is disabled
2014-01-02 00:45:05 +01:00
Alexander Barton
61b7932e82
Merge branch 'bug165-005-NETWORK' of git://arthur.barton.de/ngircd-alex
...
* 'bug165-005-NETWORK' of git://arthur.barton.de/ngircd-alex:
Implement new configuration option "Network"
2014-01-02 00:44:42 +01:00
Alexander Barton
f024a4992a
portabtest: Add checks for strdup(), strndup(), and strtok_r()
2014-01-01 16:38:36 +01:00
Alexander Barton
d38747d951
portabtest: Actually test functions
...
Test functions snprintf(), strlcpy(), strlcat(), vsnprintf() for
correctness, not only existance (which was quite useless, because
if they weren't available, the program could not have been linked
at all ...).
2014-01-01 15:57:34 +01:00
Alexander Barton
18070e5381
portabtest: Only use one exit code to indicate errors
2013-12-29 17:48:25 +01:00
Alexander Barton
d913323ca9
portabtest: Code cleanup
2013-12-29 17:46:54 +01:00
Federico G. Schwindt
9230f2fff1
Fix permanent k/gline
...
Reported by Toni Spets (hifi - at - jnz - dot - fi).
2013-12-29 01:14:28 +01:00
Alexander Barton
86bdf6e1d4
Implement new configuration option "Network"
...
The new configuration variable "Network" is used to set the (completely
optional) "network name", to which this instance of the daemon belongs.
When set, this name is used in the ISUPPORT(005) numeric which is sent to
all clients connecting to the server after logging in.
Closes bug #165 .
2013-12-27 23:16:11 +01:00
Alexander Barton
1a628fff51
WEBIRC: Don't respect hostname when DNS is disabled
...
When DNS lookups are disabled, don't set the hostname received by the
WEBIRC command, but use the IP address instead.
Reported by Toni Spets <toni.spets@iki.fi>, thanks!
Closes bug #167 .
2013-12-27 22:34:47 +01:00
Alexander Barton
bd33bd770d
OS X has a working getaddrinfo() implementation
2013-12-27 21:35:53 +01:00
Alexander Barton
b8433e9261
Check for working getaddrinfo() function
...
At least AIX 4.3.3 and 5.1 have a broken implementation of getaddrinfo()
which doesn't handle "0" as numeric service correctly. This patch adds
a configure check for this case and changes all calling functions to only
use getaddrinfo() if it "works".
See <http://www.stacken.kth.se/lists/heimdal-discuss/2004-05/msg00059.html >
2013-12-27 21:35:13 +01:00
Federico G. Schwindt
5a424f60da
Fix spelling
2013-12-07 22:48:31 +00:00
Alexander Barton
444308ccde
doc/Platforms.txt: Add and update more systems
...
- add i386/unknown/netbsdelf1.5.2, egcs-1.1.2
- update i386/unknown/openbsd5.3, gcc 4.2.1
- add i386/unknown/openbsd5.4, gcc 4.2.1
- add x86_64/unknown/linux-gnu, nwcc 0.8.2
- update x86_64/unknown/linux-gnu, tcc 0.9.25
Thanks to Götz Hoffart <goetz@hoffart.de>!
2013-12-03 12:16:23 +01:00
Alexander Barton
1ad536eeed
doc/Platforms.txt: Add and update more systems
...
- add i386/unknown/openbsd3.5, gcc 2.95.3
- add x86_64/unknown/linux-gnu, Sun C 5.12
- update mipsel/unknown/linux-gnu, gcc 4.4.5
Thanks to Götz Hoffart <goetz@hoffart.de>!
2013-11-24 18:32:59 +01:00
Alexander Barton
c68ae1a9f5
doc/Platforms.txt: add DragonflyBSD 3.4 on x86_64
...
Thanks to Götz Hoffart <goetz@hoffart.de>!
2013-11-13 11:44:44 +01:00
Alexander Barton
df7ea9e7b4
doc/Platforms.txt: add OpenBSD 5.4 on HPPA
2013-11-12 00:33:30 +01:00
Alexander Barton
34824abe0d
configure: clean up function definitions
2013-11-12 00:25:28 +01:00
Alexander Barton
ae00c100ac
Only use unsetenv() when it is available
...
AIX 4.3 dosn't support it, for example.
2013-11-10 17:08:51 +01:00
Alexander Barton
61d1c864c5
conf-ssl.h: make code compatible with pre-ANSI C compilers
2013-11-09 23:42:56 +01:00
Alexander Barton
8d25044ce5
vsnprintf.c: make code compatible with ansi2knr tool
2013-11-09 23:41:20 +01:00
Alexander Barton
c3c719b978
Remove unused vsnprintf.c test function
2013-11-09 23:31:51 +01:00
Federico G. Schwindt
9ee3760493
Add comments around some IRC_SetPenalty() calls
2013-11-07 18:17:58 +00:00
Federico G. Schwindt
344185b1bd
Rework the penalty handling slightly
...
Increase the penalty for a command before checking its arguments. This
makes the handling more consistent and allow us to move more penalties to
Handle_Request().
2013-11-07 16:53:29 +00:00
Federico G. Schwindt
fcf61e9e02
Move IRC_SetPenalty() to Handle_Request() when possible
...
This centralizes the penalty handling. It also exposes some commands that
lack it for our attention.
2013-11-07 16:29:21 +00:00
Federico G. Schwindt
9f236c4b91
Introduce a macro to define the command list
...
This will pave the way to other changes and simplifies the entries somewhat.
2013-11-07 13:20:08 +00:00
Federico G. Schwindt
00249f3c80
When sending an error use the IRC_WriteErrClient() variant
...
This ensures that all errors have a 2 second penalty.
2013-11-07 10:45:34 +00:00
Federico G. Schwindt
925b4de298
On bad /oper set the penalty to 10 seconds
...
This helps against brute-force attempts.
2013-11-06 21:46:53 +00:00
Federico G. Schwindt
48ea69d778
Remove unneded IRC_SetPenalty() calls
...
IRC_WriteErrClient() already calls IRC_SetPenalty(). While here convert
some IRC_SetPenalty() + IRC_WriteStrClient() to IRC_WriteErrClient().
2013-11-06 18:28:09 +00:00
Federico G. Schwindt
80d0613bf2
Use sizeof() intead of the explicit size
2013-11-06 18:25:11 +00:00
Alexander Barton
4ab688c5e8
Remove wrong #ifdef in Option_String()
...
This fixes the following error when compiling without zlib support:
irc.c: In function ‘Option_String’:
irc.c:487: error: ‘options’ undeclared (first use in this function)
Reported by "der_baer" on #ngircd.
2013-11-01 19:12:35 +01:00
Alexander Barton
2e93129877
NEWS/ChangeLog: Clean up version numbers and release dates
2013-11-01 00:05:43 +01:00
Alexander Barton
94148c37f5
ngIRCd Release 21
2013-10-30 22:20:36 +01:00
Alexander Barton
f25be28ab8
doc/Platforms.txt: add Mac OS X 10.6.8
2013-10-30 22:13:21 +01:00
Alexander Barton
fae7bd1bb7
Update doc/Platforms.txt
2013-10-28 00:00:06 +01:00
Alexander Barton
0556aa1901
ngircd.init: Make sure no stale PID file is left over
2013-10-26 21:34:56 +02:00
Alexander Barton
48698f14a2
platformtest.sh/Platforms.txt: allow user names up to 8 characters
2013-10-23 20:47:55 +02:00
Federico G. Schwindt
8e6db769ac
Check and call arc4random_stir() if present
...
FreeBSD prior to 10.0 does not automatically stir on fork(). Same with
current NetBSD. If arc4random_stir() is present assume is needed and
call it instead of srand().
2013-10-23 16:00:26 +01:00
Alexander Barton
8a041373bb
Debian: Fix sed(1) rules adjusting "ngircd-full" package
...
Error introduced by last commit :-/
2013-10-20 18:33:22 +02:00
Alexander Barton
37c8699f34
Debian: Fix default "HelpFile" file name in ngircd.conf
...
The "full" package variants must use "/usr/share/doc/ngircd-full/Commands.txt"
and "/usr/share/doc/ngircd-full-dbg/Commands.txt" respectively.
2013-10-20 18:06:21 +02:00
Alexander Barton
788b3002d8
ngIRCd Release 21~rc2
2013-10-20 15:51:03 +02:00
Alexander Barton
beb9f65dc8
platformtest.sh: Detect clang compilers
2013-10-20 15:25:19 +02:00
Federico G. Schwindt
62865f7e19
Add support for longer config lines
...
With the introduction of CipherList we could have longer config lines.
Handle up to 1024 bytes and warn if the line will be truncated.
2013-10-17 22:10:53 +01:00
Federico G. Schwindt
a7dda1b28c
Report the correct file on error
2013-10-17 21:52:15 +01:00
Alexander Barton
cba5a2579f
doc/Platforms.txt: Add Open64 and tcc C compilers on Linux
...
Thanks to Götz Hoffart!
2013-10-16 22:27:40 +02:00
Alexander Barton
a2479bb906
platformtest.sh: Detect tcc compiler
2013-10-16 21:59:31 +02:00