Commit Graph

3345 Commits

Author SHA1 Message Date
Christoph Biedl daa88b7651 Fix building ngIRCd with OpenSSL 1.1
At the moment, ngIRCd fails to build against OpenSSL 1.1 since the
configure check probes for the SSL_library_init symbol which was
removed, but probing for a different function availabe in both versions
solves that problem: SSL_new().

And as SSL_library_init is no longer needed, the patch boils down to
probing SSL_new to assert libssl is available, and disabling the
SSL_library_init invokation from OpenSSL 1.1 on, see also another
application[1] (NSCA-ng) that did pretty much the same.

Patch was compile-tested on both Debian jessie (OpenSSL 1.0.2) and
stretch (OpenSSL 1.1).

[1] <https://www.nsca-ng.org/cgi-bin/repository/nsca-ng/commit/?id=8afc22031ff174f02caad4afc83fa5dff2c29f8a>

(Patch by Christoph, commit message cherry-picked from the email thread
on the mailing list by Alex. Thanks!)
2016-12-05 23:51:07 +01:00
Alexander Barton 2924b3d52a gcc 6.2 warnings: fix code indentation
This fixes the following correct -Wmisleading-indentation warning
messages of gcc 6.2:

irc-write.c: In function ‘IRC_SendWallops’:
irc-write.c:521:4: warning: this ‘if’ clause does not guard...
irc-write.c:524:5: note: ...this statement, but the latter is
  misleadingly indented as if it is guarded by the ‘if’
irc-write.c:526:4: warning: this ‘if’ clause does not guard... []
irc-write.c:529:5: note: ...this statement, but the latter is
  misleadingly indented as if it is guarded by the ‘if’

irc-info.c: In function ‘IRC_STATS’:
irc-info.c:895:3: warning: this ‘else’ clause does not guard...
irc-info.c:897:4: note: ...this statement, but the latter is
  misleadingly indented as if it is guarded by the ‘else’

No functional changes, the code has been correct, but the indentation
was wrong ...
2016-12-05 23:33:12 +01:00
Alexander Barton a335e480c5 Update config.guess and config.sub to recent versions
- config.guess: 2016-04-02
- config.sub: 2016-03-30
2016-11-05 16:50:55 +01:00
Alexander Barton dde89b1267 Platforms.txt: Update systems
- Update x86_64/apple/darwin15.6.0 (Apple clang 8.0)
- Update x86_64/unknown/linux-gnu (gcc 4.9.2)
- Update i386/pc/solaris2.11 (gcc 4.8.2), tests have been run both on
  Solaris 11.2 and Solaris 11.3 successfully, but the system identifier
  is the same ... Thanks to Götz Hoffart <goetz@hoffart.de>!
2016-11-04 21:51:49 +01:00
Alexander Barton 455f073687 PAM.txt: Add note about /etc/pam.d/ngircd permissions 2016-10-24 19:24:21 +02:00
Alexander Barton 804c240320 autogen.sh, ngindent, platformtest.sh: Fix warnings of "shellcheck"
- SC2006: Use $(..) instead of legacy `..`.
- SC2015: Note that A && B || C is not if-then-else. C may run
          when A is true.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
2016-10-21 21:41:48 +02:00
Alexander Barton fb99d7c92e Update Xcode project for latest Xcode version (8.0) 2016-10-21 21:34:48 +02:00
Alexander Barton 1d06ed02ce Update Xcode project for latest Xcode version (7.3) 2016-09-21 22:47:40 +02:00
Alexander Barton c283b52a78 Updated config.sub to version 2014-09-11 2016-09-18 18:46:44 +02:00
Alexander Barton b708c95173 Add "Documentation" variables to systemd configuration files 2016-09-18 18:10:45 +02:00
Alexander Barton 722afc1b81 Make sure that SYSCONFDIR is always set
This is useful when ./configure hasn't been run but some source code
linters are run in an editor, for example.
2016-07-22 19:01:04 +02:00
Alexander Barton 86a64ce6aa Add "PAMServiceName" configuration option
This setting allows to run multiple ngIRCd instances with separate PAM 
configurations on each instance. If one sets it to ngircd-foo, PAM will
use /etc/pam.d/ngircd-foo instead of the default /etc/pam.d/ngircd.

Thanks to "somechris" for the patch & pull request!

Closes #226.
2016-06-06 01:08:55 +02:00
Christian Aistleitner e84000f7b8 Add PAMServiceName setting to specify the used PAM configuration
This setting allows to run multiple ngIRCd instances with
PAM configurations on each instance.
If one sets it to "ngircd-foo", PAM will use `/etc/pam.d/ngircd-foo`
instead of the default `/etc/pam.d/ngircd`.
2016-06-05 23:48:29 +02:00
Alexander Barton a93247d32f Add an ".editorconfig" file to the project 2016-05-07 00:43:30 +02:00
Alexander Barton a673a6e3af Platforms.txt: Remove x86_64/unknown/linux-gnu, tcc 0.9.25
This combination had been successfully tested with ngIRCd 21, but after
further investigation didn't build correctly: it seems as if tcc fails
to correctly link external libraries (e. g. ngipaddr).

Astonishingly the test suite passed nevertheless, with garbled output,
but without the daemon crashing!?

When using tcc with ngIRCd 23 (and current master), the test suite fails
completely because the daemon crashes ... (which actually is good!)
2016-01-16 14:42:53 +01:00
Alexander Barton 0ab4e7bffd Platforms.txt: Add systems
- Add armv7l/unk./linux-gnueabihf (gcc 4.9.2)
- Add x86_64/unknown/linux-gnu (icc 16)
2016-01-16 14:41:57 +01:00
Alexander Barton 8f0d24c831 Travis-CI: use "container-based infrastructure"
See <https://docs.travis-ci.com/user/migrating-from-legacy/> for
details.
2016-01-10 19:50:51 +01:00
Alexander Barton 0a6e284582 platformtest.sh: Delete ngIRCd binary before test run
This ensures that we definitely don't test an old binary later on ...
2016-01-10 17:45:47 +01:00
Alexander Barton 2254e92e60 platformtest.sh: Only show "runs=Y" when test suite succeeded
Display "?" in the "runs" colum when the simple "run test" succeeded but
the test suite failed. And display a message to double check the actual
status, because it is somewhat unclear, if the daemon actually "works"
or not in this case.
2016-01-10 17:39:43 +01:00
Alexander Barton 7cda2f13f4 Platforms.txt: Add and update systems
- Add i386/pc/minix (clang 3.4)
- Update i686/pc/cygwin (gcc 4.9.3)
- Add x86_64/apple/darwin15.2.0 (Apple clang 7.0)
2016-01-07 02:04:23 +01:00
Alexander Barton 7dba1a0766 Send_Message: Fix handling of "empty" targets
Clients can specify multiple targets for the "PRIVMSG", "NOTICE", and
"SQUERY" commands, separated by commas (e. g. "PRIVMSG a,#b,c :text").

Since commit 49ab79d0 ("Limit the number of message targes, and suppress
duplicates"), ngIRCd crashed when the client sent the separator character
only as target(s), e. g. "," or ",,,," etc.!

This patch fixes the bug and adds a test case for this issue.

Thanks to Florian Westphal <fw@strlen.de> for spotting the issue!
2016-01-07 01:54:11 +01:00
Alexander Barton 055d6e8056 Update README file 2016-01-06 19:01:48 +01:00
Alexander Barton 432a9297f8 Platforms.txt: Add and update systems
- Update i586/pc/interix3.5 (gcc 3.3)

- Add i686/pc/linux-gnu (gcc 2.6.3)
- Add i686/pc/linux-gnu (gcc 2.95.2)

Thanks to Götz Hoffart <goetz@hoffart.de>!
2016-01-06 17:21:54 +01:00
Alexander Barton 4dcd5f1225 platformtest.sh: Use $LOGNAME instead of $USER
LOGNAME is more standard than USER.
2016-01-06 15:47:31 +01:00
Alexander Barton 6a5569c27d Update copyright notices for 2016 2016-01-04 22:43:58 +01:00
Alexander Barton 49ab79d0e6 Limit the number of message targes, and suppress duplicates
This prevents an user from flooding the server using commands like this:

  PRIVMSG nick1,nick1,nick1,...

Duplicate targets are suppressed silently (channels and clients).

In addition, the maximum number of targets per PRIVMSG/NOTICE/... command
are limited to MAX_HNDL_TARGETS (25). If there are more, the daemon sends
the new 407 (ERR_TOOMANYTARGETS_MSG) numeric, containing the first target
that hasn't been handled any more.

Closes #187.
2016-01-04 22:15:46 +01:00
Alexander Barton cedba36965 Add "_MSG" postfix to ERR_WILDTOPLEVEL_MSG 2016-01-04 22:10:38 +01:00
Alexander Barton 40bea95c08 Commands.txt, PRIVMSG: Fix "server mask" description 2016-01-04 21:15:05 +01:00
Alexander Barton 7c7d03b730 Enahnce comments for Send_Message() and Send_Message_Mask()
No functional changes.
2016-01-04 20:45:49 +01:00
Alexander Barton 4693226d69 Get rid of unclever assert() in Send_Message_Mask()
Either we use assert() to _guarantee_ a certain condition, or we use
if(...) to test for it. But never both.

So get rid of the assert() in Send_Message_Mask() and handle the case
that the target mask doesn't contain a dot (".") as regular error,
don't require the caller to assure that any more.

This polishes commit 5a312824.

Please note:
The test in Send_Message() is still _required_ to detect whether the
target is a channel (no dot) or a "target mask" (at least one dot)!
2016-01-04 20:37:13 +01:00
Alexander Barton afb59ab8e5 Test suite: Add new test for server-server logins
This test detects the recent NJOIN breakage, for example ...
2015-12-30 17:10:26 +01:00
Alexander Barton d90f0323e5 Fix NJOIN handler killing all clients
This bug has been introduced by commit 1e386fb7ac which had
the logic reversed :-(

Reported by "ninguno" in #ngircd, thanks a lot!
2015-12-30 14:55:55 +01:00
Alexander Barton 01e590b007 contrib/ngindent: Fix shebang line 2015-12-19 19:21:45 +01:00
Alexander Barton 7b7ee6a3ca contrib/platformtest.sh: Warn when external tools are missing 2015-12-19 17:27:27 +01:00
Alexander Barton 46838510ab contrib/platformtest.sh: Make script more portable 2015-12-19 17:27:03 +01:00
Alexander Barton 0903343f85 Platforms.txt: Add and update systems
- Update i386/unknown/openbsd3.5 (gcc 2.95.3)
- Update i686/pc/linux-gnu (gcc 2.7.2.1)
- Add x86_64/unknown/linux-gnu (gcc 5.3.0)

Thanks to Götz Hoffart <goetz@hoffart.de>!
2015-12-19 17:08:55 +01:00
Alexander Barton 182bfac855 doc/Platforms.txt: Sort list 2015-12-19 17:02:10 +01:00
Alexander Barton 1e386fb7ac Make NJOIN handler more fault-tolerant
Don't crash the daemon when the NJOIN handler can't join the new client
to a channel (when the Channel_Join() function failed) but try to KILL this
client -- which is the only possible reaction besides crashing: otherwise
the network would get out of sync.
2015-12-13 21:56:07 +01:00
Alexander Barton 52ccba5d1e IRC_KillClient(): Don't break when called without "Client"
The IRC_KillClient() function is documented to handle the case that the
"Client" structure is NULL, so make sure that this actually works and
can't crash the daemon.

Please note:
The current code doesn't make use of this feature, so this fix is
definitely the "right" thing to do but doesn't fix an actual problem.
2015-12-13 21:53:53 +01:00
Alexander Barton 98e9467c85 IRC_NJOIN(): Code cleanup
No functional changes.
2015-12-13 21:00:46 +01:00
Alexander Barton e8dacb68dc Modes.txt: Add "name prefixes" to channel user mode description 2015-12-13 20:19:05 +01:00
Alexander Barton 398022631a Fix NJOIN not propagating "half ops" status
ngIRCd tested for the wrong prefix of "half ops" when processing NJOIN
commands and therefore never classified a remote user as "half op".

Thanks to wowaname for pointing this out on #ngircd!
2015-12-13 19:55:47 +01:00
Alexander Barton f2cef85fde ngIRCd Release 23 2015-11-16 21:33:15 +01:00
Alexander Barton 6ed59a8548 Update ChangeLog file 2015-11-15 17:07:56 +01:00
Alexander Barton 49acb68584 Update doc/Platforms.txt 2015-11-15 17:06:24 +01:00
Alexander Barton d8aba40f07 Explicitly cast time_t to long when printing it out
This prevents wrong sizes data types on platforms where time_t doesn't
equal a long any more, for example on OpenBSD.
2015-11-15 15:14:12 +01:00
Alexander Barton 87887bc632 contrib/Debian/changelog: Fix email address 2015-09-11 21:11:38 +02:00
Alexander Barton cb3a4321a2 Documentation: Spelling fixes 2015-09-06 19:38:16 +02:00
Alexander Barton 1e84b2640e ngIRCd Release 23~rc1 2015-09-06 16:57:01 +02:00
Alexander Barton 86d27eaf89 Update AUTHORS and .mailmap file
And add a note to doc/HowToRelease.txt to not forget to update the list
of authors in the future ...
2015-09-06 16:51:56 +02:00