Commit Graph

2645 Commits

Author SHA1 Message Date
Alexander Barton 695df6532e IDENT reply: only allow alphanumeric characters in user name
Only alphanumeric characters are allowed in the user name, so ignore
all IDENT replies that would violate this rule and use the one supplied
by the USER command.
2012-06-02 00:24:53 +02:00
Alexander Barton 6680b536c4 USER command: only allow alphanumeric characters in user name
Only alphanumeric characters are allowed in the user name, so terminate
the connection if any "strage" characters have been supplied by the user.

This is how other IRC daemons (like ircd2.11 and ircd-seven) behave ...
2012-06-01 23:57:51 +02:00
Alexander Barton a21a7d8b66 doc/Platforms.txt: add powerpc/apple/darwin7.9.0 2012-05-29 17:21:03 +02:00
Alexander Barton c0d059cd0e Change wording of "TLS initialized" message
Don't use the word "socket" to identify the connection number, but use the
word "connection" like on all the other messages logged.
2012-05-23 17:12:31 +02:00
Alexander Barton 7faa3ed7d6 Pidfile_Create(): Don't leak file descriptor on error path
Detected by cppcheck:
 [src/ngircd/ngircd.c:502]: (error) Resource leak: pidfd
2012-05-22 13:31:08 +02:00
Alexander Barton c9b152fa41 INSTALL: Add "satisfy prerequisites" section
Include information for RedHat/Fedora and Debian/Ubuntu based
Linux distributions.
2012-05-19 00:45:23 +02:00
Alexander Barton ae27571414 NEWS, ChangeLog: fixed some misspellings 2012-05-07 22:38:26 +02:00
Alexander Barton 5e5377a063 Numeric 005 (ISUPPORT), CHANMODES: add missing mode "r" 2012-05-01 13:42:57 +02:00
Alexander Barton 884c5bcff1 doc/Platforms.txt: add "armv7l/unknown/linux-gnueabi" 2012-04-29 22:45:46 +02:00
William Pitcock 3a2fcc32cd Add instructions for setting up Atheme. 2012-04-29 19:48:48 +02:00
Alexander Barton a8aa8c6cbc irc-cap.c: mark arguments of Handle_CAP_ACK() as "unused"
This fixes

 irc-cap.c: In function ‘Handle_CAP_ACK’:
 irc-cap.c:163: warning: unused parameter ‘Client’
 irc-cap.c:163: warning: unused parameter ‘Arg’
2012-04-29 12:39:28 +02:00
Alexander Barton f01b09ce84 irc-login.c, login.c: add missing include of "string.h"
This fixes the following warnings with GCC 4.4.5 on Linux:

 irc-login.c: In function ‘IRC_PASS’:
 irc-login.c:92: warning: implicit declaration of function ‘strlen’
 irc-login.c:92: warning: incompatible implicit declaration of built-in function ‘strlen’
 irc-login.c:113: warning: incompatible implicit declaration of built-in function ‘strlen’
 irc-login.c:129: warning: implicit declaration of function ‘strchr’
 irc-login.c:129: warning: incompatible implicit declaration of built-in function ‘strchr’
 irc-login.c:133: warning: implicit declaration of function ‘strcmp’
 irc-login.c: In function ‘IRC_SERVICE’:
 irc-login.c:556: warning: incompatible implicit declaration of built-in function ‘strchr’
 login.c: In function ‘Login_User’:
 login.c:131: warning: implicit declaration of function ‘strcmp’
2012-04-29 12:36:23 +02:00
Alexander Barton 2419a701d8 doc/Modes.txt: Document missing channel mode "e" 2012-04-29 12:11:50 +02:00
Alexander Barton 110be707c3 Merge branch 'master' of /srv/git/ngircd
* 'master' of /srv/git/ngircd:
  "multi-prefix" capability 2/2: adjust NAME and WHO handlers
  "multi-prefix" capability 1/2: implement complete CAP infrastructure
  IRC_Send_NAMES(): Code cleanup
  New function Client_CapSet() in addition to Client_Cap{Add|Del}
  "CAP REQ" starts capability negotiation and delays user registration
  Xcode: update project file for Xcode 4.3
  Correctly handle "CAP END", new client type CLIENT_WAITCAPEND
  Implement core IRC capability handling and "CAP" command
  New "login" source file
  Introduce_Client() => Client_Introduce(), and move it to client.c
2012-04-28 01:00:34 +02:00
Alexander Barton b2743af0ed contrib/platformtest.sh: support "CC=xxx MAKE=yyy ./platformtest.sh"
Now you can use contrib/platformtest.sh on platforms that require a "special"
make (not "make") or compiler (not cc/gcc) binary.
2012-04-28 00:58:23 +02:00
Alexander Barton 76565022fb Merge branch 'capabilities'
* capabilities:
  "multi-prefix" capability 2/2: adjust NAME and WHO handlers
  "multi-prefix" capability 1/2: implement complete CAP infrastructure
  IRC_Send_NAMES(): Code cleanup
  New function Client_CapSet() in addition to Client_Cap{Add|Del}
  "CAP REQ" starts capability negotiation and delays user registration
  Correctly handle "CAP END", new client type CLIENT_WAITCAPEND
  Implement core IRC capability handling and "CAP" command
  New "login" source file
  Introduce_Client() => Client_Introduce(), and move it to client.c
2012-04-28 00:49:37 +02:00
Alexander Barton 4602cb9891 "multi-prefix" capability 2/2: adjust NAME and WHO handlers
The NAME and WHO commands now return multiple usermode prfixes when
the "multi-prefix" capability is in effect for the requesting client.

See <http://ircv3.atheme.org/extensions/multi-prefix-3.1>
2012-04-28 00:39:21 +02:00
Alexander Barton 1d7e99531a "multi-prefix" capability 1/2: implement complete CAP infrastructure
Now ngIRCd is able to handle "CAP LS", "CAP REQ", "CAP LIST", and
"CAP CLEAR" commands.

"multi-prefix" can be set/unset, but has no functionality - yet!
2012-04-28 00:36:41 +02:00
Alexander Barton f0a9dbe3ad IRC_Send_NAMES(): Code cleanup 2012-04-28 00:20:42 +02:00
Alexander Barton 245782897b New function Client_CapSet() in addition to Client_Cap{Add|Del} 2012-04-27 23:56:56 +02:00
Alexander Barton 2327b17656 "CAP REQ" starts capability negotiation and delays user registration
New helper function Set_CAP_Negotiation().
2012-04-27 22:47:22 +02:00
Alexander Barton 359732af85 Xcode: update project file for Xcode 4.3
(No changes needed)
2012-04-27 15:52:09 +02:00
Alexander Barton 1dea0d91a0 platformtest.sh: Detect Open64 C compiler 2012-04-24 12:10:35 +02:00
Alexander Barton d67d077a71 Fix 8ec17063: "Lists_Add(): use size of destination when copying data"
Thanks to Florian Westphal for spotting my silliness ...
2012-04-18 17:54:54 +02:00
Alexander Barton 69be7a85a2 Xcode: correctly sort conn-ssl.{c|h} files in file list 2012-04-17 12:57:27 +02:00
Alexander Barton 8ec17063a6 Lists_Add(): use size of destination when copying data
This fixes the following warning of clang:

/src/ngircd/lists.c:152:44:
 warning: size argument in 'strlcpy' call appears to be size of the
 source; expected the size of the destination [-Wstrlcpy-strlcat-size]

But it isn't a real problem, because the size of the source always is the
same than the size of the destination ...
2012-04-17 12:54:38 +02:00
Alexander Barton da4c1ebe81 Correctly handle "CAP END", new client type CLIENT_WAITCAPEND 2012-03-31 16:37:31 +02:00
Alexander Barton bd3a7ccb15 Implement core IRC capability handling and "CAP" command
This patch implements the core functions to support "IRC Capabilities"
and the IRC "CAP" command as used by other servers and specified here:
<http://www.leeh.co.uk/draft-mitchell-irc-capabilities-02.html>.

It enables ngIRCd to support the defined handshake, but it doesn't
implement any capabilities, so "CAP LS" and "CAP LIST" always return
the empty set and "CAP REQ ..." always fails with "CAP NAK".
2012-03-31 15:59:06 +02:00
Alexander Barton edfcc2f9d5 New "login" source file
Rename Hello_User[_PostAuth] to Login_User[_PostAuth] and move it to the
new login.c; and move cb_Read_Auth_Result(), too. This will enable further
code to easily call Login_User() when required.
2012-03-31 15:38:46 +02:00
Alexander Barton ee362b3bd2 Introduce_Client() => Client_Introduce(), and move it to client.c 2012-03-31 15:24:30 +02:00
Alexander Barton 67bd1bf34f Makefiles: list each source files on a separate line
Patches that add/remove source files become much nicer this way :-)
2012-03-31 12:52:58 +02:00
Alexander Barton 9f3af061cf Add missing documentation files to Xcode project 2012-03-31 12:51:33 +02:00
Alexander Barton 88c3d4896a Don't ignore "permission denied" errors when enabling chroot
Up to now, ngIRCd silently ignored permission denied errors when trying
to enable a chroot setup: only the "not running chrooted" message became
logged later on.

This patch lets ngIRCd exit with a fatal error when the chroot can't
be enabled on startup -- this is the much safer bevahiour!
2012-03-28 11:30:48 +02:00
Alexander Barton 7b6ef3bc8e FAQ: enhance description of chroot setup 2012-03-28 11:29:26 +02:00
Alexander Barton fbaa751da8 ngIRCd Release 19.1 2012-03-19 19:19:58 +01:00
Alexander Barton 06b6327875 Update ChangeLog for upcoming ngIRCd 19.1 release 2012-03-16 13:55:00 +01:00
Alexander Barton 0d9740b9fa Fix gcc warning, initialize "list" variable to NULL
This fixes the following warning with gcc 4.6.3.:

  irc-mode.c: In function "Channel_Mode":
  irc-mode.c:947:26: error: "list" may be used uninitialized
                     in this function
  irc-mode.c:884:25: error: "list" may be used uninitialized
                     in this function

(The variable has never been used uninitialized, so don't worry)
2012-03-12 22:27:55 +01:00
Alexander Barton e9be3334d1 Fix manual page "hyphen-used-as-minus-sign" error (lintian)
Thanks to Christoph Biedl for reporting this!
2012-03-12 11:02:17 +01:00
Alexander Barton 0ae74ceaed Fix typo: Please not -> Please note
Thanks to Götz Hoffart!
2012-03-12 09:49:24 +01:00
Alexander Barton 17ffda1c8a Fix typo: recieved -> received
Thanks to Christoph Biedl.
2012-03-12 09:47:19 +01:00
Alexander Barton 0de11ead36 Update NEWS and ChangeLog files 2012-03-05 22:29:53 +01:00
Alexander Barton 9d486db460 Really include _all_ patches to build the Anope module 2012-03-05 21:30:38 +01:00
Christoph Biedl 257fe922d2 getpid.sh: Fix testcase error for Debian using sbuild
When

 * building the ngircd Debian package (on Linux at least) and
 * using the sbuild build system,

the command "ps -af" does not include the commands running inside the
sbuild system. Therefore, start-server.sh will report a fail as getpid.sh
cannot not  find the ./T-ngircd1 just started although it's actually
running. This results in a funny build log ...

         starting server 1 ... failure!
   FAIL: start-server1
         running connect-test ... ok.
   PASS: connect-test

The self-test of getpid.sh however will likely succeed as it's happy if
it sees any process with "sh" somewhere in the name. Things go downhill
from there.

The confusing things are:

  * The alternative cowbuilder/pbuilder does not have this problem.
  * The alternative usage "ps ax" does fine.

So, as a quick hack, the patch attached adds another switch to getpid.sh.
2012-03-03 18:53:03 +01:00
Alexander Barton 1068f88377 Don't log "ngIRCd hello message" two times
Start "regular" logging not until the configuration file has been read in
and "SyslolgFacility" is set, and log all configuration errors using the
generic "daemon" facility.

So if there are no configuration errors, logging starts right after parsing
the configuration and we log the configuration file used _after_ reading it.
But this is no problem because every configuration error message includes
the configuration file name as well.

(The "double hello" has been introduced by commit 3641e51109)
2012-03-02 09:41:13 +01:00
Alexander Barton 9e7360e5fa ngIRCd release 19 2012-02-29 17:35:32 +01:00
Alexander Barton 273d4bdd32 Merge branch 'master' of /srv/git/ngircd
* 'master' of /srv/git/ngircd:
  Update doc/Platforms.txt for ngIRCd 19
  doc/README-Interix.txt: note that GNU make should be used
2012-02-29 14:47:37 +01:00
Alexander Barton 27d244dfae Update doc/Platforms.txt for ngIRCd 19 2012-02-29 14:46:34 +01:00
Alexander Barton a39a1a5273 doc/README-Interix.txt: note that GNU make should be used 2012-02-29 13:20:09 +01:00
Alexander Barton ef392e7d37 Update config.guess and config.sub to recent versions 2012-02-27 17:19:44 +01:00
Alexander Barton c38751191f Don't accept "[SSL]" in config when no SSL support is built in 2012-02-26 15:52:12 +01:00