ソースを参照

Import upstream version 27~rc1

Alexander Barton 2 年 前
コミット
c7236ac28f
100 ファイル変更6612 行追加8189 行削除
  1. 54 0
      .dockerignore
  2. 0 82
      AUTHORS
  3. 81 0
      AUTHORS.md
  4. 169 3
      ChangeLog
  5. 64 72
      INSTALL.md
  6. 17 60
      Makefile.am
  7. 19 61
      Makefile.in
  8. 104 2
      NEWS
  9. 46 23
      README.md
  10. 88 20
      aclocal.m4
  11. 32 16
      autogen.sh
  12. 716 610
      config.guess
  13. 206 101
      config.sub
  14. 3164 2997
      configure
  15. 36 14
      configure.ac
  16. 36 14
      configure.ng
  17. 12 12
      contrib/Debian/Makefile.am
  18. 12 12
      contrib/Debian/Makefile.in
  19. 6 0
      contrib/Debian/changelog
  20. 0 1
      contrib/Debian/compat
  21. 36 69
      contrib/Debian/control
  22. 54 9
      contrib/Debian/copyright
  23. 1 4
      contrib/Debian/ngircd.default
  24. 0 176
      contrib/Debian/ngircd.init
  25. 8 2
      contrib/Debian/ngircd.pam
  26. 0 21
      contrib/Debian/ngircd.postinst
  27. 65 236
      contrib/Debian/rules
  28. 1 1
      contrib/Debian/source/format
  29. 10 0
      contrib/Debian/watch
  30. 62 0
      contrib/Dockerfile
  31. 0 52
      contrib/MacOSX/Makefile.am
  32. 0 620
      contrib/MacOSX/Makefile.in
  33. 0 136
      contrib/MacOSX/config.h
  34. 0 1
      contrib/MacOSX/ngIRCd.pmdoc/01ngircd-contents.xml
  35. 0 1
      contrib/MacOSX/ngIRCd.pmdoc/01ngircd.xml
  36. 0 1
      contrib/MacOSX/ngIRCd.pmdoc/02de-contents.xml
  37. 0 1
      contrib/MacOSX/ngIRCd.pmdoc/02de.xml
  38. 0 18
      contrib/MacOSX/ngIRCd.pmdoc/Makefile.am
  39. 0 389
      contrib/MacOSX/ngIRCd.pmdoc/Makefile.in
  40. 0 238
      contrib/MacOSX/ngIRCd.pmdoc/index.xml
  41. 0 17
      contrib/MacOSX/ngIRCd.xcodeproj/Makefile.am
  42. 0 387
      contrib/MacOSX/ngIRCd.xcodeproj/Makefile.in
  43. 0 833
      contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj
  44. 0 56
      contrib/MacOSX/postinstall.sh
  45. 0 25
      contrib/MacOSX/preinstall.sh
  46. 5 3
      contrib/Makefile.am
  47. 6 4
      contrib/Makefile.in
  48. 0 49
      contrib/README
  49. 38 0
      contrib/README.md
  50. 3 2
      contrib/de.barton.ngircd.metainfo.xml
  51. 1 1
      contrib/MacOSX/de.barton.ngircd.plist.tmpl
  52. 40 47
      contrib/ngircd.logcheck
  53. 9 4
      contrib/ngircd.service
  54. 2 2
      contrib/ngircd.spec
  55. 1 1
      contrib/nglog.sh
  56. 1 1
      contrib/platformtest.sh
  57. 83 0
      doc/Container.md
  58. 176 0
      doc/FAQ.md
  59. 0 109
      doc/FAQ.txt
  60. 7 6
      doc/HowToRelease.txt
  61. 6 8
      doc/Makefile.am
  62. 6 8
      doc/Makefile.in
  63. 14 5
      doc/Platforms.txt
  64. 80 0
      doc/SSL.md
  65. 0 108
      doc/SSL.txt
  66. 29 6
      doc/sample-ngircd.conf.tmpl
  67. 4 3
      doc/src/footer.inc.html
  68. 47 24
      man/ngircd.8.tmpl
  69. 34 7
      man/ngircd.conf.5.tmpl
  70. 18 6
      src/config.h.in
  71. 2 31
      src/ngircd/Makefile.am
  72. 2 31
      src/ngircd/Makefile.in
  73. 2 31
      src/ngircd/Makefile.ng
  74. 4 4
      src/ngircd/array.c
  75. 25 8
      src/ngircd/channel.c
  76. 2 2
      src/ngircd/channel.h
  77. 10 14
      src/ngircd/client.c
  78. 2 4
      src/ngircd/client.h
  79. 173 51
      src/ngircd/conf.c
  80. 6 4
      src/ngircd/conf.h
  81. 3 9
      src/ngircd/conn-func.c
  82. 378 40
      src/ngircd/conn-ssl.c
  83. 4 4
      src/ngircd/conn-zip.c
  84. 105 48
      src/ngircd/conn.c
  85. 2 3
      src/ngircd/conn.h
  86. 7 4
      src/ngircd/defines.h
  87. 11 0
      src/ngircd/hash.c
  88. 1 1
      src/ngircd/io.c
  89. 28 29
      src/ngircd/irc-channel.c
  90. 3 1
      src/ngircd/irc-channel.h
  91. 8 5
      src/ngircd/irc-info.c
  92. 2 5
      src/ngircd/irc-login.c
  93. 3 1
      src/ngircd/irc-metadata.c
  94. 83 52
      src/ngircd/irc-mode.c
  95. 3 3
      src/ngircd/irc-op.c
  96. 1 1
      src/ngircd/irc-oper.c
  97. 22 2
      src/ngircd/irc-server.c
  98. 1 1
      src/ngircd/irc-write.c
  99. 10 3
      src/ngircd/irc.c
  100. 0 0
      src/ngircd/lists.c

+ 54 - 0
.dockerignore

@@ -0,0 +1,54 @@
+.*.swp
+.deps
+.trunk
+.vscode
+*.a
+*.e_
+*.exe
+*.log
+*.o
+*~
+Makefile
+Makefile.in
+aclocal.m4
+ansi2knr.1
+ansi2knr.c
+ansi2knr.h
+ar-lib
+autom4te.cache
+build-stamp-ngircd*
+build+*
+compile
+config.cache
+config.status
+configure
+configure.ac
+configure.lineno
+cov-int
+cscope.out
+debian
+depcomp
+install-sh
+missing
+ngircd.dest
+doc/sample-ngircd.conf
+doc/src/html
+man/ngircd.8
+man/ngircd.conf.5
+src/*/Makefile.am
+src/config.h
+src/config.h.in
+src/stamp-h1
+src/ngircd/check-help
+src/ngircd/check-version
+src/ngircd/ngircd
+src/portab/portabtest
+src/testsuite/*-test
+src/testsuite/logs
+src/testsuite/ngircd-*.motd
+src/testsuite/ssl/cert.pem
+src/testsuite/ssl/dhparams.pem
+src/testsuite/ssl/key.pem
+src/testsuite/T-ngircd?
+src/testsuite/tests
+src/testsuite/tests-skipped.lst

+ 0 - 82
AUTHORS

@@ -1,82 +0,0 @@
-
-                     ngIRCd - Next Generation IRC Server
-                           http://ngircd.barton.de/
-
-               (c)2001-2021 Alexander Barton and Contributors.
-               ngIRCd is free software and published under the
-                   terms of the GNU General Public License.
-
-                       -- AUTHORS and CONTRIBUTORS --
-
-
-Note:
-If you have comments, patches or something else, please feel free to post
-a mail to the ngIRCd mailing list: <ngircd-ml@ngircd.barton.de> (please see
-<http://ngircd.barton.de/support.php> for details) or join the ngIRCd IRC
-channel "#ngircd" on irc.barton.de: <irc://irc.barton.de/ngircd>.
-
-Don't mail the people listed here directly, if possible!
-
-
-Main Authors
-~~~~~~~~~~~~
-Alexander Barton <alex@barton.de>
-Florian Westphal <fw@strlen.de>
-
-
-Contributors
-~~~~~~~~~~~~
-Ali Shemiran <ashemira@ucsd.edu>
-Ask Bjørn Hansen <ask@develooper.com>
-Benjamin Pineau <ben@zouh.org>
-Bernd Kuhls <bernd.kuhls@t-online.de>
-Brandon Beresini <beresini@google.com>
-Brett Smith <brett@w3.org>
-Brian Collins <bricollins@gmail.com>
-Bryan Caldwell <bcaldwel@ucsd.edu>
-Christian Aistleitner <christian@quelltextlich.at>
-Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de>
-Dana Dahlstrom <dana+ngIRCd@cs.ucsd.edu>
-David Kingston <deathking1337@aim.com>
-DNS <dns@rbose.org>
-Eric Grunow <egrunow@ucsd.edu>
-Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Federico G. Schwindt <fgsch@lodoss.net>
-Gabor Adam Toth <tg@tgbit.net>
-Götz Hoffart <goetz@hoffart.de>
-Hilko Bengen <bengen@hilluzination.de>
-Ian Chard <ian@chard.org>
-Ilja Osthoff <i.osthoff@gmx.net>
-ItsOnlyBinary <ItsOnlyBinary@users.noreply.github.com>
-James Lu <james@overdrivenetworks.com>
-Jari Aalto <jari.aalto@cante.net>
-Johann Hartwig Hauschild <git@hauschild.it>
-JRMU <jrmu@lecturify.com>
-LucentW <lucent@zebes.info>
-Mantas Mikulėnas <grawity@gmail.com>
-Michi <michi+ngircd@dataswamp.org>
-Neale Pickett <neale@woozle.org>
-Peter Powell <petpow@saberuk.com>
-Rolf Eike Beer <eike@sf-mail.de>
-Rosen Penev <rosenp@gmail.com>
-Roy Sindre Norangshol <roy.sindre@norangshol.no>
-Sam James <sam@cmpct.info>
-Scott Perry <scperry@ucsd.edu>
-Sean Reifschneider <jafo-rpms@tummy.com>
-Sebastian Köhler <sebkoehler@whoami.org.uk>
-shankari <shankari@eecs.berkeley.edu>
-Tassilo Schweyer <dev@welterde.de>
-Tom Ryder <tom@sanctum.geek.nz>
-Unit 193 <unit193@ubuntu.com>
-William Pitcock <nenolod@dereferenced.org>
-Windree <57554809+Windree@users.noreply.github.com>
-xnaas <8271327+xnaas@users.noreply.github.com>
-xor <xorboy@gmail.com>
-Yecheng Fu <cofyc.jackson@gmail.com>
-
-
-Code snippets
-~~~~~~~~~~~~~
-Andrew Tridgell & Martin Pool: strl{cpy|cat}()-functions
-John Kercheval: pattern matching functions
-Patrick Powell <papowell@astart.com>: snprintf()-function

+ 81 - 0
AUTHORS.md

@@ -0,0 +1,81 @@
+# [ngIRCd](https://ngircd.barton.de) - Authors & Contributors
+
+Please feel free to post an email to the ngIRCd users mailing list
+<ngircd@lists.barton.de> (see <https://ngircd.barton.de/support> for details)
+if you have comments, patches, suggestions or questions.
+
+Or join the "#ngircd" channel in IRC on irc.barton.de:
+<irc://irc.barton.de/ngircd>.
+
+*Please do not email the people listed here directly, if possible!*
+
+## Main Authors
+
+- Alexander Barton <alex@barton.de>
+- Florian Westphal <fw@strlen.de>
+
+## Contributors
+
+- 9pfs <hellosmile6@tilde.pink>
+- Ali Shemiran <ashemira@ucsd.edu>
+- Ask Bjørn Hansen <ask@develooper.com>
+- Benjamin Pineau <ben@zouh.org>
+- Bernd Kuhls <bernd.kuhls@t-online.de>
+- Brandon Beresini <beresini@google.com>
+- Brett Smith <brett@w3.org>
+- Brian Collins <bricollins@gmail.com>
+- Bryan Caldwell <bcaldwel@ucsd.edu>
+- Christian Aistleitner <christian@quelltextlich.at>
+- Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de>
+- Dana Dahlstrom <dana+ngIRCd@cs.ucsd.edu>
+- David Kingston <deathking1337@aim.com>
+- DNS <dns@rbose.org>
+- Eric Grunow <egrunow@ucsd.edu>
+- ewired <37567272+ewired@users.noreply.github.com>
+- Fabrice Fontaine <fontaine.fabrice@gmail.com>
+- Federico G. Schwindt <fgsch@lodoss.net>
+- Florian Weimer <fweimer@redhat.com>
+- Gabor Adam Toth <tg@tgbit.net>
+- Götz Hoffart <goetz@hoffart.de>
+- hello-smile6 <73048226+hello-smile6@users.noreply.github.com>
+- Hilko Bengen <bengen@hilluzination.de>
+- Ian Chard <ian@chard.org>
+- Ilja Osthoff <i.osthoff@gmx.net>
+- ItsOnlyBinary <ItsOnlyBinary@users.noreply.github.com>
+- Ivan Agarkov <i_agarkov@wargaming.net>
+- James Lu <james@overdrivenetworks.com>
+- Jari Aalto <jari.aalto@cante.net>
+- Johann Hartwig Hauschild <git@hauschild.it>
+- JRMU <jrmu@lecturify.com>
+- Jules Maselbas <jmaselbas@zdiv.net>
+- Katherine Peeters <katherine.peeters@leagueh.xyz>
+- LucentW <lucent@zebes.info>
+- Mantas Mikulėnas <grawity@gmail.com>
+- Michi <michi+ngircd@dataswamp.org>
+- Neale Pickett <neale@woozle.org>
+- Peter Powell <petpow@saberuk.com>
+- Rolf Eike Beer <eike@sf-mail.de>
+- Rosen Penev <rosenp@gmail.com>
+- Roy Sindre Norangshol <roy.sindre@norangshol.no>
+- salaaad2 <47527723+salaaad2@users.noreply.github.com>
+- Sam James <sam@cmpct.info>
+- Scott Perry <scperry@ucsd.edu>
+- Sean Reifschneider <jafo-rpms@tummy.com>
+- Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
+- Sebastian Köhler <sebkoehler@whoami.org.uk>
+- shankari <shankari@eecs.berkeley.edu>
+- Tassilo Schweyer <dev@welterde.de>
+- Tom Ryder <tom@sanctum.geek.nz>
+- Unit 193 <unit193@ubuntu.com>
+- Valentin Lorentz <progval+git@progval.net>
+- William Pitcock <nenolod@dereferenced.org>
+- Windree <57554809+Windree@users.noreply.github.com>
+- xnaas <8271327+xnaas@users.noreply.github.com>
+- xor <xorboy@gmail.com>
+- Yecheng Fu <cofyc.jackson@gmail.com>
+
+## Code snippets
+
+- Andrew Tridgell & Martin Pool: strl{cpy|cat}()-functions
+- John Kercheval: pattern matching functions
+- Patrick Powell <papowell@astart.com>: snprintf()-function

+ 169 - 3
ChangeLog

@@ -2,12 +2,178 @@
                      ngIRCd - Next Generation IRC Server
                            http://ngircd.barton.de/
 
-               (c)2001-2021 Alexander Barton and Contributors.
+               (c)2001-2024 Alexander Barton and Contributors.
                ngIRCd is free software and published under the
                    terms of the GNU General Public License.
 
                                -- ChangeLog --
 
+ngIRCd 27
+
+  ngIRCd 27~rc1 (2024-04-13)
+  - Validate certificates on server links. Up to now, ngIRCd optionally used
+    SSL/TLS encrypted server-server links but never checked and validated any
+    certificates. Now ngIRCd validates SSL/TLS certificates on outgoing
+    server-server links by default and drops(!) connections when the remote
+    certificate is invalid (for example self-signed, expired, not matching the
+    host name, ...). Therefore you have to make sure that all relevant
+    *certificates are valid* (or to disable certificate validation on this
+    connection using the new `SSLVerify = false` setting in the affected
+    `[Server]` block, where the remote certificate is not valid and you can not
+    fix this issue).
+    The original patch for OpenSSL dates back to 2009 and was written by Florian
+    Westphal and was extended for GnuTLS in 2014 by Christoph Biedl. But it took
+    us another 10 years to bring it to life ... oh my! Many thanks to both
+    Florian and Christoph!
+    Closes #120.
+  - Add support for the "sd_notify" protocol of systemd(8): Periodically
+    "ping" the service manager (every 3 seconds) and set a status message
+    showing current connection statistics which then is included in "systemctl
+    status ngircd.service" output. In addition, this enables using the
+    systemd(8) watchdog functionality ("WatchdogSec") for the "ngircd.service"
+    unit and allows it to use the "notify" service type, which results in
+    better status tracking by the service manager.
+  - Try to set file descriptor limit to its maximum and show info on startup:
+    The number of possible parallel connections is limited by the file
+    descriptor limit of the process (among other things). Therefore try to
+    upgrade the current "soft" limit to its "hard" maximum (but limited to
+    100000 instead of "infinite"), and show an information or even warning when
+    the limit is still less than the configured "MaxConnections" setting. Please
+    note that ngIRCd and its linked libraries (like PAM) need file descriptors
+    not only for incoming and outgoing IRC connections, but for reading files
+    and inter-process communication, too! Therefore the actual connection limit
+    is less(!) than the file descriptor limit!
+  - Update and fix the logcheck(8) rules file.
+  - METADATA: Fix unsetting the "cloakhost" hostname, which did not result in
+    the original hostname being restored, but actually resulted in an empty
+    string being used as the client hostname -- which is a protocol violation.
+  - Update the "rpm" make target to use the rpmbuild(8) command.
+  - Add a "Docker file" (contrib/Dockerfile) and corresponding documentation
+    (doc/Container.md) to the project. The resulting container is based on the
+    latest Debian "stable-slim" container and built using a "build container".
+  - Remove outdated, unsupported and broken support for splint(1).
+  - Don't show the default config file name on config errors: The configuration
+    can be set in drop-in files in the include directory, too, so it is not
+    clear in which file it is actually missing.
+  - No longer use a default built-in value for the "IncludeDir" directive when
+    a configuration file was explicitly specified on the command line using
+    "--config"/"-f": This way no default include directory is scanned when a
+    possibly non-default configuration file is used which (intentionally) did
+    not specify an "IncludeDir" directive. So now you can use "-f /dev/null"
+    for checking all built-in defaults, regardless of any local configuration
+    files in the default drop-in directory (which would have been read in
+    until this change).
+  - No longer log channel keys ("passwords") for predefined channels.
+  - The server "Name" in the "[Global]" section of the configuration file no
+    longer needs to be set: When not set (or empty), ngIRCd now tries to
+    deduce a valid IRC server name from the local host name ("node name"),
+    possibly adding a ".host" extension when the host name does not contain a
+    dot (".") which is required in an IRC server name ("ID").
+    This new behavior, with all configuration parameters now being optional,
+    allows running ngIRCd without any configuration file at all.
+  - Silence some compiler warnings.
+  - autogen.sh: Prefer automake 1.11 over other releases because this is the
+    last release supporting "de-ANSI-fication" using the included ansi2knr tool.
+    And because we _want_ to support old K&R platforms, we try hard to use this
+    release of automake when available to generate our build system.
+    Note: This is only relevant for you if you are building from Git sources.
+  - Autodetect support for IPv6 by default: Until now, IPv6 support was disabled
+    by default, which seems a bit outdated in 2024. Note: You still can pass
+    "--enable-ipv6"/"--disable-ipv6" to the ./configure script to forcefully
+    activate or deactivate IPv6 support.
+  - Do IDENT requests even when DNS lookups are disabled: Up to now disabling
+    DNS in the configuration disabled IDENT lookups as well (for no good
+    reason). Now you can activate/deactivate DNS lookups and IDENT requests
+    completely separately. Thanks for reporting this, Miniontoby!
+    Closes #291.
+  - Update config.guess (2023-08-22) and config.sub (2023-09-19) files.
+  - Fix Channel Admins being able to to set Channel Owner status! "Sarah"
+    reported this back in April 2021 and proposed a patch, thanks a lot!
+  - Test suite: Update for OpenSSL 3.x, some command outputs changed, clean up
+    shell scripts and make the getpid.sh script more robust.
+  - Allow SSL client-only configurations without keys/certificates: You don't
+    need to configure certificates/keys as long as you don't configure
+    SSL-enabled listening ports. This can make sense when you want to only link
+    your local daemon to an uplink server using SSL and only have clients on
+    your local host or in your fully trusted network, where SSL is not required.
+  - Remove the unmaintained contrib/MacOSX/ folder: this includes the Xcode
+    project as well as the outdated macOS "Package Maker" configuration. The
+    sample launchd(8) configuration properties list file was moved to
+    "contrib/de.barton.ngircd.plist" and kept.
+  - Fix showing the "Ident" option in "--configtest" output which was never
+    shown because of a coding error. Whoops!
+  - Change GnuTLS "slot handling" messages to debug level: Those messages are
+    about an internal implementation detail, not relevant for an administrator
+    of ngIRCd.
+  - Enlarge buffer for log messages: For example, SSL/TLS certificate
+    information can easily get longer than 256 characters. So enlarge the log
+    buffer to 1 KB to avoid cutting off relevant information.
+  - Respect "SSLConnect" option for incoming connections and do not accept
+    incoming plain-text ("non SSL") server connections for servers configured
+    with "SSLConnect" enabled. This change prevents an authenticated
+    client-server being able to force the server-server to send its password
+    on a plain-text connection when SSL/TLS was intended.
+  - Always try to close a connection with errors immediately, but try hard
+    to avoid too much recursion. Without this patch, an outgoing server
+    connection could get stuck in an "endless" state trying to write out data
+    over and over again.
+  - Add "hopm.service" to "Wants" and "Before" dependencies in the sample
+    systemd unit file (Hopm is the successor of Bopm).
+  - Update Debian package configuration using current "dh_make", package
+    dependencies and build rules. And no longer build 3 different versions,
+    only build "ngircd" which now includes support for IDENT, PAM (disabled in
+    the ngircd.conf installed by the package), SSL (OpenSSL), ZLib and IPv6.
+  - Return ERR_NOTEXTTOSEND on empty PRIVMSG content, which matches the
+    behavior of other servers.
+  - Add a new option "Autojoin" to [Channel] blocks: When it is set, ngIRCd
+    automatically joins all local users to this channel on connect. Note: The
+    users must have permissions to access the channel, otherwise joining them
+    will fail!
+    Thanks Ivan Agarkov <i_agarkov@wargaming.net> for the initial patch!
+  - Hide invisible (+i) users on "WHOIS <pattern>": Let's behave like most(?)
+    other IRC daemons (at least ircd2.11) and hide all +i users when WHOIS is
+    used with a pattern. Otherwise privacy of this users is not guaranteed and
+    the +i mode a bit useless ...
+    Reported by Cahata on #ngircd, thanks!
+  - Update the final "closing connection" message: Add some more information
+    like nick name, user name, host name and bring it in line with some other
+    implementations (at least ircd2.11 and Hybrid).
+  - Fix RPL_INVITING message: All numeric replies must originate from an IRC
+    server, never from a client. Thanks "tommyrot" for reporting this!
+    Closes #307.
+  - Enhance some log messages, for example for errors when accepting new
+    connections.
+  - Make the debug log level ("--debug"/-"d" command line option) always
+    available, not only when ./configure'd with "--enable-debug": the latter
+    now only enables additional checks (like the tests done using assert(2))
+    and is signalled by adding "+DEBUG" to the version "feature string". This
+    change enables everyone to get even more detailed logging when required.
+  - Always report an error when a parameter is missing in a channel "MODE +k"
+    or "MODE +l" command, and better validate their parameters: return the new
+    numeric ERR_INVALIDMODEPARAM_MSG(696) on errors.
+    Thanks Val Lorentz for reporting this!
+    Closes #290.
+  - Allow IRC Operators to use the WHO command on any channel.
+  - Add configuration for "ngIRCd CI" GitHub Action, no longer use Travis-CI.
+  - Send the NAMES list and channel topic to users "forcefully" joined to a
+    channel using NJOIN, like they joined on their own using JOIN, and
+    streamline the order of NAMES list and channel topic messages.
+    Closes #288.
+  - Fix (invalid) error messages when setting modes on local channels which
+    are defined in the configuration file.
+  - Fix handling of G-Lines/K-Lines with cloaked host names.
+  - Streamline logging of debug messages.
+  - Added a new command line option "-y"/"--syslog", with which logging to
+    syslog can be activated/deactivated separately from running on the console
+    (using "--nodaemon") or in the background.
+    Thanks Katherine Peeters for the patch and pull request!
+    Closes #294.
+  - Fix a possible race condition while introducing new clients in the network.
+  - Update, enhance and extend our documentation in README.md, INSTALL.md,
+    doc/HowToRelease.txt and the manual pages ngircd(8) and ngircd.conf(5), add
+    a new doc/QuickStart.md document, and convert some more documentation files
+    to Markdown (AUTHORS.md, contrib/README.md, doc/FAQ.md, doc/SSL.md).
+
 ngIRCd 26.1 (2021-01-02)
 
   - Fix a "format string" compiler warning (detected on OpenBSD).
@@ -122,7 +288,7 @@ ngIRCd 26 (2020-06-20)
     "error" before). Exit with code 2 ("command line error") for all other
     invalid command line options, and show the error message itself on stderr
     (instead of stdout and exit code 1, "generic error", as before).
-    This new behaviour is more in line with the GNU "coding standards",
+    This new behavior is more in line with the GNU "coding standards",
     see <https://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html>.
   - Fix and update Xcode project: Reference correct contrib/Makefile.am file,
     correctly sort contrib/nglog.sh and add "ORGANIZATIONNAME" setting.
@@ -300,7 +466,7 @@ ngIRCd 24 (2017-01-20)
   - contrib/ngindent: Fix shebang line.
   - Make contrib/platformtest.sh script more portable, and only show
     "runs=Y" when the test suite really has been passed successfully.
-  - Code cleanup in the NJON handler and the function killing clients as
+  - Code cleanup in the NJOIN handler and the function killing clients as
     well as the function sending messages to a "mask" (cleaner code, more
     fault tolerant, better code comments).
   - Update and enhance documentation: README file, doc/Platforms.txt,

+ 64 - 72
INSTALL.md

@@ -1,17 +1,38 @@
-# [ngIRCd](https://ngircd.barton.de) - Internet Relay Chat Server
+# [ngIRCd](https://ngircd.barton.de) - Installation
 
-This document explains how to install ngIRCd, the lightweight Internet Relay
+This document describes how to install ngIRCd, the lightweight Internet Relay
 Chat (IRC) server.
 
 The first section lists noteworthy changes to earlier releases; you definitely
 should read this when upgrading your setup! But you can skip over this section
-when you do a fresh installation.
+when you are working on a fresh installation.
 
-All the subsequent sections describe the steps required to install and
-configure ngIRCd.
+The subsequent sections describe the steps required to build and install ngIRCd
+_from sources_. The information given here is not relevant when you are using
+packages provided by your operating system vendor or third-party repositories!
+
+Please see the file `doc/QuickStart.md` in the `doc/` directory or on
+[GitHub](https://github.com/ngircd/ngircd/blob/master/doc/QuickStart.md) for
+information about _setting up_ and _running_ ngIRCd, including some real-world
+configuration examples.
 
 ## Upgrade Information
 
+This section lists important updates and breaking changes that you should be
+aware of *before* starting the upgrade:
+
+Differences to version 26
+
+- **Attention**:
+  Starting with release 27, ngIRCd validates SSL/TLS certificates on outgoing
+  server-server links by default and drops(!) connections when the remote
+  certificate is invalid (for example self-signed, expired, not matching the
+  host name, ...). Therefore you have to make sure that all relevant
+  *certificates are valid* (or to disable certificate validation on this
+  connection using the new `SSLVerify = false` setting in the affected
+  `[Server]` block, where the remote certificate is not valid and you can not
+  fix this issue).
+
 Differences to version 25
 
 - **Attention**:
@@ -198,6 +219,18 @@ build the sources including all optional features and to run the test suite:
     telnet zlib-devel
 ```
 
+*Note:* More recent versions use the DNF package manager; so substitute "yum"
+with "dnf" in the command above. And neither "libident-devel" (IDENT support)
+nor "tcp_wrappers-devel" (TCP Wrappers) are provided any more!
+
+So the resulting command looks like this:
+
+``` shell
+  dnf install \
+    autoconf automake expect gcc glibc-devel gnutls-devel \
+    make pam-devel pkg-config telnet zlib-devel
+```
+
 #### Debian / Ubuntu based distributions
 
 ``` shell
@@ -214,6 +247,27 @@ build the sources including all optional features and to run the test suite:
     make pam pkg-config zlib
 ```
 
+#### macOS with Homebrew
+
+To build ngIRCd on Apple macOS, you need either Xcode or the command line
+development tools. You can install the latter with the `xcode-select --install`
+command.
+
+Additional tools and libraries that are not part of macOS itself are best
+installed with the [Homebrew](https://brew.sh) package manager:
+
+``` shell
+  brew install autoconf automake gnutls libident pkg-config
+```
+
+Note: To actually use the GnuTLS and IDENT libraries installed by Homebrew, you
+need to pass the installation path to the `./configure` command (see below). For
+example like this:
+
+``` shell
+  ./configure --with-gnutls=$(brew --prefix) --with-ident=$(brew --prefix) [...]
+```
+
 ### `./autogen.sh`
 
 The first step, to run `./autogen.sh`, is *only* necessary if the `configure`
@@ -347,73 +401,11 @@ standard locations.
   - `--with-gnutls[=<path>]`
 
   Enable support for SSL/TLS using OpenSSL or GnuTLS libraries.
-  See `doc/SSL.txt` for details.
-
-- IPv6:
-
-  `--enable-ipv6`
-
-  Adds support for version 6 of the Internet Protocol.
-
-## Configuration
-
-Please have a look at the `ngircd(8)` and `ngircd.conf(5)` manual pages for
-details and all possible command line and configuration options -- **and don't
-forget to run `ngircd --configtest` to validate your configuration file!**
-
-After installing ngIRCd, a sample configuration file will be set up (if it
-does not exist already). By default, when installing from sources, the file is
-named `/usr/local/etc/ngircd.conf` (other common names, especially for
-distribution packages, are `/etc/ngircd.conf` or `/etc/ngircd/ngircd.conf`).
-
-You can find the template of the sample configuration file in the `doc/`
-directory as `sample-ngircd.conf` and
-[online](https://ngircd.barton.de/doc/sample-ngircd.conf) on the homepage. It
-contains all available options.
-
-In the sample configuration file, there are comments beginning with `#` *or*
-`;` -- this is only for the better understanding of the file, both comment
-styles are equal.
-
-The file is separated in five blocks: *[Global]*, *[Features]*, *[Operator]*,
-*[Server]*, and *[Channel]*.
-
-In the *[Global]* section, there is the main configuration like the server
-name and the ports, on which the server should be listening. Options in
-the *[Features]* section enable or disable functionality in the daemon.
-IRC operators of this server are defined in *[Operator]* blocks, remote
-servers are configured in *[Server]* sections, and *[Channel]* blocks are
-used to configure pre-defined ("persistent") IRC channels.
-
-### Manual Pages Online
-
-- Daemon: [ngircd.8](https://manpages.debian.org/ngircd.8)
-- Configutation file: [ngircd.conf.5](https://manpages.debian.org/ngircd.conf.5)
-
-## Command line options
-
-ngIRCd supports the following command line options:
-
-- `-f`, `--config <file>`
-
-  The daemon uses the file `<file>` as configuration file rather than
-  the standard configuration `/usr/local/etc/ngircd.conf`.
-
-- `-n`, `--nodaemon`
-
-  ngIRCd should be running as a foreground process.
-
-- `-p`, `--passive`
-
-  Server-links won't be automatically established.
-
-- `-t`, `--configtest`
+  See `doc/SSL.md` for details.
 
-  Reads, validates and dumps the configuration file as interpreted
-  by the server. Then exits.
+- IPv6 (autodetected by default):
 
-Use `--help` to see a short help text describing all available parameters
-the server understands, with `--version` the ngIRCd shows its version
-number. In both cases the server exits after the output.
+  `--enable-ipv6` / `--disable-ipv6`
 
-Please see the `ngircd(8)` manual page for more details!
+  Enable (disable) support for version 6 of the Internet Protocol, which should
+  be available on most modern UNIX-like operating systems by default.

+ 17 - 60
Makefile.am

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -11,9 +11,17 @@
 
 SUBDIRS = doc src man contrib
 
-EXTRA_DIST = README.md INSTALL.md autogen.sh configure.ng .clang_complete .mailmap
-
-clean-local: osxpkg-clean
+EXTRA_DIST = \
+	AUTHORS.md \
+	INSTALL.md \
+	README.md \
+	autogen.sh \
+	configure.ng \
+	.clang_complete \
+	.dockerignore \
+	.mailmap
+
+clean-local:
 	rm -f build-stamp*
 
 maintainer-clean-local:
@@ -23,69 +31,18 @@ maintainer-clean-local:
 	rm -f config.log debian
 
 testsuite:
-	cd src/testsuite && ${MAKE} check
-
-lint:
-	cd src/ngircd && ${MAKE} lint
+	${MAKE} -C src/testsuite check
 
 srcdoc:
-	cd doc && ${MAKE} srcdoc
-
-have-xcodebuild:
-	@xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -list \
-	 >/dev/null 2>&1 \
-	 || ( echo; echo "Error: \"xcodebuild\" not found!"; echo; exit 1 )
-
-have-packagemaker:
-	@packagemaker >/dev/null 2>&1; [ $$? -le 1 ] \
-	 || ( echo; echo "Error: \"packagemaker\" not found!"; echo; exit 2)
-
-xcode: have-xcodebuild
-	rel=`git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'`; \
-	 def="GCC_PREPROCESSOR_DEFINITIONS=\"VERSION=\\\"$$rel\\\"\""; \
-	 xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
-	 -configuration Default $$def build
-
-xcode-clean: have-xcodebuild
-	xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
-	 -configuration Default clean
-	rm -fr contrib/MacOSX/build
+	${MAKE} -C doc/src srcdoc
 
 rpm: distcheck
-	rpm -ta ngircd-*.tar.gz
+	rpmbuild -ta ngircd-$(VERSION).tar.gz
 
 deb:
 	[ -f debian/rules ] || ln -s contrib/Debian debian
-	dpkg-buildpackage -rfakeroot -i
-
-osxpkg: have-packagemaker osxpkg-dest
-	cd contrib/MacOSX && packagemaker --no-recommend \
-	 --doc ngIRCd.pmdoc \
-	 --out ../../$(distdir).mpkg
-	rm -f $(distdir).mpkg.zip
-	zip -ro9 $(distdir).mpkg.zip $(distdir).mpkg
-	${MAKE} osxpkg-clean
-
-osxpkg-clean:
-	[ ! -r ngircd.dest ] || sudo -n rm -rf ngircd.dest
-	rm -rf ngircd.dest $(distdir).mpkg
-
-osxpkg-dest: have-xcodebuild osxpkg-clean clean
-	./configure --prefix=/opt/ngircd
-	${MAKE} xcode
-	${MAKE} -C contrib/MacOSX de.barton.ngircd.plist
-	mkdir -p ngircd.dest/opt/ngircd/sbin
-	DESTDIR="$$PWD/ngircd.dest" ${MAKE} -C doc install
-	DESTDIR="$$PWD/ngircd.dest" ${MAKE} -C contrib install
-	DESTDIR="$$PWD/ngircd.dest" ${MAKE} -C man install
-	cp contrib/MacOSX/build/Default/ngIRCd \
-	 ngircd.dest/opt/ngircd/sbin/ngircd
-	rm ngircd.dest/opt/ngircd/etc/ngircd.conf
-	echo "Have a nice day IRCing!" >ngircd.dest/opt/ngircd/etc/ngircd.motd
-	chmod -R a-s,og-w,a+rX ngircd.dest
-	sudo chown -R root:wheel ngircd.dest
+	dpkg-buildpackage --build=binary
 
-.PHONY: deb have-packagemaker have-xcodebuild lint osxpkg osxpkg-clean \
-	osxpkg-dest rpm srcdoc testsuite xcode xcode-clean
+.PHONY: deb rpm srcdoc testsuite
 
 # -eof-

+ 19 - 61
Makefile.in

@@ -17,7 +17,7 @@
 
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ build_triplet = @build@
 host_triplet = @host@
 subdir = .
 DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
+	$(srcdir)/Makefile.in $(top_srcdir)/configure COPYING \
 	ChangeLog NEWS ar-lib config.guess config.sub depcomp \
 	install-sh missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -251,7 +251,16 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 SUBDIRS = doc src man contrib
-EXTRA_DIST = README.md INSTALL.md autogen.sh configure.ng .clang_complete .mailmap
+EXTRA_DIST = \
+	AUTHORS.md \
+	INSTALL.md \
+	README.md \
+	autogen.sh \
+	configure.ng \
+	.clang_complete \
+	.dockerignore \
+	.mailmap
+
 all: all-recursive
 
 .SUFFIXES:
@@ -737,7 +746,7 @@ uninstall-am:
 	uninstall uninstall-am
 
 
-clean-local: osxpkg-clean
+clean-local:
 	rm -f build-stamp*
 
 maintainer-clean-local:
@@ -747,70 +756,19 @@ maintainer-clean-local:
 	rm -f config.log debian
 
 testsuite:
-	cd src/testsuite && ${MAKE} check
-
-lint:
-	cd src/ngircd && ${MAKE} lint
+	${MAKE} -C src/testsuite check
 
 srcdoc:
-	cd doc && ${MAKE} srcdoc
-
-have-xcodebuild:
-	@xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -list \
-	 >/dev/null 2>&1 \
-	 || ( echo; echo "Error: \"xcodebuild\" not found!"; echo; exit 1 )
-
-have-packagemaker:
-	@packagemaker >/dev/null 2>&1; [ $$? -le 1 ] \
-	 || ( echo; echo "Error: \"packagemaker\" not found!"; echo; exit 2)
-
-xcode: have-xcodebuild
-	rel=`git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'`; \
-	 def="GCC_PREPROCESSOR_DEFINITIONS=\"VERSION=\\\"$$rel\\\"\""; \
-	 xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
-	 -configuration Default $$def build
-
-xcode-clean: have-xcodebuild
-	xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
-	 -configuration Default clean
-	rm -fr contrib/MacOSX/build
+	${MAKE} -C doc/src srcdoc
 
 rpm: distcheck
-	rpm -ta ngircd-*.tar.gz
+	rpmbuild -ta ngircd-$(VERSION).tar.gz
 
 deb:
 	[ -f debian/rules ] || ln -s contrib/Debian debian
-	dpkg-buildpackage -rfakeroot -i
-
-osxpkg: have-packagemaker osxpkg-dest
-	cd contrib/MacOSX && packagemaker --no-recommend \
-	 --doc ngIRCd.pmdoc \
-	 --out ../../$(distdir).mpkg
-	rm -f $(distdir).mpkg.zip
-	zip -ro9 $(distdir).mpkg.zip $(distdir).mpkg
-	${MAKE} osxpkg-clean
-
-osxpkg-clean:
-	[ ! -r ngircd.dest ] || sudo -n rm -rf ngircd.dest
-	rm -rf ngircd.dest $(distdir).mpkg
-
-osxpkg-dest: have-xcodebuild osxpkg-clean clean
-	./configure --prefix=/opt/ngircd
-	${MAKE} xcode
-	${MAKE} -C contrib/MacOSX de.barton.ngircd.plist
-	mkdir -p ngircd.dest/opt/ngircd/sbin
-	DESTDIR="$$PWD/ngircd.dest" ${MAKE} -C doc install
-	DESTDIR="$$PWD/ngircd.dest" ${MAKE} -C contrib install
-	DESTDIR="$$PWD/ngircd.dest" ${MAKE} -C man install
-	cp contrib/MacOSX/build/Default/ngIRCd \
-	 ngircd.dest/opt/ngircd/sbin/ngircd
-	rm ngircd.dest/opt/ngircd/etc/ngircd.conf
-	echo "Have a nice day IRCing!" >ngircd.dest/opt/ngircd/etc/ngircd.motd
-	chmod -R a-s,og-w,a+rX ngircd.dest
-	sudo chown -R root:wheel ngircd.dest
-
-.PHONY: deb have-packagemaker have-xcodebuild lint osxpkg osxpkg-clean \
-	osxpkg-dest rpm srcdoc testsuite xcode xcode-clean
+	dpkg-buildpackage --build=binary
+
+.PHONY: deb rpm srcdoc testsuite
 
 # -eof-
 

+ 104 - 2
NEWS

@@ -2,12 +2,114 @@
                      ngIRCd - Next Generation IRC Server
                            http://ngircd.barton.de/
 
-               (c)2001-2021 Alexander Barton and Contributors.
+               (c)2001-2024 Alexander Barton and Contributors.
                ngIRCd is free software and published under the
                    terms of the GNU General Public License.
 
                                   -- NEWS --
 
+ngIRCd 27
+
+  ngIRCd 27~rc1 (2024-04-13)
+  - Validate certificates on server links. Up to now, ngIRCd optionally used
+    SSL/TLS encrypted server-server links but never checked and validated any
+    certificates. Now ngIRCd validates SSL/TLS certificates on outgoing
+    server-server links by default and drops(!) connections when the remote
+    certificate is invalid (for example self-signed, expired, not matching the
+    host name, ...). Therefore you have to make sure that all relevant
+    *certificates are valid* (or to disable certificate validation on this
+    connection using the new `SSLVerify = false` setting in the affected
+    `[Server]` block, where the remote certificate is not valid and you can not
+    fix this issue).
+    The original patch for OpenSSL dates back to 2009 and was written by Florian
+    Westphal and was extended for GnuTLS in 2014 by Christoph Biedl. But it took
+    us another 10 years to bring it to life ... oh my! Many thanks to both
+    Florian and Christoph!
+    Closes #120.
+  - Add support for the "sd_notify" protocol of systemd(8): Periodically
+    "ping" the service manager (every 3 seconds) and set a status message
+    showing current connection statistics which then is included in "systemctl
+    status ngircd.service" output. In addition, this enables using the
+    systemd(8) watchdog functionality ("WatchdogSec") for the "ngircd.service"
+    unit and allows it to use the "notify" service type, which results in
+    better status tracking by the service manager.
+  - Try to set file descriptor limit to its maximum and show info on startup:
+    The number of possible parallel connections is limited by the file
+    descriptor limit of the process (among other things). Therefore try to
+    upgrade the current "soft" limit to its "hard" maximum (but limited to
+    100000 instead of "infinite"), and show an information or even warning when
+    the limit is still less than the configured "MaxConnections" setting. Please
+    note that ngIRCd and its linked libraries (like PAM) need file descriptors
+    not only for incoming and outgoing IRC connections, but for reading files
+    and inter-process communication, too! Therefore the actual connection limit
+    is less(!) than the file descriptor limit!
+  - Add a "Docker file" (contrib/Dockerfile) and corresponding documentation
+    (doc/Container.md) to the project. The resulting container is based on the
+    latest Debian "stable-slim" container and built using a "build container".
+  - No longer use a default built-in value for the "IncludeDir" directive when
+    a configuration file was explicitly specified on the command line using
+    "--config"/"-f": This way no default include directory is scanned when a
+    possibly non-default configuration file is used which (intentionally) did
+    not specify an "IncludeDir" directive. So now you can use "-f /dev/null"
+    for checking all built-in defaults, regardless of any local configuration
+    files in the default drop-in directory (which would have been read in
+    until this change).
+  - The server "Name" in the "[Global]" section of the configuration file no
+    longer needs to be set: When not set (or empty), ngIRCd now tries to
+    deduce a valid IRC server name from the local host name ("node name"),
+    possibly adding a ".host" extension when the host name does not contain a
+    dot (".") which is required in an IRC server name ("ID").
+    This new behavior, with all configuration parameters now being optional,
+    allows running ngIRCd without any configuration file at all.
+  - Autodetect support for IPv6 by default: Until now, IPv6 support was disabled
+    by default, which seems a bit outdated in 2024. Note: You still can pass
+    "--enable-ipv6"/"--disable-ipv6" to the ./configure script to forcefully
+    activate or deactivate IPv6 support.
+  - Do IDENT requests even when DNS lookups are disabled: Up to now disabling
+    DNS in the configuration disabled IDENT lookups as well (for no good
+    reason). Now you can activate/deactivate DNS lookups and IDENT requests
+    completely separately. Thanks for reporting this, Miniontoby!
+    Closes #291.
+  - Allow SSL client-only configurations without keys/certificates: You don't
+    need to configure certificates/keys as long as you don't configure
+    SSL-enabled listening ports. This can make sense when you want to only link
+    your local daemon to an uplink server using SSL and only have clients on
+    your local host or in your fully trusted network, where SSL is not required.
+  - Respect "SSLConnect" option for incoming connections and do not accept
+    incoming plain-text ("non SSL") server connections for servers configured
+    with "SSLConnect" enabled. This change prevents an authenticated
+    client-server being able to force the server-server to send its password
+    on a plain-text connection when SSL/TLS was intended.
+  - Add a new option "Autojoin" to [Channel] blocks: When it is set, ngIRCd
+    automatically joins all local users to this channel on connect. Note: The
+    users must have permissions to access the channel, otherwise joining them
+    will fail!
+    Thanks Ivan Agarkov <i_agarkov@wargaming.net> for the initial patch!
+  - Hide invisible (+i) users on "WHOIS <pattern>": Let's behave like most(?)
+    other IRC daemons (at least ircd2.11) and hide all +i users when WHOIS is
+    used with a pattern. Otherwise privacy of this users is not guaranteed and
+    the +i mode a bit useless ...
+    Reported by Cahata on #ngircd, thanks!
+  - Make the debug log level ("--debug"/-"d" command line option) always
+    available, not only when ./configure'd with "--enable-debug": the latter
+    now only enables additional checks (like the tests done using assert(2))
+    and is signalled by adding "+DEBUG" to the version "feature string". This
+    change enables everyone to get even more detailed logging when required.
+  - Allow IRC Operators to use the WHO command on any channel.
+  - Send the NAMES list and channel topic to users "forcefully" joined to a
+    channel using NJOIN, like they joined on their own using JOIN, and
+    streamline the order of NAMES list and channel topic messages.
+    Closes #288.
+  - Added a new command line option "-y"/"--syslog", with which logging to
+    syslog can be activated/deactivated separately from running on the console
+    (using "--nodaemon") or in the background.
+    Thanks Katherine Peeters for the patch and pull request!
+    Closes #294.
+  - Update, enhance and extend our documentation in README.md, INSTALL.md,
+    doc/HowToRelease.txt and the manual pages ngircd(8) and ngircd.conf(5), add
+    a new doc/QuickStart.md document, and convert some more documentation files
+    to Markdown (AUTHORS.md, contrib/README.md, doc/FAQ.md, doc/SSL.md).
+
 ngIRCd 26.1 (2021-01-02)
 
   - This release is a bugfix release only, without new features.
@@ -51,7 +153,7 @@ ngIRCd 26 (2020-06-20)
     "error" before). Exit with code 2 ("command line error") for all other
     invalid command line options, and show the error message itself on stderr
     (instead of stdout and exit code 1, "generic error", as before).
-    This new behaviour is more in line with the GNU "coding standards",
+    This new behavior is more in line with the GNU "coding standards",
     see <https://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html>.
   - Add ./contrib/nglog.sh: This script parses the log output of ngircd(8),
     and colorizes the messages according to their log level. Example usage:

+ 46 - 23
README.md

@@ -7,29 +7,31 @@ server for small or private networks, developed under the terms of the GNU
 General Public License ([GPL]); please see the file `COPYING` for licensing
 information.
 
-The server is quite easy to configure, can handle dynamic IP addresses, and
-optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for
-user authentication as well as character set conversion for legacy clients. The
-server has been written from scratch and is not based on the "forefather", the
-daemon of the IRCNet.
-
-The name ngIRCd means *next-generation IRC daemon*, which is a little bit
+The server is quite easy to configure and runs as a single-node server or can
+be part of a network of ngIRCd servers in a LAN or across the internet. It
+optionally supports the IPv6 protocol, SSL/TLS-protected client-server and
+server-server links, the Pluggable Authentication Modules (PAM) system for user
+authentication, IDENT requests, and character set conversion for legacy
+clients.
+
+The name ngIRCd stands for *next-generation IRC daemon*, which is a little bit
 exaggerated: *lightweight Internet Relay Chat server* most probably would have
 been a better name :-)
 
-Please see the `INSTALL.md` document for installation and upgrade information,
-online available here: <https://ngircd.barton.de/doc/INSTALL.md>!
-
 ## Status
 
-ngIRCd should be quite feature-complete and stable to be used as a daemon in
-real-world IRC networks.
+Development of *ngIRCd* started back in 2001: The server has been written from
+scratch in C, tries to follow all relevant standards, and is not based on the
+forefather, the daemon of the IRCNet.
 
 It is not the goal of ngIRCd to implement all the nasty behaviors of the
-original ircd, but to implement most of the useful commands and semantics
-specified by the RFCs that are used by existing clients.
+original `ircd` or corner-cases in the RFCs, but to implement most of the useful
+commands and semantics that are used by existing clients.
 
-## Features (or: why use ngIRCd?)
+*ngIRCd* is used as the daemon in real-world in-house and public IRC networks
+and included in the package repositories of various operating systems.
+
+## Advantages and strengths
 
 - Well arranged (lean) configuration file.
 - Simple to build, install, configure, and maintain.
@@ -40,15 +42,36 @@ specified by the RFCs that are used by existing clients.
 - No problems with servers that have dynamic IP addresses.
 - Freely available, modern, portable and tidy C source.
 - Wide field of supported platforms, including AIX, A/UX, FreeBSD, HP-UX,
-  IRIX, Linux, macOS, NetBSD, OpenBSD, Solaris, and Windows with Cygwin.
-- ngIRCd is being actively developed since 2001.
+  IRIX, Linux, macOS, NetBSD, OpenBSD, Solaris and Windows with WSL or Cygwin.
 
 ## Documentation
 
 The **homepage** of the ngIRCd project is <https://ngircd.barton.de>.
 
-More documentation can be found in the `doc/` directory and
-[online](https://ngircd.barton.de/documentation).
+The `INSTALL.md` document describes how to _install_ and _upgrade_ ngIRCd. It
+is included in all distribution archives and available online on
+[GitHub](https://github.com/ngircd/ngircd/blob/master/INSTALL.md).
+
+Please see the file `doc/QuickStart.md` in the `doc/` directory or on
+[GitHub](https://github.com/ngircd/ngircd/blob/master/doc/QuickStart.md) for
+information about _setting up_ and _running_ ngIRCd, including some real-world
+configuration examples.
+
+More information can be found in a couple of files in the `doc/` directory
+(online on [GitHub](https://github.com/ngircd/ngircd/tree/master/doc)) and in
+the [documentation section](https://ngircd.barton.de/documentation) on the
+[homepage of ngIRCd](https://ngircd.barton.de).
+
+In addition, ngIRCd comes with two _manual pages_: `ngircd(8)` (for the daemon)
+and `ngircd.conf(5)` (for its configuration file). They have even more details
+and list all possible command line parameters and configuration options. You
+can read them with the `man` command (when they are installed locally on your
+system, e.g. `man 8 ngircd` and `man 5 ngircd.conf`) or online here:
+
+- Daemon:
+  [ngircd(8)](https://ngircd.barton.de/man/ngircd.8.html)
+- Configuration file:
+  [ngircd.conf(5)](https://ngircd.barton.de/man/ngircd.conf.5.html)
 
 ## Downloads & Source Code
 
@@ -56,17 +79,17 @@ You can find the latest information about the ngIRCd and the most recent
 stable release on the [news](https://ngircd.barton.de/news) and
 [downloads](https://ngircd.barton.de/download) pages of the homepage.
 
-Visit our source code repository at [GitHub](https://github.com) if you are
-interested in the latest development code: <https://github.com/ngircd/ngircd>.
+Visit our source code repository at [GitHub](https://github.com/ngircd/ngircd)
+if you are interested in the latest development code.
 
 ## Problems, Bugs, Patches
 
 Please don't hesitate to contact us if you encounter problems:
 
 - On IRC: <irc://irc.barton.de/ngircd>
-- Via the mailing list: <ngircd-ml@ngircd.barton.de>
+- Via the mailing list: <ngircd@lists.barton.de>
 
-See <http://ngircd.barton.de/support> for details.
+See <https://ngircd.barton.de/support> for details.
 
 If you find any bugs in ngIRCd (which most probably will be there ...), please
 report them to our issue tracker at GitHub:

+ 88 - 20
aclocal.m4

@@ -14,15 +14,15 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
-[m4_warning([this file was generated for autoconf 2.69.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
+[m4_warning([this file was generated for autoconf 2.71.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
-dnl serial 11 (pkg-config-0.29)
-dnl
+# pkg.m4 - Macros to locate and use pkg-config.   -*- Autoconf -*-
+# serial 12 (pkg-config-0.29.2)
+
 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
 dnl
@@ -63,7 +63,7 @@ dnl
 dnl See the "Since" comment for each macro you use to see what version
 dnl of the macros you require.
 m4_defun([PKG_PREREQ],
-[m4_define([PKG_MACROS_VERSION], [0.29])
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
     [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
 ])dnl PKG_PREREQ
@@ -108,7 +108,7 @@ dnl Check to see whether a particular set of modules exists. Similar to
 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
 dnl
 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-dnl only at the first occurence in configure.ac, so if the first place
+dnl only at the first occurrence in configure.ac, so if the first place
 dnl it's called might be skipped (such as if it is within an "if", you
 dnl have to call PKG_CHECK_EXISTS manually
 AC_DEFUN([PKG_CHECK_EXISTS],
@@ -164,7 +164,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
 pkg_failed=no
-AC_MSG_CHECKING([for $1])
+AC_MSG_CHECKING([for $2])
 
 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
@@ -174,17 +174,17 @@ and $1[]_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.])
 
 if test $pkg_failed = yes; then
-   	AC_MSG_RESULT([no])
+        AC_MSG_RESULT([no])
         _PKG_SHORT_ERRORS_SUPPORTED
         if test $_pkg_short_errors_supported = yes; then
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
-        else 
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+        else
+                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
         fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+        # Put the nasty error message in config.log where it belongs
+        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
-	m4_default([$4], [AC_MSG_ERROR(
+        m4_default([$4], [AC_MSG_ERROR(
 [Package requirements ($2) were not met:
 
 $$1_PKG_ERRORS
@@ -195,8 +195,8 @@ installed software in a non-standard prefix.
 _PKG_TEXT])[]dnl
         ])
 elif test $pkg_failed = untried; then
-     	AC_MSG_RESULT([no])
-	m4_default([$4], [AC_MSG_FAILURE(
+        AC_MSG_RESULT([no])
+        m4_default([$4], [AC_MSG_FAILURE(
 [The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
@@ -206,10 +206,10 @@ _PKG_TEXT
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
         ])
 else
-	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
         AC_MSG_RESULT([yes])
-	$3
+        $3
 fi[]dnl
 ])dnl PKG_CHECK_MODULES
 
@@ -296,6 +296,74 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
 AS_VAR_IF([$1], [""], [$5], [$4])dnl
 ])dnl PKG_CHECK_VAR
 
+dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
+dnl   [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
+dnl   [DESCRIPTION], [DEFAULT])
+dnl ------------------------------------------
+dnl
+dnl Prepare a "--with-" configure option using the lowercase
+dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
+dnl PKG_CHECK_MODULES in a single macro.
+AC_DEFUN([PKG_WITH_MODULES],
+[
+m4_pushdef([with_arg], m4_tolower([$1]))
+
+m4_pushdef([description],
+           [m4_default([$5], [build with ]with_arg[ support])])
+
+m4_pushdef([def_arg], [m4_default([$6], [auto])])
+m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
+m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
+
+m4_case(def_arg,
+            [yes],[m4_pushdef([with_without], [--without-]with_arg)],
+            [m4_pushdef([with_without],[--with-]with_arg)])
+
+AC_ARG_WITH(with_arg,
+     AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
+    [AS_TR_SH([with_]with_arg)=def_arg])
+
+AS_CASE([$AS_TR_SH([with_]with_arg)],
+            [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
+            [auto],[PKG_CHECK_MODULES([$1],[$2],
+                                        [m4_n([def_action_if_found]) $3],
+                                        [m4_n([def_action_if_not_found]) $4])])
+
+m4_popdef([with_arg])
+m4_popdef([description])
+m4_popdef([def_arg])
+
+])dnl PKG_WITH_MODULES
+
+dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
+dnl   [DESCRIPTION], [DEFAULT])
+dnl -----------------------------------------------
+dnl
+dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
+dnl check._[VARIABLE-PREFIX] is exported as make variable.
+AC_DEFUN([PKG_HAVE_WITH_MODULES],
+[
+PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
+
+AM_CONDITIONAL([HAVE_][$1],
+               [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
+])dnl PKG_HAVE_WITH_MODULES
+
+dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
+dnl   [DESCRIPTION], [DEFAULT])
+dnl ------------------------------------------------------
+dnl
+dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
+dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
+dnl and preprocessor variable.
+AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
+[
+PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
+
+AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
+        [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
+])dnl PKG_HAVE_DEFINE_WITH_MODULES
+
 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
 # Foundation, Inc.
 #

+ 32 - 16
autogen.sh

@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -60,16 +60,43 @@
 #   and runs it with these arguments: "./configure --prefix=$HOME".
 #
 
+Check_Tool()
+{
+	searchlist="$1"
+	major="$2"
+	minor="$3"
+
+	for name in $searchlist; do
+		$EXIST "${name}${major}${minor}" >/dev/null 2>&1
+		if [ $? -eq 0 ]; then
+			echo "${name}${major}${minor}"
+			return 0
+		fi
+		$EXIST "${name}-${major}.${minor}" >/dev/null 2>&1
+		if [ $? -eq 0 ]; then
+			echo "${name}-${major}.${minor}"
+			return 0
+		fi
+	done
+	return 1
+}
+
 Search()
 {
-	[ $# -eq 2 ] || exit 1
+	[ $# -lt 2 ] && return 1
+	[ $# -gt 3 ] && return 1
 
 	searchlist="$1"
 	major="$2"
+	minor_pref="$3"
 	minor=99
 
 	[ -n "$PREFIX" ] && searchlist="${PREFIX}/$1 ${PREFIX}/bin/$1 $searchlist"
 
+	if [ -n "$minor_pref" ]; then
+		Check_Tool "$searchlist" "$major" "$minor_pref" && return 0
+	fi
+
 	for name in $searchlist; do
 		$EXIST "${name}" >/dev/null 2>&1
 		if [ $? -eq 0 ]; then
@@ -83,18 +110,7 @@ Search()
 	done
 
 	while [ $minor -ge 0 ]; do
-		for name in $searchlist; do
-			$EXIST "${name}${major}${minor}" >/dev/null 2>&1
-			if [ $? -eq 0 ]; then
-				echo "${name}${major}${minor}"
-				return 0
-			fi
-			$EXIST "${name}-${major}.${minor}" >/dev/null 2>&1
-			if [ $? -eq 0 ]; then
-				echo "${name}-${major}.${minor}"
-				return 0
-			fi
-		done
+		Check_Tool "$searchlist" "$major" "$minor" && return 0
 		minor=$(expr $minor - 1)
 	done
 	return 1
@@ -140,11 +156,11 @@ fi
 # Try to detect the needed tools when no environment variable already
 # specifies one:
 echo "Searching for required tools ..."
-[ -z "$ACLOCAL" ] && ACLOCAL=$(Search aclocal 1)
+[ -z "$ACLOCAL" ] && ACLOCAL=$(Search aclocal 1 11)
 [ "$VERBOSE" = "1" ] && echo " - ACLOCAL=$ACLOCAL"
 [ -z "$AUTOHEADER" ] && AUTOHEADER=$(Search autoheader 2)
 [ "$VERBOSE" = "1" ] && echo " - AUTOHEADER=$AUTOHEADER"
-[ -z "$AUTOMAKE" ] && AUTOMAKE=$(Search automake 1)
+[ -z "$AUTOMAKE" ] && AUTOMAKE=$(Search automake 1 11)
 [ "$VERBOSE" = "1" ] && echo " - AUTOMAKE=$AUTOMAKE"
 [ -z "$AUTOCONF" ] && AUTOCONF=$(Search autoconf 2)
 [ "$VERBOSE" = "1" ] && echo " - AUTOCONF=$AUTOCONF"

ファイルの差分が大きいため隠しています
+ 716 - 610
config.guess


+ 206 - 101
config.sub

@@ -1,12 +1,14 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2020 Free Software Foundation, Inc.
+#   Copyright 1992-2023 Free Software Foundation, Inc.
 
-timestamp='2020-12-22'
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2023-09-19'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -50,7 +52,14 @@ timestamp='2020-12-22'
 #	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
 # It is wrong to echo any other type of specification.
 
-me=$(echo "$0" | sed -e 's,.*/,,')
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
@@ -67,13 +76,13 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2020 Free Software Foundation, Inc.
+Copyright 1992-2023 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
 
 help="
-Try \`$me --help' for more information."
+Try '$me --help' for more information."
 
 # Parse command line
 while test $# -gt 0 ; do
@@ -112,14 +121,16 @@ esac
 
 # Split fields of configuration type
 # shellcheck disable=SC2162
+saved_IFS=$IFS
 IFS="-" read field1 field2 field3 field4 <<EOF
 $1
 EOF
+IFS=$saved_IFS
 
 # Separate into logical components for further validation
 case $1 in
 	*-*-*-*-*)
-		echo Invalid configuration \`"$1"\': more than four components >&2
+		echo "Invalid configuration '$1': more than four components" >&2
 		exit 1
 		;;
 	*-*-*-*)
@@ -134,7 +145,8 @@ case $1 in
 			nto-qnx* | linux-* | uclinux-uclibc* \
 			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
 			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
-			| storm-chaos* | os2-emx* | rtmk-nova*)
+			| storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \
+			| windows-* )
 				basic_machine=$field1
 				basic_os=$maybe_os
 				;;
@@ -163,6 +175,10 @@ case $1 in
 						basic_machine=$field1
 						basic_os=$field2
 						;;
+					zephyr*)
+						basic_machine=$field1-unknown
+						basic_os=$field2
+						;;
 					# Manufacturers
 					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
 					| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
@@ -769,22 +785,22 @@ case $basic_machine in
 		vendor=hp
 		;;
 	i*86v32)
-		cpu=$(echo "$1" | sed -e 's/86.*/86/')
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
 		basic_os=sysv32
 		;;
 	i*86v4*)
-		cpu=$(echo "$1" | sed -e 's/86.*/86/')
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
 		basic_os=sysv4
 		;;
 	i*86v)
-		cpu=$(echo "$1" | sed -e 's/86.*/86/')
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
 		basic_os=sysv
 		;;
 	i*86sol2)
-		cpu=$(echo "$1" | sed -e 's/86.*/86/')
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
 		basic_os=solaris2
 		;;
@@ -917,16 +933,18 @@ case $basic_machine in
 		;;
 	leon-*|leon[3-9]-*)
 		cpu=sparc
-		vendor=$(echo "$basic_machine" | sed 's/-.*//')
+		vendor=`echo "$basic_machine" | sed 's/-.*//'`
 		;;
 
 	*-*)
 		# shellcheck disable=SC2162
+		saved_IFS=$IFS
 		IFS="-" read cpu vendor <<EOF
 $basic_machine
 EOF
+		IFS=$saved_IFS
 		;;
-	# We use `pc' rather than `unknown'
+	# We use 'pc' rather than 'unknown'
 	# because (1) that's what they normally are, and
 	# (2) the word "unknown" tends to confuse beginning users.
 	i*86 | x86_64)
@@ -1003,6 +1021,11 @@ case $cpu-$vendor in
 		;;
 
 	# Here we normalize CPU types with a missing or matching vendor
+	armh-unknown | armh-alt)
+		cpu=armv7l
+		vendor=alt
+		basic_os=${basic_os:-linux-gnueabihf}
+		;;
 	dpx20-unknown | dpx20-bull)
 		cpu=rs6000
 		vendor=bull
@@ -1053,7 +1076,7 @@ case $cpu-$vendor in
 	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 		cpu=i586
 		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+	pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
 		cpu=i686
 		;;
 	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
@@ -1084,7 +1107,7 @@ case $cpu-$vendor in
 		cpu=mipsisa64sb1el
 		;;
 	sh5e[lb]-*)
-		cpu=$(echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/')
+		cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
 		;;
 	spur-*)
 		cpu=spur
@@ -1102,9 +1125,9 @@ case $cpu-$vendor in
 		cpu=x86_64
 		;;
 	xscale-* | xscalee[bl]-*)
-		cpu=$(echo "$cpu" | sed 's/^xscale/arm/')
+		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
 		;;
-	arm64-*)
+	arm64-* | aarch64le-*)
 		cpu=aarch64
 		;;
 
@@ -1158,14 +1181,14 @@ case $cpu-$vendor in
 		case $cpu in
 			1750a | 580 \
 			| a29k \
-			| aarch64 | aarch64_be \
+			| aarch64 | aarch64_be | aarch64c | arm64ec \
 			| abacus \
 			| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
 			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
 			| alphapca5[67] | alpha64pca5[67] \
 			| am33_2.0 \
 			| amdgcn \
-			| arc | arceb \
+			| arc | arceb | arc32 | arc64 \
 			| arm | arm[lb]e | arme[lb] | armv* \
 			| avr | avr32 \
 			| asmjs \
@@ -1177,41 +1200,23 @@ case $cpu-$vendor in
 			| d10v | d30v | dlx | dsp16xx \
 			| e2k | elxsi | epiphany \
 			| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+			| javascript \
 			| h8300 | h8500 \
 			| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 			| hexagon \
 			| i370 | i*86 | i860 | i960 | ia16 | ia64 \
 			| ip2k | iq2000 \
 			| k1om \
+			| kvx \
 			| le32 | le64 \
 			| lm32 \
-			| loongarch32 | loongarch64 | loongarchx32 \
+			| loongarch32 | loongarch64 \
 			| m32c | m32r | m32rle \
 			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
 			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
 			| m88110 | m88k | maxq | mb | mcore | mep | metag \
 			| microblaze | microblazeel \
-			| mips | mipsbe | mipseb | mipsel | mipsle \
-			| mips16 \
-			| mips64 | mips64eb | mips64el \
-			| mips64octeon | mips64octeonel \
-			| mips64orion | mips64orionel \
-			| mips64r5900 | mips64r5900el \
-			| mips64vr | mips64vrel \
-			| mips64vr4100 | mips64vr4100el \
-			| mips64vr4300 | mips64vr4300el \
-			| mips64vr5000 | mips64vr5000el \
-			| mips64vr5900 | mips64vr5900el \
-			| mipsisa32 | mipsisa32el \
-			| mipsisa32r2 | mipsisa32r2el \
-			| mipsisa32r6 | mipsisa32r6el \
-			| mipsisa64 | mipsisa64el \
-			| mipsisa64r2 | mipsisa64r2el \
-			| mipsisa64r6 | mipsisa64r6el \
-			| mipsisa64sb1 | mipsisa64sb1el \
-			| mipsisa64sr71k | mipsisa64sr71kel \
-			| mipsr5900 | mipsr5900el \
-			| mipstx39 | mipstx39el \
+			| mips* \
 			| mmix \
 			| mn10200 | mn10300 \
 			| moxie \
@@ -1230,7 +1235,7 @@ case $cpu-$vendor in
 			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
 			| pru \
 			| pyramid \
-			| riscv | riscv32 | riscv64 \
+			| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
 			| rl78 | romp | rs6000 | rx \
 			| s390 | s390x \
 			| score \
@@ -1259,7 +1264,7 @@ case $cpu-$vendor in
 				;;
 
 			*)
-				echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+				echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
 				exit 1
 				;;
 		esac
@@ -1280,38 +1285,45 @@ esac
 
 # Decode manufacturer-specific aliases for certain operating systems.
 
-if test x$basic_os != x
+if test x"$basic_os" != x
 then
 
-# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
 # set os.
+obj=
 case $basic_os in
 	gnu/linux*)
 		kernel=linux
-		os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|')
+		os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
 		;;
 	os2-emx)
 		kernel=os2
-		os=$(echo $basic_os | sed -e 's|os2-emx|emx|')
+		os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
 		;;
 	nto-qnx*)
 		kernel=nto
-		os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|')
+		os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
 		;;
 	*-*)
 		# shellcheck disable=SC2162
+		saved_IFS=$IFS
 		IFS="-" read kernel os <<EOF
 $basic_os
 EOF
+		IFS=$saved_IFS
 		;;
 	# Default OS when just kernel was specified
 	nto*)
 		kernel=nto
-		os=$(echo $basic_os | sed -e 's|nto|qnx|')
+		os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
 		;;
 	linux*)
 		kernel=linux
-		os=$(echo $basic_os | sed -e 's|linux|gnu|')
+		os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+		;;
+	managarm*)
+		kernel=managarm
+		os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
 		;;
 	*)
 		kernel=
@@ -1332,7 +1344,7 @@ case $os in
 		os=cnk
 		;;
 	solaris1 | solaris1.*)
-		os=$(echo $os | sed -e 's|solaris1|sunos4|')
+		os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
 		;;
 	solaris)
 		os=solaris2
@@ -1361,7 +1373,7 @@ case $os in
 		os=sco3.2v4
 		;;
 	sco3.2.[4-9]*)
-		os=$(echo $os | sed -e 's/sco3.2./sco3.2v/')
+		os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
 		;;
 	sco*v* | scout)
 		# Don't match below
@@ -1391,7 +1403,7 @@ case $os in
 		os=lynxos
 		;;
 	mac[0-9]*)
-		os=$(echo "$os" | sed -e 's|mac|macos|')
+		os=`echo "$os" | sed -e 's|mac|macos|'`
 		;;
 	opened*)
 		os=openedition
@@ -1400,10 +1412,10 @@ case $os in
 		os=os400
 		;;
 	sunos5*)
-		os=$(echo "$os" | sed -e 's|sunos5|solaris2|')
+		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
 		;;
 	sunos6*)
-		os=$(echo "$os" | sed -e 's|sunos6|solaris3|')
+		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
 		;;
 	wince*)
 		os=wince
@@ -1437,7 +1449,7 @@ case $os in
 		;;
 	# Preserve the version number of sinix5.
 	sinix5.*)
-		os=$(echo $os | sed -e 's|sinix|sysv|')
+		os=`echo "$os" | sed -e 's|sinix|sysv|'`
 		;;
 	sinix*)
 		os=sysv4
@@ -1478,10 +1490,16 @@ case $os in
 			os=eabi
 			;;
 		    *)
-			os=elf
+			os=
+			obj=elf
 			;;
 		esac
 		;;
+	aout* | coff* | elf* | pe*)
+		# These are machine code file formats, not OSes
+		obj=$os
+		os=
+		;;
 	*)
 		# No normalization, but not necessarily accepted, that comes below.
 		;;
@@ -1500,12 +1518,15 @@ else
 # system, and we'll never get to this point.
 
 kernel=
+obj=
 case $cpu-$vendor in
 	score-*)
-		os=elf
+		os=
+		obj=elf
 		;;
 	spu-*)
-		os=elf
+		os=
+		obj=elf
 		;;
 	*-acorn)
 		os=riscix1.2
@@ -1515,28 +1536,35 @@ case $cpu-$vendor in
 		os=gnu
 		;;
 	arm*-semi)
-		os=aout
+		os=
+		obj=aout
 		;;
 	c4x-* | tic4x-*)
-		os=coff
+		os=
+		obj=coff
 		;;
 	c8051-*)
-		os=elf
+		os=
+		obj=elf
 		;;
 	clipper-intergraph)
 		os=clix
 		;;
 	hexagon-*)
-		os=elf
+		os=
+		obj=elf
 		;;
 	tic54x-*)
-		os=coff
+		os=
+		obj=coff
 		;;
 	tic55x-*)
-		os=coff
+		os=
+		obj=coff
 		;;
 	tic6x-*)
-		os=coff
+		os=
+		obj=coff
 		;;
 	# This must come before the *-dec entry.
 	pdp10-*)
@@ -1558,19 +1586,24 @@ case $cpu-$vendor in
 		os=sunos3
 		;;
 	m68*-cisco)
-		os=aout
+		os=
+		obj=aout
 		;;
 	mep-*)
-		os=elf
+		os=
+		obj=elf
 		;;
 	mips*-cisco)
-		os=elf
+		os=
+		obj=elf
 		;;
 	mips*-*)
-		os=elf
+		os=
+		obj=elf
 		;;
 	or32-*)
-		os=coff
+		os=
+		obj=coff
 		;;
 	*-tti)	# must be before sparc entry or we get the wrong os.
 		os=sysv3
@@ -1579,7 +1612,8 @@ case $cpu-$vendor in
 		os=sunos4.1.1
 		;;
 	pru-*)
-		os=elf
+		os=
+		obj=elf
 		;;
 	*-be)
 		os=beos
@@ -1660,10 +1694,12 @@ case $cpu-$vendor in
 		os=uxpv
 		;;
 	*-rom68k)
-		os=coff
+		os=
+		obj=coff
 		;;
 	*-*bug)
-		os=coff
+		os=
+		obj=coff
 		;;
 	*-apple)
 		os=macos
@@ -1681,13 +1717,20 @@ esac
 
 fi
 
-# Now, validate our (potentially fixed-up) OS.
+# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
+
 case $os in
-	# Sometimes we do "kernel-abi", so those need to count as OSes.
-	musl* | newlib* | uclibc*)
+	# Sometimes we do "kernel-libc", so those need to count as OSes.
+	musl* | newlib* | relibc* | uclibc*)
+		;;
+	# Likewise for "kernel-abi"
+	eabi* | gnueabi*)
+		;;
+	# VxWorks passes extra cpu info in the 4th filed.
+	simlinux | simwindows | spe)
 		;;
-	# Likewise for "kernel-libc"
-	eabi | eabihf | gnueabi | gnueabihf)
+	# See `case $cpu-$os` validation below
+	ghcjs)
 		;;
 	# Now accept the basic system types.
 	# The portable systems comes first.
@@ -1697,20 +1740,20 @@ case $os in
 	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
 	     | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
 	     | hiux* | abug | nacl* | netware* | windows* \
-	     | os9* | macos* | osx* | ios* \
+	     | os9* | macos* | osx* | ios* | tvos* | watchos* \
 	     | mpw* | magic* | mmixware* | mon960* | lnews* \
 	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
 	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
 	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
 	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
 	     | mirbsd* | netbsd* | dicos* | openedition* | ose* \
-	     | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
+	     | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
 	     | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
-	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
-	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+	     | bosx* | nextstep* | cxux* | oabi* \
+	     | ptx* | ecoff* | winnt* | domain* | vsta* \
 	     | udi* | lites* | ieee* | go32* | aux* | hcos* \
-	     | chorusrdb* | cegcc* | glidix* \
-	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+	     | chorusrdb* | cegcc* | glidix* | serenity* \
+	     | cygwin* | msys* | moss* | proelf* | rtems* \
 	     | midipix* | mingw32* | mingw64* | mint* \
 	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
 	     | interix* | uwin* | mks* | rhapsody* | darwin* \
@@ -1722,7 +1765,8 @@ case $os in
 	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
 	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
 	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
-	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+	     | fiwix* | mlibc* | cos* | mbr* )
 		;;
 	# This one is extra strict with allowed versions
 	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
@@ -1730,38 +1774,99 @@ case $os in
 		;;
 	none)
 		;;
+	kernel* | msvc* )
+		# Restricted further below
+		;;
+	'')
+		if test x"$obj" = x
+		then
+			echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
+		fi
+		;;
+	*)
+		echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
+		exit 1
+		;;
+esac
+
+case $obj in
+	aout* | coff* | elf* | pe*)
+		;;
+	'')
+		# empty is fine
+		;;
 	*)
-		echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+		echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
+		exit 1
+		;;
+esac
+
+# Here we handle the constraint that a (synthetic) cpu and os are
+# valid only in combination with each other and nowhere else.
+case $cpu-$os in
+	# The "javascript-unknown-ghcjs" triple is used by GHC; we
+	# accept it here in order to tolerate that, but reject any
+	# variations.
+	javascript-ghcjs)
+		;;
+	javascript-* | *-ghcjs)
+		echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
 		exit 1
 		;;
 esac
 
 # As a final step for OS-related things, validate the OS-kernel combination
 # (given a valid OS), if there is a kernel.
-case $kernel-$os in
-	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
+case $kernel-$os-$obj in
+	linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \
+		   | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- )
+		;;
+	uclinux-uclibc*- )
 		;;
-	uclinux-uclibc* )
+	managarm-mlibc*- | managarm-kernel*- )
 		;;
-	-dietlibc* | -newlib* | -musl* | -uclibc* )
+	windows*-msvc*-)
+		;;
+	-dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- )
 		# These are just libc implementations, not actual OSes, and thus
 		# require a kernel.
-		echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+		echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
 		exit 1
 		;;
-	kfreebsd*-gnu* | kopensolaris*-gnu*)
+	-kernel*- )
+		echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
+		exit 1
 		;;
-	nto-qnx*)
+	*-kernel*- )
+		echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
+		exit 1
 		;;
-	os2-emx)
+	*-msvc*- )
+		echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
+		exit 1
+		;;
+	kfreebsd*-gnu*- | kopensolaris*-gnu*-)
+		;;
+	vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
+		;;
+	nto-qnx*-)
+		;;
+	os2-emx-)
 		;;
-	*-eabi* | *-gnueabi*)
+	*-eabi*- | *-gnueabi*-)
 		;;
-	-*)
+	none--*)
+		# None (no kernel, i.e. freestanding / bare metal),
+		# can be paired with an machine code file format
+		;;
+	-*-)
 		# Blank kernel with real OS is always fine.
 		;;
-	*-*)
-		echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+	--*)
+		# Blank kernel and OS with real machine code file format is always fine.
+		;;
+	*-*-*)
+		echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
 		exit 1
 		;;
 esac
@@ -1844,7 +1949,7 @@ case $vendor in
 		;;
 esac
 
-echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
 exit
 
 # Local variables:

ファイルの差分が大きいため隠しています
+ 3164 - 2997
configure


+ 36 - 14
configure.ac

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ m4_ifdef([AM_SILENT_RULES],
 # -- Initialisation --
 
 AC_PREREQ([2.61])
-AC_INIT([ngIRCd],[VERSION_ID],[ngircd-ml@ngircd.barton.de],[ngircd],[http://ngircd.barton.de/])
+AC_INIT([ngIRCd],[VERSION_ID],[ngircd@lists.barton.de],[ngircd],[https://ngircd.barton.de/])
 
 AC_CONFIG_SRCDIR([src/ngircd/ngircd.c])
 AC_CONFIG_HEADER([src/config.h])
@@ -101,6 +101,7 @@ AC_DEFUN([WORKING_GETADDRINFO],[
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>
+#include <string.h>
 int
 main(int argc, char **argv)
 {
@@ -124,6 +125,20 @@ main(int argc, char **argv)
 	])
 ])
 
+AC_DEFUN([GCC_W_NO_FORMAT_TRUNC],[
+	result=yes
+	AC_MSG_CHECKING([whether ${CC} accepts -Wno-format-truncation])
+	old_cflags="$CFLAGS"
+	CFLAGS="$CFLAGS -Werror -Wno-format-truncation"
+	AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],[],[result=no])
+	echo $result
+	if test "X$result" = "Xyes"; then
+		CFLAGS="$old_cflags -Wno-format-truncation"
+	else
+		CFLAGS="$old_cflags"
+	fi
+])
+
 # -- Hard coded system and compiler dependencies/features/options ... --
 
 if test "$GCC" = "yes"; then
@@ -131,6 +146,7 @@ if test "$GCC" = "yes"; then
 	CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes"
 
 	GCC_STACK_PROTECT_CC
+	GCC_W_NO_FORMAT_TRUNC
 fi
 
 case "$host_os" in
@@ -176,6 +192,8 @@ AC_CHECK_HEADERS_ONCE([ \
 	stdbool.h \
 	stddef.h \
 	stdint.h \
+	sys/resource.h \
+	sys/un.h \
 	varargs.h \
 ])
 
@@ -258,6 +276,7 @@ AC_CHECK_FUNCS_ONCE([
 	getnameinfo \
 	inet_aton \
 	setgroups \
+	setrlimit \
 	sigaction \
 	sigprocmask \
 	snprintf \
@@ -638,18 +657,24 @@ if test "$x_ircplus_on" = "yes"; then
 fi
 
 # enable support for IPv6?
-x_ipv6_on=no
+
+x_ipv6_on=yes
 AC_ARG_ENABLE(ipv6,
-	AS_HELP_STRING([--enable-ipv6],
-		       [enable IPv6 protocol support]),
-	if test "$enableval" = "yes"; then x_ipv6_on=yes; fi
+	AS_HELP_STRING([--disable-ipv6],
+		       [disable IPv6 protocol support (autodetected by default)]),
+	[	if test "$enableval" = "no"; then
+			x_ipv6_on=no
+		else
+			AC_CHECK_FUNCS(
+				[getaddrinfo getnameinfo],,
+				AC_MSG_ERROR([required function missing for IPv6 support!])
+			)
+		fi
+	],
+	[	AC_CHECK_FUNCS([getaddrinfo getnameinfo],, x_ipv6_on=no)
+	]
 )
 if test "$x_ipv6_on" = "yes"; then
-	# getaddrinfo() and getnameinfo() are optional when not compiling
-	# with IPv6 support, but are required for IPv6 to work!
-	AC_CHECK_FUNCS([ \
-		getaddrinfo getnameinfo \
-		],,AC_MSG_ERROR([required function missing for IPv6 support!]))
 	AC_DEFINE(WANT_IPV6, 1)
 fi
 
@@ -708,9 +733,6 @@ test -n "$LIBS_END" && LIBS="$LIBS $LIBS_END"
 AC_CONFIG_FILES([ \
 	Makefile \
 	contrib/Debian/Makefile \
-	contrib/MacOSX/Makefile \
-	contrib/MacOSX/ngIRCd.pmdoc/Makefile \
-	contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
 	contrib/Makefile \
 	doc/Makefile \
 	doc/src/Makefile \

+ 36 - 14
configure.ng

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ m4_ifdef([AM_SILENT_RULES],
 # -- Initialisation --
 
 AC_PREREQ([2.61])
-AC_INIT([ngIRCd],[VERSION_ID],[ngircd-ml@ngircd.barton.de],[ngircd],[http://ngircd.barton.de/])
+AC_INIT([ngIRCd],[VERSION_ID],[ngircd@lists.barton.de],[ngircd],[https://ngircd.barton.de/])
 
 AC_CONFIG_SRCDIR([src/ngircd/ngircd.c])
 AC_CONFIG_HEADER([src/config.h])
@@ -101,6 +101,7 @@ AC_DEFUN([WORKING_GETADDRINFO],[
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>
+#include <string.h>
 int
 main(int argc, char **argv)
 {
@@ -124,6 +125,20 @@ main(int argc, char **argv)
 	])
 ])
 
+AC_DEFUN([GCC_W_NO_FORMAT_TRUNC],[
+	result=yes
+	AC_MSG_CHECKING([whether ${CC} accepts -Wno-format-truncation])
+	old_cflags="$CFLAGS"
+	CFLAGS="$CFLAGS -Werror -Wno-format-truncation"
+	AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],[],[result=no])
+	echo $result
+	if test "X$result" = "Xyes"; then
+		CFLAGS="$old_cflags -Wno-format-truncation"
+	else
+		CFLAGS="$old_cflags"
+	fi
+])
+
 # -- Hard coded system and compiler dependencies/features/options ... --
 
 if test "$GCC" = "yes"; then
@@ -131,6 +146,7 @@ if test "$GCC" = "yes"; then
 	CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes"
 
 	GCC_STACK_PROTECT_CC
+	GCC_W_NO_FORMAT_TRUNC
 fi
 
 case "$host_os" in
@@ -176,6 +192,8 @@ AC_CHECK_HEADERS_ONCE([ \
 	stdbool.h \
 	stddef.h \
 	stdint.h \
+	sys/resource.h \
+	sys/un.h \
 	varargs.h \
 ])
 
@@ -258,6 +276,7 @@ AC_CHECK_FUNCS_ONCE([
 	getnameinfo \
 	inet_aton \
 	setgroups \
+	setrlimit \
 	sigaction \
 	sigprocmask \
 	snprintf \
@@ -638,18 +657,24 @@ if test "$x_ircplus_on" = "yes"; then
 fi
 
 # enable support for IPv6?
-x_ipv6_on=no
+
+x_ipv6_on=yes
 AC_ARG_ENABLE(ipv6,
-	AS_HELP_STRING([--enable-ipv6],
-		       [enable IPv6 protocol support]),
-	if test "$enableval" = "yes"; then x_ipv6_on=yes; fi
+	AS_HELP_STRING([--disable-ipv6],
+		       [disable IPv6 protocol support (autodetected by default)]),
+	[	if test "$enableval" = "no"; then
+			x_ipv6_on=no
+		else
+			AC_CHECK_FUNCS(
+				[getaddrinfo getnameinfo],,
+				AC_MSG_ERROR([required function missing for IPv6 support!])
+			)
+		fi
+	],
+	[	AC_CHECK_FUNCS([getaddrinfo getnameinfo],, x_ipv6_on=no)
+	]
 )
 if test "$x_ipv6_on" = "yes"; then
-	# getaddrinfo() and getnameinfo() are optional when not compiling
-	# with IPv6 support, but are required for IPv6 to work!
-	AC_CHECK_FUNCS([ \
-		getaddrinfo getnameinfo \
-		],,AC_MSG_ERROR([required function missing for IPv6 support!]))
 	AC_DEFINE(WANT_IPV6, 1)
 fi
 
@@ -708,9 +733,6 @@ test -n "$LIBS_END" && LIBS="$LIBS $LIBS_END"
 AC_CONFIG_FILES([ \
 	Makefile \
 	contrib/Debian/Makefile \
-	contrib/MacOSX/Makefile \
-	contrib/MacOSX/ngIRCd.pmdoc/Makefile \
-	contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
 	contrib/Makefile \
 	doc/Makefile \
 	doc/src/Makefile \

+ 12 - 12
contrib/Debian/Makefile.am

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2017 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -9,22 +9,22 @@
 # Please read the file COPYING, README and AUTHORS for more information.
 #
 
-EXTRA_DIST = rules changelog compat control copyright \
-	ngircd.init ngircd.default ngircd.pam ngircd.postinst \
+EXTRA_DIST = \
+	changelog \
+	control \
+	copyright \
+	ngircd.default \
+	ngircd.pam \
+	rules \
+	watch \
 	source/format
 
 maintainer-clean-local:
 	rm -f Makefile Makefile.in
 
 clean-local:
-	rm -f ngircd.postinst.debhelper ngircd.postrm.debhelper \
-	 ngircd.prerm.debhelper ngircd.substvars
-	rm -f ngircd-full.postinst.debhelper ngircd-full.postrm.debhelper \
-	 ngircd-full.prerm.debhelper ngircd-full.substvars
-	rm -f ngircd-full-dbg.postinst.debhelper \
-	 ngircd-full-dbg.postrm.debhelper ngircd-full-dbg.prerm.debhelper \
-	 ngircd-full-dbg.substvars
-	rm -rf ngircd ngircd-full ngircd-full-dbg
-	rm -f files
+	rm -f *.log *.debhelper *.substvars
+	rm -f debhelper-build-stamp files ngircd.service
+	rm -rf .debhelper/ ngircd/
 
 # -eof-

+ 12 - 12
contrib/Debian/Makefile.in

@@ -17,7 +17,7 @@
 
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2017 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -191,8 +191,14 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-EXTRA_DIST = rules changelog compat control copyright \
-	ngircd.init ngircd.default ngircd.pam ngircd.postinst \
+EXTRA_DIST = \
+	changelog \
+	control \
+	copyright \
+	ngircd.default \
+	ngircd.pam \
+	rules \
+	watch \
 	source/format
 
 all: all-am
@@ -384,15 +390,9 @@ maintainer-clean-local:
 	rm -f Makefile Makefile.in
 
 clean-local:
-	rm -f ngircd.postinst.debhelper ngircd.postrm.debhelper \
-	 ngircd.prerm.debhelper ngircd.substvars
-	rm -f ngircd-full.postinst.debhelper ngircd-full.postrm.debhelper \
-	 ngircd-full.prerm.debhelper ngircd-full.substvars
-	rm -f ngircd-full-dbg.postinst.debhelper \
-	 ngircd-full-dbg.postrm.debhelper ngircd-full-dbg.prerm.debhelper \
-	 ngircd-full-dbg.substvars
-	rm -rf ngircd ngircd-full ngircd-full-dbg
-	rm -f files
+	rm -f *.log *.debhelper *.substvars
+	rm -f debhelper-build-stamp files ngircd.service
+	rm -rf .debhelper/ ngircd/
 
 # -eof-
 

+ 6 - 0
contrib/Debian/changelog

@@ -1,3 +1,9 @@
+ngircd (27~rc1-0ab1) unstable; urgency=medium
+
+  * New "upstream" release candidate 1 for ngIRCd Release 27.
+
+ -- Alexander Barton <alex@barton.de>  Sat, 13 Apr 2024 12:26:35 +0200
+
 ngircd (26.1-0ab1) unstable; urgency=medium
 
   * New "upstream" release: ngIRCd 26.1.

+ 0 - 1
contrib/Debian/compat

@@ -1 +0,0 @@
-9

+ 36 - 69
contrib/Debian/control

@@ -2,78 +2,45 @@ Source: ngircd
 Section: net
 Priority: optional
 Maintainer: Alexander Barton <alex@barton.de>
-Build-Depends: debhelper (>> 9.0.0),
-    autotools-dev,
-    dh-systemd (>= 1.5),
-    expect,
-    libident-dev,
-    libpam0g-dev,
-    libssl-dev,
-    libwrap0-dev,
-    libz-dev,
-    telnet | telnet-ssl,
-Standards-Version: 3.9.1
+Rules-Requires-Root: binary-targets
+Build-Depends: debhelper-compat (= 13),
+ expect,
+ libident-dev,
+ libpam0g-dev,
+ libssl-dev,
+ libz-dev,
+ openssl,
+ procps,
+ telnet | telnet-ssl,
+Standards-Version: 4.6.2
+Homepage: https://ngircd.barton.de
+Vcs-Browser: https://github.com/ngircd/ngircd
+Vcs-Git: https://github.com/ngircd/ngircd.git
 
 Package: ngircd
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Provides: ircd
-Description: lightweight Internet Relay Chat server
- ngIRCd is a free, portable and lightweight Internet Relay Chat server
- for small or private networks, developed under the GNU General Public
- License (GPL).
+Depends:
+ ${shlibs:Depends},
+ ${misc:Depends},
+Conflicts:
+ ircd,
+Provides:
+ ircd,
+Description: lightweight Internet Relay Chat (IRC) server
+ ngIRCd is a free, portable and lightweight Internet Relay Chat (IRC) server
+ for small or private networks, developed under the terms of the GNU General
+ Public License (GPL).
  .
- The server is quite easy to configure, can handle dynamic IP addresses, and
- optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for
- user authentication as well as character set conversion for legacy clients. The
- server has been written from scratch and is not based on the "forefather", the
- daemon of IRCNet.
+ The server is quite easy to configure and runs as a single-node server or can
+ be part of a network of ngIRCd servers in a LAN or across the internet. It
+ optionally supports the IPv6 protocol, SSL/TLS-protected client-server and
+ server-server links, the Pluggable Authentication Modules (PAM) system for
+ user authentication, IDENT requests, and character set conversion for legacy
+ clients.
  .
- This package contains the "standard distribution", including support for
- syslog logging and compressed server-links using zlib. Please have a look
- at the "ngircd-full" package if you need "more advanced" functionality like
- support for TCP wrappers, IDENT requests, the IPv6 protocol, PAM and
- SSL encrypted client and server links.
-
-Package: ngircd-full
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Provides: ircd
-Conflicts: ngircd, ngircd-dbg
-Description: lightweight Internet Relay Chat server
- ngIRCd is a free, portable and lightweight Internet Relay Chat server
- for small or private networks, developed under the GNU General Public
- License (GPL).
- .
- The server is quite easy to configure, can handle dynamic IP addresses, and
- optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for
- user authentication as well as character set conversion for legacy clients. The
- server has been written from scratch and is not based on the "forefather", the
- daemon of IRCNet.
- .
- In addition to the features of the "standard package", this package
- includes support for TCP wrappers, IDENT requests, the IPv6 protocol, PAM and
- SSL encrypted client and server links.
-
-Package: ngircd-full-dbg
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Provides: ircd
-Conflicts: ngircd, ngircd-full
-Description: lightweight Internet Relay Chat server
- ngIRCd is a free, portable and lightweight Internet Relay Chat server
- for small or private networks, developed under the GNU General Public
- License (GPL).
- .
- The server is quite easy to configure, can handle dynamic IP addresses, and
- optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for
- user authentication as well as character set conversion for legacy clients. The
- server has been written from scratch and is not based on the "forefather", the
- daemon of IRCNet.
- .
- In addition to the features of the "standard package", this package
- includes support for TCP wrappers, IDENT requests, the IPv6 protocol, PAM and
- SSL encrypted client and server links.
+ The name ngIRCd stands for next-generation IRC daemon, which is a little bit
+ exaggerated: lightweight Internet Relay Chat server most probably would have
+ been a better name :-)
  .
- And in addition to the "full" variant, the binaries contained in this
- package are build with debug code and contain debug symbols.
+ This package is built with support for all optional features and uses the
+ OpenSSL library for SSL/TLS support.

+ 54 - 9
contrib/Debian/copyright

@@ -1,13 +1,58 @@
-This package was debianized by Alexander Barton <alex@barton.de> on
-Tue, 20 May 2003 15:47:40 +0200.
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: https://ngircd.barton.de
+Upstream-Name: ngircd
+Upstream-Contact: ngIRCd Mailing List <ngircd@lists.barton.de>
 
-It was downloaded from ftp://Arthur.Ath.CX/pub/Users/alex/ngircd/
+Files:
+ *
+Copyright:
+ 2001-2024 Alexander Barton <alex@barton.de> and Contributors.
+License: GPL-2.0+
+Comment:
+ See /usr/share/doc/ngircd/AUTHORS.md for the full list of authors and
+ contributors.
 
-Upstream Author: Alexander Barton <alex@barton.de>
+Files:
+ contrib/de.barton.ngircd.metainfo.xml
+Copyright:
+ 2001-2024 Alexander Barton <alex@barton.de> and Contributors.
+License: MIT
+Comment:
+ See /usr/share/doc/ngircd/AUTHORS.md for the full list of authors and
+ contributors.
 
-This software is copyright (c) 1999-2003 by Alexander Barton.
+License: GPL-2.0+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>
+Comment:
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
 
-You are free to distribute this software under the terms of the
-GNU General Public License.
-On Debian systems, the complete text of the GNU General Public
-License can be found in /usr/share/common-licenses/GPL file.
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to
+ deal in the Software without restriction, including without limitation the
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ IN THE SOFTWARE.

+ 1 - 4
contrib/Debian/ngircd.default

@@ -1,10 +1,7 @@
 #
-# Defaults for ngIRCd start and stop script
+# Defaults for the ngIRCd daemon
 #
 
 # Parameters to pass to the ngircd daemon on startup, see ngircd(8) for
 # possible options (default: empty).
-
 PARAMS=""
-
-# -eof-

+ 0 - 176
contrib/Debian/ngircd.init

@@ -1,176 +0,0 @@
-#!/bin/sh
-#
-# ngIRCd start and stop script for Debian-based systems
-# Copyright 2008-2015 Alexander Barton <alex@barton.de>
-#
-
-### BEGIN INIT INFO
-# Provides:		ngircd
-# Required-Start:	$network $remote_fs
-# Required-Stop:	$network $remote_fs
-# Should-Start:		$syslog $named
-# Should-Stop:		$syslog
-# Default-Start:	2 3 4 5
-# Default-Stop:		0 1 6
-# Short-Description:	Next Generation IRC Server
-# Description:		IRC daemon written from scratch
-### END INIT INFO
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/sbin/ngircd
-NAME=ngIRCd
-DESC="IRC daemon"
-PARAMS=""
-STARTTIME=1
-DIETIME=10
-
-test -h "$0" && me=`readlink $0` || me="$0"
-BASENAME=`basename $me`
-
-test -r /etc/default/$BASENAME && . /etc/default/$BASENAME
-
-test -x $DAEMON || exit 5
-
-# LSB compatibility functions that become used if there is no local
-# include file available.
-log_daemon_msg() {
-	echo -n "$*"
-}
-log_end_msg() {
-	[ "$1" = "0" ] && echo "." || echo " failed!"
-}
-log_failure_msg() {
-	echo "$*"
-}
-log_warning_msg() {
-	log_failure_msg "$*"
-}
-
-# Include LSB functions, if available:
-test -r /lib/lsb/init-functions && . /lib/lsb/init-functions
-
-PIDFILE=`$DAEMON $PARAMS -t | tr -d ' ' | grep "^PidFile=" | cut -d'=' -f2`
-[ -n "$PIDFILE" ] || PIDFILE="/var/run/ircd/ngircd.pid"
-
-r=3
-
-Check_Config()
-{
-	# Make sure that the configuration of ngIRCd is valid:
-	$DAEMON $PARAMS --configtest >/dev/null 2>&1
-	[ $? -eq 0 ] && return 0
-	log_end_msg 1
-	log_failure_msg "Configuration of $NAME is not valid, won't (re)start!"
-	log_failure_msg "Run \"$DAEMON --configtest\" and fix it up ..."
-	exit 6
-}
-
-Prepare() {
-	# Make sure the PID file directory exists and is writable:
-	user=`$DAEMON $PARAMS -t|tr -d ' '|grep "^ServerUID="|cut -d'=' -f2`
-	group=`$DAEMON $PARAMS -t|tr -d ' '|grep "^ServerGID="|cut -d'=' -f2`
-	piddir=`dirname "$PIDFILE"`
-	[ -d "$piddir" ] || mkdir -p "$piddir" 2>/dev/null
-	chown "$user:$group" "$piddir" 2>/dev/null
-	[ $? -eq 0 ] && return 0
-	log_end_msg 1
-	log_failure_msg "Failed to prepare '$piddir' for user '$user'!"
-	exit 1
-}
-
-Do_Start() {
-	if Do_Status; then
-		log_end_msg 0
-		log_warning_msg "$NAME seems to be already running, nothing to do."
-		exit 0
-	fi
-	rm -f "$PIDFILE"
-	start-stop-daemon --start \
-		--quiet --exec $DAEMON -- $PARAMS
-	sleep $STARTTIME
-	Do_Status || return 7
-	return 0
-}
-
-Do_Stop() {
-	if ! Do_Status; then
-		log_end_msg 0
-		log_warning_msg "$NAME seems not to be running, nothing to do."
-		exit 0
-	fi
-	Do_ForceStop
-	return $?
-}
-
-Do_ForceStop() {
-	[ -e $PIDFILE ] \
-		&& pidfile="--pidfile $PIDFILE" \
-		|| pidfile=""
-	start-stop-daemon --stop \
-		--quiet --oknodo --exec $DAEMON $pidfile
-	for i in `seq 1 $DIETIME`; do
-		Do_Status || return 0
-		sleep 1
-	done
-	return 1
-}
-
-Do_Reload() {
-	start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
-	return $?
-}
-
-Do_Status() {
-	[ -e $PIDFILE ] \
-		&& pidfile="--pidfile $PIDFILE" \
-		|| pidfile=""
-	start-stop-daemon --stop \
-		--quiet --signal 0 --exec $DAEMON $pidfile >/dev/null
-	return $?
-}
-
-case "$1" in
-  start)
-	log_daemon_msg "Starting $DESC" "$NAME"
-	Check_Config
-	Prepare
-	Do_Start; r=$?
-	log_end_msg $r
-	;;
-  stop)
-	log_daemon_msg "Stopping $DESC" "$NAME"
-	Do_Stop; r=$?
-	log_end_msg $r
-	;;
-  reload|force-reload)
-	log_daemon_msg "Reloading $DESC" "$NAME"
-	Check_Config
-	Do_Reload; r=$?
-	log_end_msg $r
-	;;
-  restart)
-	log_daemon_msg "Restarting $DESC" "$NAME"
-	Check_Config
-	Prepare
-	Do_ForceStop
-	Do_Start; r=$?
-	log_end_msg $r
-	;;
-  status)
-	log_daemon_msg "Checking for $DESC" "$NAME"
-	Do_Status; r=$?
-	log_end_msg $r
-	;;
-  test)
-	Check_Config
-	echo "Configuration of $DAEMON seems to be ok."; r=0
-	;;
-  *)
-	N=/etc/init.d/$NAME; r=2
-	echo "Usage: $N {start|stop|restart|reload|force-reload|status|test}" >&2
-	;;
-esac
-
-exit $r
-
-# -eof-

+ 8 - 2
contrib/Debian/ngircd.pam

@@ -1,4 +1,10 @@
 # /etc/pam.d/ngircd
 
-# allow all connections to ngIRCd
-auth required pam_permit.so
+# You have to adjust this configuration to your local setup and needs. Keep in
+# mind that all PAM modules are run with the privileges of the user account the
+# ngIRCd daemon runs as ("irc" by default, not root!), so you can't use PAM
+# modules requiring root privileges (like pam_unix, for example)!
+
+# Log and deny all connections to ngIRCd:
+auth required pam_warn.so
+auth required pam_deny.so

+ 0 - 21
contrib/Debian/ngircd.postinst

@@ -1,21 +0,0 @@
-#!/bin/sh
-#
-# Debian post-installation script
-#
-
-set -e
-
-case "$1" in
-	configure)
-		if [ -f /etc/ngircd/ngircd.conf ]; then
-			# make sure that the configuration file is not
-			# world-readable, it contains passwords!
-			chmod o= /etc/ngircd/ngircd.conf
-			chgrp irc /etc/ngircd/ngircd.conf
-		fi
-		;;
-esac
-
-#DEBHELPER#
-
-# -eof-

+ 65 - 236
contrib/Debian/rules

@@ -1,238 +1,67 @@
 #!/usr/bin/make -f
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2016 Alexander Barton (alex@barton.de) and Contributors
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-# debian/rules for ngIRCd
-#
-# Based on the sample debian/rules that uses debhelper,
-# GNU copyright 1997 to 1999 by Joey Hess.
-#
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
-endif
-
-configure-ngircd: configure
-	dh_testdir
-
-	# configure "standard" variant:
-	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
-	  --prefix=/usr \
-	  --sysconfdir=/etc/ngircd \
-	  --mandir=\$${prefix}/share/man \
-	  --docdir=\$${prefix}/share/doc/ngircd \
-	  --with-syslog --with-zlib
-
-configure-ngircd-full: configure
-	dh_testdir
-
-	# configure "full" variant:
-	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
-	  --prefix=/usr \
-	  --sysconfdir=/etc/ngircd \
-	  --mandir=\$${prefix}/share/man \
-	  --docdir=\$${prefix}/share/doc/ngircd-full \
-	  --with-syslog --with-zlib \
-	  --with-openssl --with-iconv --with-ident --with-tcp-wrappers \
-	  --with-pam \
-	  --enable-ipv6
-
-configure-ngircd-full-dbg: configure
-	dh_testdir
-
-	# configure "full debug" variant:
-	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
-	  --prefix=/usr \
-	  --sysconfdir=/etc/ngircd \
-	  --mandir=\$${prefix}/share/man \
-	  --docdir=\$${prefix}/share/doc/ngircd-full-dbg \
-	  --enable-debug --enable-sniffer \
-	  --with-syslog --with-zlib \
-	  --with-openssl --with-iconv --with-ident --with-tcp-wrappers \
-	  --with-pam \
-	  --enable-ipv6
-
-build:
-	dh_prep
-
-build-ngircd: build-stamp-ngircd
-build-stamp-ngircd: configure-ngircd
-	dh_testdir
-	rm -f build-stamp-*
-
-	# Add here commands to compile the "standard" package:
-	$(MAKE)
-
-	touch build-stamp-ngircd
-
-build-ngircd-full: build-stamp-ngircd-full
-build-stamp-ngircd-full: configure-ngircd-full
-	dh_testdir
-	rm -f build-stamp-*
-
-	# Add here commands to compile the "full" package:
-	$(MAKE)
-
-	touch build-stamp-ngircd-full
-
-build-ngircd-full-dbg: build-stamp-ngircd-full-dbg
-build-stamp-ngircd-full-dbg: configure-ngircd-full-dbg
-	dh_testdir
-	rm -f build-stamp-*
-
-	# Add here commands to compile the "full debug" package:
-	$(MAKE)
-
-	touch build-stamp-ngircd-full
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp*
-	rm -f $(CURDIR)/debian/ngircd.service
-	rm -f $(CURDIR)/debian/ngircd-full.default
-	rm -f $(CURDIR)/debian/ngircd-full.init
-	rm -f $(CURDIR)/debian/ngircd-full.postinst
-	rm -f $(CURDIR)/debian/ngircd-full.service
-	rm -f $(CURDIR)/debian/ngircd-full-dbg.default
-	rm -f $(CURDIR)/debian/ngircd-full-dbg.postinst
-	rm -f $(CURDIR)/debian/ngircd-full-dbg.init
-	rm -f $(CURDIR)/debian/ngircd-full-dbg.service
-
-	# Add here commands to clean up after the build process:
-	[ ! -f Makefile ] || $(MAKE) distclean
-
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
-	cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
-	cp -f /usr/share/misc/config.guess config.guess
-endif
-	dh_clean
-
-install: install-ngircd install-ngircd-full install-ngircd-full-dbg
-
-install-ngircd: build-ngircd
-	dh_testdir
-	dh_testroot
-	dh_installdirs
-
-	# Add here commands to install the "standard" package into debian/ngircd:
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
-	rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/INSTALL*
-	rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING*
-	cat $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/sample-ngircd.conf | \
-	 sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
-	 sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
-	 sed -e "s|;PidFile = /var/run/ngircd/ngircd.pid|PidFile = /var/run/ircd/ngircd.pid|g" \
-	 >$(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf
-	touch $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.motd
-
-install-ngircd-full: build-ngircd-full
-	dh_testdir
-	dh_testroot
-	dh_installdirs
-
-	# Add here commands to install the "full" package into debian/ngircd-full:
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full
-	rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/INSTALL*
-	rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/COPYING*
-	cat $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/sample-ngircd.conf | \
-	 sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
-	 sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
-	 sed -e "s|;PidFile = /var/run/ngircd/ngircd.pid|PidFile = /var/run/ircd/ngircd.pid|g" \
-	 >$(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.conf
-	touch $(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.motd
-	mkdir -p $(CURDIR)/debian/ngircd-full/etc/pam.d
-	cp $(CURDIR)/debian/ngircd.pam $(CURDIR)/debian/ngircd-full/etc/pam.d/ngircd
-
-install-ngircd-full-dbg: build-ngircd-full-dbg
-	dh_testdir
-	dh_testroot
-	dh_installdirs
-
-	# Add here commands to install the "full" package into debian/ngircd-full:
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full-dbg
-	rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/INSTALL*
-	rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/COPYING*
-	cat $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/sample-ngircd.conf | \
-	 sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
-	 sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
-	 sed -e "s|;PidFile = /var/run/ngircd/ngircd.pid|PidFile = /var/run/ircd/ngircd.pid|g" \
-	 >$(CURDIR)/debian/ngircd-full-dbg/etc/ngircd/ngircd.conf
-	touch $(CURDIR)/debian/ngircd-full-dbg/etc/ngircd/ngircd.motd
-	mkdir -p $(CURDIR)/debian/ngircd-full-dbg/etc/pam.d
-	cp $(CURDIR)/debian/ngircd.pam $(CURDIR)/debian/ngircd-full-dbg/etc/pam.d/ngircd
-
-# Build architecture-independent files here.
-binary-indep:
-	# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	ln -s $(CURDIR)/contrib/ngircd.service \
-	 $(CURDIR)/debian/ngircd.service
-
-	ln -s $(CURDIR)/debian/ngircd.default \
-	 $(CURDIR)/debian/ngircd-full.default
-	ln -s $(CURDIR)/debian/ngircd.init \
-	 $(CURDIR)/debian/ngircd-full.init
-	ln -s $(CURDIR)/debian/ngircd.postinst \
-	 $(CURDIR)/debian/ngircd-full.postinst
-	cp $(CURDIR)/contrib/ngircd.service \
-	 $(CURDIR)/debian/ngircd-full.service
-	echo "Alias=ngircd.service" >>$(CURDIR)/debian/ngircd-full.service
-
-	ln -s $(CURDIR)/debian/ngircd.default \
-	 $(CURDIR)/debian/ngircd-full-dbg.default
-	ln -s $(CURDIR)/debian/ngircd.init \
-	 $(CURDIR)/debian/ngircd-full-dbg.init
-	ln -s $(CURDIR)/debian/ngircd.postinst \
-	 $(CURDIR)/debian/ngircd-full-dbg.postinst
-	cp $(CURDIR)/contrib/ngircd.service \
-	 $(CURDIR)/debian/ngircd-full-dbg.service
-	echo "Alias=ngircd.service" >>$(CURDIR)/debian/ngircd-full-dbg.service
-
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs -a -A ChangeLog
-	dh_installdocs -a
-	dh_systemd_enable -a
-	dh_installinit -a
-	dh_systemd_start -a
-	dh_strip -a --no-package=ngircd-full-dbg
-	dh_compress -a -XCommands.txt
-	dh_fixperms -a
-	dh_installdeb -a
-	dh_shlibdeps -a
-	dh_gencontrol -a
-	dh_md5sums -a
-	dh_builddeb -a
-
-binary: binary-indep binary-arch
-
-.PHONY: build clean binary-indep binary-arch binary install
-
-# -eof-
+# See FEATURE AREAS in dpkg-buildflags(1).
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+%:
+	dh $@
+
+# Disable dh_autoreconf since we are using de-ANSI-fication which was removed
+# from automake a while ago. See <https://github.com/ngircd/ngircd/issues/261>.
+override_dh_autoreconf:
+
+override_dh_auto_configure:
+	dh_auto_configure -- \
+	    --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
+	    --prefix=/usr \
+	    --mandir=\$${prefix}/share/man \
+	    --sysconfdir=/etc/ngircd \
+	    --with-iconv \
+	    --with-ident \
+	    --with-openssl \
+	    --with-pam \
+	    --with-syslog \
+	    --with-zlib
+
+execute_before_dh_auto_install:
+	ln -fs $(CURDIR)/contrib/ngircd.service $(CURDIR)/debian/ngircd.service
+
+execute_after_dh_auto_install:
+#	Generate the default ngircd.conf:
+	install -o root -g irc -m 0640 -D /dev/null \
+	 $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf
+	sed \
+	 -e "s|;ServerUID = 65534|ServerUID = irc|g" \
+	 -e "s|;ServerGID = 65534|ServerGID = irc|g" \
+	 -e "s|;PidFile = /var/run/ngircd/ngircd.pid|PidFile = /run/ircd/ngircd.pid|g" \
+	 -e "s|;PAM = yes|PAM = no|g" \
+	 -e "s|;\[SSL\]|[SSL]|g" \
+	 -e "s|;CAFile = /etc/ssl/CA/cacert.pem|CAFile = /etc/ssl/certs/ca-certificates.crt|g" \
+	 $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/sample-ngircd.conf \
+	 >>$(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf
+
+#	Create drop-in configuration directory:
+	install -o root -g irc -m 0750 -d \
+	 $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf.d
+
+#	Install an empty MOTD file.
+	install -o root -g irc -m 0640 -D /dev/null \
+	 $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.motd
+
+#	Install the logcheck(8) configuration.
+	install -o root -g root -m 0644 -D \
+	 $(CURDIR)/contrib/ngircd.logcheck \
+	 $(CURDIR)/debian/ngircd/etc/logcheck/ignore.d.paranoid/ngircd
+
+#	Make lintian happy :-)
+	rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING
+	mv $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/ChangeLog \
+	    $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/changelog
+
+override_dh_fixperms:
+#	Preserve the permissions of files installed in /etc/ngircd!
+	dh_fixperms -X/etc/ngircd
+
+override_dh_compress:
+#	The Commands.txt file is read by the daemon, don't compress it!
+	dh_compress -XCommands.txt

+ 1 - 1
contrib/Debian/source/format

@@ -1 +1 @@
-1.0
+3.0 (quilt)

+ 10 - 0
contrib/Debian/watch

@@ -0,0 +1,10 @@
+# Watch control file for uscan.
+# See uscan(1) for format.
+
+# Compulsory line, this is a version 4 file.
+version=4
+
+# PGP signature mangle, so foo.tar.gz has foo.tar.gz.sig.
+opts="pgpsigurlmangle=s%$%.sig%"
+
+https://arthur.barton.de/pub/@PACKAGE@/@PACKAGE@-([0-9\.]+)@ARCHIVE_EXT@

+ 62 - 0
contrib/Dockerfile

@@ -0,0 +1,62 @@
+# ngIRCd -- The Next Generation IRC Daemon
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
+
+# Build Container
+
+FROM docker.io/library/debian:stable-slim AS build
+USER root
+RUN apt-get -y update \
+	&& apt-get -y install --no-install-recommends \
+		autoconf \
+		automake \
+		build-essential \
+		expect \
+		gawk \
+		git \
+		libgnutls28-dev \
+		libident-dev \
+		libpam0g-dev \
+		openssl \
+		pkg-config \
+		telnet \
+		zlib1g-dev \
+	&& mkdir -p /usr/local/src/ngircd /opt/ngircd \
+	&& chown bin:bin /usr/local/src/ngircd /opt/ngircd
+WORKDIR /usr/local/src/ngircd
+COPY . /usr/local/src/ngircd
+RUN chown -R bin /usr/local/src/ngircd
+USER bin
+RUN ./autogen.sh --prefix=/opt/ngircd \
+		--with-gnutls \
+		--with-iconv \
+		--with-ident \
+		--with-pam \
+	&& make all \
+	&& make -C src/ngircd check \
+	&& make install \
+	&& printf \
+		"# ngircd.conf\n\n[Global]\nServerGID=irc\nServerUID=irc\n\n[Options]\nIdent=no\nPAM=no\n\n[SSL]\nCAFile=/etc/ssl/certs/ca-certificates.crt\n" \
+		>/opt/ngircd/etc/ngircd.conf \
+	&& chmod -R a+rX /opt/ngircd
+
+# Run container
+
+FROM docker.io/library/debian:stable-slim
+USER root
+RUN apt-get -y update \
+	&& apt-get -y install --no-install-recommends --no-install-suggests \
+		ca-certificates \
+		catatonit \
+		libgnutls30 \
+		libident \
+		libpam0g \
+		libwrap0 \
+		zlib1g \
+	&& apt-get -y clean \
+	&& rm -rf /var/cache/debconf/*-old /var/lib/apt/lists/*
+COPY --from=build /opt/ngircd /opt/ngircd
+USER irc
+ENTRYPOINT [ "/usr/bin/catatonit", "--", "/opt/ngircd/sbin/ngircd", "--nodaemon" ]
+EXPOSE 6667 6697
+HEALTHCHECK --interval=30s --timeout=5s --retries=1 --start-period=5s \
+	CMD [ "/usr/bin/grep", "-F", ":1A0B ", "/proc/net/tcp" ]

+ 0 - 52
contrib/MacOSX/Makefile.am

@@ -1,52 +0,0 @@
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2008 Alexander Barton <alex@barton.de>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-
-SUBDIRS = ngIRCd.xcodeproj ngIRCd.pmdoc
-
-EXTRA_DIST = de.barton.ngircd.plist.tmpl config.h preinstall.sh postinstall.sh
-
-SUFFIXES = .tmpl .
-
-.tmpl:
-	sed \
-	    -e s@:SBINDIR:@${sbindir}@ \
-	    <$< >$@
-
-install-data-local:
-	[ `uname -s` != "Darwin" ] || make install-sys-darwin
-
-install-sys-darwin:
-	@if [ `id -u` -eq 0 ]; then \
-	  make install-sys-darwin-root; \
-	else \
-	  echo; \
-	  echo " ** NOTE: Not installing with root privileges, so the LaunchDaemon script"; \
-	  echo " ** \"/Library/LaunchDaemons/de.barton.ngircd.plist\" can't be installed/updated!"; \
-	  echo; \
-	fi
-
-install-sys-darwin-root: de.barton.ngircd.plist
-	install -d -m 755 -o root -g wheel $(DESTDIR)/Library/LaunchDaemons
-	install -c -m 644 -b -o root -g wheel de.barton.ngircd.plist \
-	 $(DESTDIR)/Library/LaunchDaemons/de.barton.ngircd.plist
-	@echo
-	@echo " ** \"/Library/LaunchDaemons/de.barton.ngircd.plist\" has been installed,"
-	@echo " ** but is disabled. Use launchctl(8) to enable/run ngIRCd on Darwin/Mac OS X."
-	@echo
-
-clean-local:
-	rm -rf build
-	rm -f de.barton.ngircd.plist
-
-maintainer-clean-local:
-	rm -f Makefile Makefile.in
-
-# -eof-

+ 0 - 620
contrib/MacOSX/Makefile.in

@@ -1,620 +0,0 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2008 Alexander Barton <alex@barton.de>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
-    esac; \
-    test $$am__dry = yes; \
-  }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = contrib/MacOSX
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN   " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-	distdir
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-    if test "$$first" != "."; then \
-      if test "$$first" = ".."; then \
-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-      else \
-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-        if test "$$first2" = "$$first"; then \
-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-        else \
-          dir2="../$$dir2"; \
-        fi; \
-        dir0="$$dir0"/"$$first"; \
-      fi; \
-    fi; \
-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
-  done; \
-  reldir="$$dir2"
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-U = @U@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-SUBDIRS = ngIRCd.xcodeproj ngIRCd.pmdoc
-EXTRA_DIST = de.barton.ngircd.plist.tmpl config.h preinstall.sh postinstall.sh
-SUFFIXES = .tmpl .
-all: all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .tmpl .
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/MacOSX/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign contrib/MacOSX/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    $(am__make_dryrun) \
-	      || test -d "$(distdir)/$$subdir" \
-	      || $(MKDIR_P) "$(distdir)/$$subdir" \
-	      || exit 1; \
-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
-	    $(am__relativize); \
-	    new_distdir=$$reldir; \
-	    dir1=$$subdir; dir2="$(top_distdir)"; \
-	    $(am__relativize); \
-	    new_top_distdir=$$reldir; \
-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
-	    ($(am__cd) $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$new_top_distdir" \
-	        distdir="$$new_distdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-		am__skip_mode_fix=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-local mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-data-local
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic \
-	maintainer-clean-local
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am check check-am clean clean-generic clean-local \
-	ctags ctags-recursive distclean distclean-generic \
-	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am \
-	install-data-local install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-local mostlyclean \
-	mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am
-
-
-.tmpl:
-	sed \
-	    -e s@:SBINDIR:@${sbindir}@ \
-	    <$< >$@
-
-install-data-local:
-	[ `uname -s` != "Darwin" ] || make install-sys-darwin
-
-install-sys-darwin:
-	@if [ `id -u` -eq 0 ]; then \
-	  make install-sys-darwin-root; \
-	else \
-	  echo; \
-	  echo " ** NOTE: Not installing with root privileges, so the LaunchDaemon script"; \
-	  echo " ** \"/Library/LaunchDaemons/de.barton.ngircd.plist\" can't be installed/updated!"; \
-	  echo; \
-	fi
-
-install-sys-darwin-root: de.barton.ngircd.plist
-	install -d -m 755 -o root -g wheel $(DESTDIR)/Library/LaunchDaemons
-	install -c -m 644 -b -o root -g wheel de.barton.ngircd.plist \
-	 $(DESTDIR)/Library/LaunchDaemons/de.barton.ngircd.plist
-	@echo
-	@echo " ** \"/Library/LaunchDaemons/de.barton.ngircd.plist\" has been installed,"
-	@echo " ** but is disabled. Use launchctl(8) to enable/run ngIRCd on Darwin/Mac OS X."
-	@echo
-
-clean-local:
-	rm -rf build
-	rm -f de.barton.ngircd.plist
-
-maintainer-clean-local:
-	rm -f Makefile Makefile.in
-
-# -eof-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:

+ 0 - 136
contrib/MacOSX/config.h

@@ -1,136 +0,0 @@
-/*
- * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * Please read the file COPYING, README and AUTHORS for more information.
- *
- * Static configuration file for Mac OS X Xcode project
- */
-
-#define PACKAGE_NAME "ngIRCd"
-# define PACKAGE "ngircd"
-#ifndef VERSION
-# define VERSION "??("__DATE__")"
-#endif
-
-#ifndef HOST_VENDOR
-# define HOST_VENDOR "apple"
-# define HOST_OS "darwin"
-# ifdef __x86_64
-#  define HOST_CPU "x86_64"
-# endif
-#endif
-
-#define SYSCONFDIR "/etc/ngircd"
-#define DOCDIR "/usr/share/doc/ngircd"
-
-/* -- Build options -- */
-
-/* Define if debug-mode should be enabled */
-#define DEBUG 1
-
-/* Define if the server should do IDENT requests */
-/*#define IDENTAUTH 1*/
-
-/* Define if IRC+ protocol should be used */
-#define IRCPLUS 1
-
-/* Define if IRC sniffer should be enabled */
-/*#define SNIFFER 1*/
-
-/* Define if syslog should be used for logging */
-#define SYSLOG 1
-
-/* Define if TCP wrappers should be used */
-/*#define TCPWRAP 1*/
-
-/* Define if zlib compression should be enabled */
-#define ZLIB 1
-
-/* Define if IPV6 protocol should be enabled */
-#define WANT_IPV6 1
-
-/* Define if PAM should be used */
-#define PAM 1
-
-/* Define if libiconv can be used, e.g. for CHARCONV */
-#define ICONV 1
-
-/* -- Supported features -- */
-
-/* Define if SSP C support is enabled. */
-#define ENABLE_SSP_CC 1
-
-/* Define to 1 if the C compiler supports function prototypes. */
-#define PROTOTYPES 1
-/* Define like PROTOTYPES; this can be used by system headers. */
-#define __PROTOTYPES 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-/* Define to 1 if you have the <stddef.h> header file. */
-#define HAVE_STDDEF_H 1
-/* Define to 1 if you have the <stdbool.h> header file. */
-#define HAVE_STDBOOL_H 1
-/* Define to 1 if you have the <arpa/inet.h> header file. */
-#define HAVE_ARPA_INET_H 1
-/* Define to 1 if you have the <netinet/ip.h> header file. */
-#define HAVE_NETINET_IP_H 1
-
-/* Define to 1 if you have the `gai_strerror' function. */
-#define HAVE_GAI_STRERROR 1
-/* Define to 1 if you have the `iconv_open' function. */
-#define HAVE_ICONV_OPEN 1
-/* Define to 1 if you have the `kqueue' function. */
-#define HAVE_KQUEUE 1
-/* Define to 1 if you have the `inet_ntoa' function. */
-#define HAVE_INET_NTOA 1
-/* Define to 1 if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-/* Define to 1 if you have the `strlcat' function. */
-#define HAVE_STRLCAT 1
-/* Define to 1 if you have the `strlcpy' function. */
-#define HAVE_STRLCPY 1
-/* Define to 1 if you have the `strdup' function. */
-#define HAVE_STRDUP 1
-/* Define to 1 if you have the `vsnprintf' function. */
-#define HAVE_VSNPRINTF 1
-/* Define to 1 if you have the `inet_aton' function. */
-#define HAVE_INET_ATON 1
-/* Define to 1 if you have the `getaddrinfo' function. */
-#define HAVE_GETADDRINFO 1
-/* getaddrinfo(0) */
-#define HAVE_WORKING_GETADDRINFO 1
-/* Define to 1 if you have the `getnameinfo' function. */
-#define HAVE_GETNAMEINFO 1
-/* Define to 1 if you have the `sigaction' function. */
-#define HAVE_SIGACTION 1
-/* Define to 1 if you have the `setsid' function. */
-#define HAVE_SETSID 1
-/* Define to 1 if you have the `strsignal' function. */
-#define HAVE_STRSIGNAL 1
-
-/* Define if socklen_t exists */
-#define HAVE_socklen_t 1
-
-#ifdef PAM
-/* Define to 1 if you have the `pam_authenticate' function. */
-#define HAVE_PAM_AUTHENTICATE 1
-#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060)
-/* Define to 1 if you have the <pam/pam_appl.h> header file. */
-#define HAVE_PAM_PAM_APPL_H 1
-/* Mac OS X <10.6 doesn't have pam_fail_delay() */
-#define NO_PAM_FAIL_DELAY 1
-#else
-/* Define to 1 if you have the <security/pam_appl.h> header file. */
-#define HAVE_SECURITY_PAM_APPL_H 1
-#endif
-#endif
-
-/* -eof- */

ファイルの差分が大きいため隠しています
+ 0 - 1
contrib/MacOSX/ngIRCd.pmdoc/01ngircd-contents.xml


ファイルの差分が大きいため隠しています
+ 0 - 1
contrib/MacOSX/ngIRCd.pmdoc/01ngircd.xml


+ 0 - 1
contrib/MacOSX/ngIRCd.pmdoc/02de-contents.xml

@@ -1 +0,0 @@
-<pkg-contents spec="1.12"><f n="de.barton.ngircd.plist" o="root" g="wheel" p="33188" pt="/Users/alex/Develop/ngircd/alex.git/contrib/MacOSX/de.barton.ngircd.plist" m="false" t="file"><mod>group</mod><mod>owner</mod></f></pkg-contents>

ファイルの差分が大きいため隠しています
+ 0 - 1
contrib/MacOSX/ngIRCd.pmdoc/02de.xml


+ 0 - 18
contrib/MacOSX/ngIRCd.pmdoc/Makefile.am

@@ -1,18 +0,0 @@
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2008 Alexander Barton <alex@barton.de>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-
-EXTRA_DIST = index.xml \
- 01ngircd-contents.xml 01ngircd.xml 02de-contents.xml 02de.xml
-
-maintainer-clean-local:
-	rm -f Makefile Makefile.in
-
-# -eof-

+ 0 - 389
contrib/MacOSX/ngIRCd.pmdoc/Makefile.in

@@ -1,389 +0,0 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2008 Alexander Barton <alex@barton.de>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
-    esac; \
-    test $$am__dry = yes; \
-  }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = contrib/MacOSX/ngIRCd.pmdoc
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN   " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-U = @U@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-EXTRA_DIST = index.xml \
- 01ngircd-contents.xml 01ngircd.xml 02de-contents.xml 02de.xml
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/MacOSX/ngIRCd.pmdoc/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign contrib/MacOSX/ngIRCd.pmdoc/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic \
-	maintainer-clean-local
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic distclean \
-	distclean-generic distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic \
-	maintainer-clean-local mostlyclean mostlyclean-generic pdf \
-	pdf-am ps ps-am uninstall uninstall-am
-
-
-maintainer-clean-local:
-	rm -f Makefile Makefile.in
-
-# -eof-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:

ファイルの差分が大きいため隠しています
+ 0 - 238
contrib/MacOSX/ngIRCd.pmdoc/index.xml


+ 0 - 17
contrib/MacOSX/ngIRCd.xcodeproj/Makefile.am

@@ -1,17 +0,0 @@
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2008 Alexander Barton <alex@barton.de>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-
-EXTRA_DIST = project.pbxproj
-
-maintainer-clean-local:
-	rm -f Makefile Makefile.in
-
-# -eof-

+ 0 - 387
contrib/MacOSX/ngIRCd.xcodeproj/Makefile.in

@@ -1,387 +0,0 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2008 Alexander Barton <alex@barton.de>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
-    esac; \
-    test $$am__dry = yes; \
-  }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = contrib/MacOSX/ngIRCd.xcodeproj
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN   " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-U = @U@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-EXTRA_DIST = project.pbxproj
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/MacOSX/ngIRCd.xcodeproj/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign contrib/MacOSX/ngIRCd.xcodeproj/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic \
-	maintainer-clean-local
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic distclean \
-	distclean-generic distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic \
-	maintainer-clean-local mostlyclean mostlyclean-generic pdf \
-	pdf-am ps ps-am uninstall uninstall-am
-
-
-maintainer-clean-local:
-	rm -f Makefile Makefile.in
-
-# -eof-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:

+ 0 - 833
contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj

@@ -1,833 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		FA2D564A11EA158B00D37A35 /* pam.c in Sources */ = {isa = PBXBuildFile; fileRef = FA2D564911EA158B00D37A35 /* pam.c */; };
-		FA2D567B11EA1AB300D37A35 /* libpam.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FA2D567A11EA1AB300D37A35 /* libpam.dylib */; };
-		FA322D350CEF74B1001761B3 /* array.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CD90CEF74B1001761B3 /* array.c */; };
-		FA322D360CEF74B1001761B3 /* channel.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CDB0CEF74B1001761B3 /* channel.c */; };
-		FA322D370CEF74B1001761B3 /* client.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CDD0CEF74B1001761B3 /* client.c */; };
-		FA322D380CEF74B1001761B3 /* conf.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CDF0CEF74B1001761B3 /* conf.c */; };
-		FA322D390CEF74B1001761B3 /* conn-func.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CE10CEF74B1001761B3 /* conn-func.c */; };
-		FA322D3A0CEF74B1001761B3 /* conn-zip.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CE30CEF74B1001761B3 /* conn-zip.c */; };
-		FA322D3B0CEF74B1001761B3 /* conn.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CE50CEF74B1001761B3 /* conn.c */; };
-		FA322D3C0CEF74B1001761B3 /* hash.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CE80CEF74B1001761B3 /* hash.c */; };
-		FA322D3D0CEF74B1001761B3 /* io.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CEA0CEF74B1001761B3 /* io.c */; };
-		FA322D3E0CEF74B1001761B3 /* irc-channel.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CEC0CEF74B1001761B3 /* irc-channel.c */; };
-		FA322D3F0CEF74B1001761B3 /* irc-info.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CEE0CEF74B1001761B3 /* irc-info.c */; };
-		FA322D400CEF74B1001761B3 /* irc-login.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CF00CEF74B1001761B3 /* irc-login.c */; };
-		FA322D410CEF74B1001761B3 /* irc-mode.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CF20CEF74B1001761B3 /* irc-mode.c */; };
-		FA322D420CEF74B1001761B3 /* irc-op.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CF40CEF74B1001761B3 /* irc-op.c */; };
-		FA322D430CEF74B1001761B3 /* irc-oper.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CF60CEF74B1001761B3 /* irc-oper.c */; };
-		FA322D440CEF74B1001761B3 /* irc-server.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CF80CEF74B1001761B3 /* irc-server.c */; };
-		FA322D450CEF74B1001761B3 /* irc-write.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CFA0CEF74B1001761B3 /* irc-write.c */; };
-		FA322D460CEF74B1001761B3 /* irc.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CFC0CEF74B1001761B3 /* irc.c */; };
-		FA322D470CEF74B1001761B3 /* lists.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322CFE0CEF74B1001761B3 /* lists.c */; };
-		FA322D480CEF74B1001761B3 /* log.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322D000CEF74B1001761B3 /* log.c */; };
-		FA322D490CEF74B1001761B3 /* match.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322D030CEF74B1001761B3 /* match.c */; };
-		FA322D4A0CEF74B1001761B3 /* ngircd.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322D060CEF74B1001761B3 /* ngircd.c */; };
-		FA322D4B0CEF74B1001761B3 /* parse.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322D080CEF74B1001761B3 /* parse.c */; };
-		FA322D4D0CEF74B1001761B3 /* resolve.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322D0C0CEF74B1001761B3 /* resolve.c */; };
-		FA322DBE0CEF7766001761B3 /* tool.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322D330CEF74B1001761B3 /* tool.c */; };
-		FA322DC10CEF77CB001761B3 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FA322DC00CEF77CB001761B3 /* libz.dylib */; };
-		FA407F2E0DB159F400271AF1 /* ng_ipaddr.c in Sources */ = {isa = PBXBuildFile; fileRef = FA407F2C0DB159F400271AF1 /* ng_ipaddr.c */; };
-		FA4F165A164836B100DBD011 /* irc-metadata.c in Sources */ = {isa = PBXBuildFile; fileRef = FA4F1659164836B100DBD011 /* irc-metadata.c */; };
-		FA6BBC631605F0AC0004247A /* conn-encoding.c in Sources */ = {isa = PBXBuildFile; fileRef = FA6BBC5F1605F0AB0004247A /* conn-encoding.c */; };
-		FA6BBC641605F0AC0004247A /* irc-encoding.c in Sources */ = {isa = PBXBuildFile; fileRef = FA6BBC611605F0AC0004247A /* irc-encoding.c */; };
-		FA6BBC661605F6D60004247A /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FA6BBC651605F6D60004247A /* libiconv.dylib */; };
-		FA85178C0FA061EC006A1F5A /* op.c in Sources */ = {isa = PBXBuildFile; fileRef = FA85178B0FA061EC006A1F5A /* op.c */; };
-		FA99428C10E82A27007F27ED /* proc.c in Sources */ = {isa = PBXBuildFile; fileRef = FA99428B10E82A27007F27ED /* proc.c */; };
-		FAA3D27B0F139CDC00B2447E /* conn-ssl.c in Sources */ = {isa = PBXBuildFile; fileRef = FAA3D2790F139CDC00B2447E /* conn-ssl.c */; };
-		FAA97C57124A271400D5BBA9 /* sighandlers.c in Sources */ = {isa = PBXBuildFile; fileRef = FAA97C55124A271400D5BBA9 /* sighandlers.c */; };
-		FAACD5F514A6099C006ED74F /* class.c in Sources */ = {isa = PBXBuildFile; fileRef = FAACD5F314A6099C006ED74F /* class.c */; };
-		FAD5853215271AAB00328741 /* client-cap.c in Sources */ = {isa = PBXBuildFile; fileRef = FAD5853015271AAB00328741 /* client-cap.c */; };
-		FAD5853515271AB800328741 /* irc-cap.c in Sources */ = {isa = PBXBuildFile; fileRef = FAD5853315271AB800328741 /* irc-cap.c */; };
-		FAD5853815272C2600328741 /* login.c in Sources */ = {isa = PBXBuildFile; fileRef = FAD5853615272C2500328741 /* login.c */; };
-		FAE5CC2E0CF2308A007D69B6 /* numeric.c in Sources */ = {isa = PBXBuildFile; fileRef = FAE5CC2D0CF2308A007D69B6 /* numeric.c */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		FA18A63E16CEDDCE00132F66 /* configure.ng */ = {isa = PBXFileReference; lastKnownFileType = text; name = configure.ng; path = ../../configure.ng; sourceTree = "<group>"; };
-		FA18A63F16CEDE2300132F66 /* ngircd.service */ = {isa = PBXFileReference; lastKnownFileType = text; path = ngircd.service; sourceTree = "<group>"; };
-		FA18A64016CEDE2300132F66 /* ngircd.socket */ = {isa = PBXFileReference; lastKnownFileType = text; path = ngircd.socket; sourceTree = "<group>"; };
-		FA18A64116CEDE3500132F66 /* ngircd.pam */ = {isa = PBXFileReference; lastKnownFileType = text; path = ngircd.pam; sourceTree = "<group>"; };
-		FA18A64216CEDE5700132F66 /* de.barton.ngircd.plist.tmpl */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = de.barton.ngircd.plist.tmpl; sourceTree = "<group>"; };
-		FA18A64316CEDE8100132F66 /* Makefile.am */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
-		FA18A64416CEDFCE00132F66 /* Commands.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = Commands.txt; sourceTree = "<group>"; };
-		FA18A64516CEE0C700132F66 /* Makefile.ng */ = {isa = PBXFileReference; lastKnownFileType = text; name = Makefile.ng; path = ipaddr/Makefile.ng; sourceTree = "<group>"; };
-		FA18A64616CEE0DD00132F66 /* Makefile.ng */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.ng; sourceTree = "<group>"; };
-		FA18A64716CEE14900132F66 /* Makefile.ng */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.ng; sourceTree = "<group>"; };
-		FA18A64A16CEE18100132F66 /* Makefile.ng */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.ng; sourceTree = "<group>"; };
-		FA18A64C16CEE1AC00132F66 /* mode-test.e */ = {isa = PBXFileReference; lastKnownFileType = text; path = "mode-test.e"; sourceTree = "<group>"; };
-		FA18A64D16CEE1D900132F66 /* whois-test.e */ = {isa = PBXFileReference; lastKnownFileType = text; path = "whois-test.e"; sourceTree = "<group>"; };
-		FA18A64E16CEE24B00132F66 /* misc-test.e */ = {isa = PBXFileReference; lastKnownFileType = text; path = "misc-test.e"; sourceTree = "<group>"; };
-		FA18A64F16CEE27700132F66 /* Makefile.ng */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.ng; sourceTree = "<group>"; };
-		FA1A6BBD0D6857D900AA8F71 /* who-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "who-test.e"; sourceTree = "<group>"; };
-		FA1DBB6716C707D200D4F838 /* irc-macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "irc-macros.h"; sourceTree = "<group>"; };
-		FA2D564811EA158B00D37A35 /* pam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pam.h; sourceTree = "<group>"; };
-		FA2D564911EA158B00D37A35 /* pam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pam.c; sourceTree = "<group>"; };
-		FA2D567A11EA1AB300D37A35 /* libpam.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpam.dylib; path = usr/lib/libpam.dylib; sourceTree = SDKROOT; };
-		FA322BBA0CEF72E4001761B3 /* ngircd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ngircd; sourceTree = BUILT_PRODUCTS_DIR; };
-		FA322CD60CEF74B1001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
-		FA322CD90CEF74B1001761B3 /* array.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = array.c; sourceTree = "<group>"; };
-		FA322CDA0CEF74B1001761B3 /* array.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = array.h; sourceTree = "<group>"; };
-		FA322CDB0CEF74B1001761B3 /* channel.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = channel.c; sourceTree = "<group>"; };
-		FA322CDC0CEF74B1001761B3 /* channel.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = channel.h; sourceTree = "<group>"; };
-		FA322CDD0CEF74B1001761B3 /* client.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = client.c; sourceTree = "<group>"; };
-		FA322CDE0CEF74B1001761B3 /* client.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = client.h; sourceTree = "<group>"; };
-		FA322CDF0CEF74B1001761B3 /* conf.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = conf.c; sourceTree = "<group>"; };
-		FA322CE00CEF74B1001761B3 /* conf.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = conf.h; sourceTree = "<group>"; };
-		FA322CE10CEF74B1001761B3 /* conn-func.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = "conn-func.c"; sourceTree = "<group>"; };
-		FA322CE20CEF74B1001761B3 /* conn-func.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "conn-func.h"; sourceTree = "<group>"; };
-		FA322CE30CEF74B1001761B3 /* conn-zip.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = "conn-zip.c"; sourceTree = "<group>"; };
-		FA322CE40CEF74B1001761B3 /* conn-zip.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "conn-zip.h"; sourceTree = "<group>"; };
-		FA322CE50CEF74B1001761B3 /* conn.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = conn.c; sourceTree = "<group>"; };
-		FA322CE60CEF74B1001761B3 /* conn.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = conn.h; sourceTree = "<group>"; };
-		FA322CE70CEF74B1001761B3 /* defines.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = defines.h; sourceTree = "<group>"; };
-		FA322CE80CEF74B1001761B3 /* hash.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = hash.c; sourceTree = "<group>"; };
-		FA322CE90CEF74B1001761B3 /* hash.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = hash.h; sourceTree = "<group>"; };
-		FA322CEA0CEF74B1001761B3 /* io.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = io.c; sourceTree = "<group>"; };
-		FA322CEB0CEF74B1001761B3 /* io.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = io.h; sourceTree = "<group>"; };
-		FA322CEC0CEF74B1001761B3 /* irc-channel.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = "irc-channel.c"; sourceTree = "<group>"; };
-		FA322CED0CEF74B1001761B3 /* irc-channel.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "irc-channel.h"; sourceTree = "<group>"; };
-		FA322CEE0CEF74B1001761B3 /* irc-info.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = "irc-info.c"; sourceTree = "<group>"; };
-		FA322CEF0CEF74B1001761B3 /* irc-info.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "irc-info.h"; sourceTree = "<group>"; };
-		FA322CF00CEF74B1001761B3 /* irc-login.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = "irc-login.c"; sourceTree = "<group>"; };
-		FA322CF10CEF74B1001761B3 /* irc-login.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "irc-login.h"; sourceTree = "<group>"; };
-		FA322CF20CEF74B1001761B3 /* irc-mode.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = "irc-mode.c"; sourceTree = "<group>"; };
-		FA322CF30CEF74B1001761B3 /* irc-mode.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "irc-mode.h"; sourceTree = "<group>"; };
-		FA322CF40CEF74B1001761B3 /* irc-op.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = "irc-op.c"; sourceTree = "<group>"; };
-		FA322CF50CEF74B1001761B3 /* irc-op.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "irc-op.h"; sourceTree = "<group>"; };
-		FA322CF60CEF74B1001761B3 /* irc-oper.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = "irc-oper.c"; sourceTree = "<group>"; };
-		FA322CF70CEF74B1001761B3 /* irc-oper.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "irc-oper.h"; sourceTree = "<group>"; };
-		FA322CF80CEF74B1001761B3 /* irc-server.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = "irc-server.c"; sourceTree = "<group>"; };
-		FA322CF90CEF74B1001761B3 /* irc-server.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "irc-server.h"; sourceTree = "<group>"; };
-		FA322CFA0CEF74B1001761B3 /* irc-write.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = "irc-write.c"; sourceTree = "<group>"; };
-		FA322CFB0CEF74B1001761B3 /* irc-write.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "irc-write.h"; sourceTree = "<group>"; };
-		FA322CFC0CEF74B1001761B3 /* irc.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = irc.c; sourceTree = "<group>"; };
-		FA322CFD0CEF74B1001761B3 /* irc.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = irc.h; sourceTree = "<group>"; };
-		FA322CFE0CEF74B1001761B3 /* lists.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = lists.c; sourceTree = "<group>"; };
-		FA322CFF0CEF74B1001761B3 /* lists.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = lists.h; sourceTree = "<group>"; };
-		FA322D000CEF74B1001761B3 /* log.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = log.c; sourceTree = "<group>"; };
-		FA322D010CEF74B1001761B3 /* log.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = log.h; sourceTree = "<group>"; };
-		FA322D030CEF74B1001761B3 /* match.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = match.c; sourceTree = "<group>"; };
-		FA322D040CEF74B1001761B3 /* match.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = match.h; sourceTree = "<group>"; };
-		FA322D050CEF74B1001761B3 /* messages.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = messages.h; sourceTree = "<group>"; };
-		FA322D060CEF74B1001761B3 /* ngircd.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = ngircd.c; sourceTree = "<group>"; };
-		FA322D070CEF74B1001761B3 /* ngircd.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = ngircd.h; sourceTree = "<group>"; };
-		FA322D080CEF74B1001761B3 /* parse.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = parse.c; sourceTree = "<group>"; };
-		FA322D090CEF74B1001761B3 /* parse.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = parse.h; sourceTree = "<group>"; };
-		FA322D0C0CEF74B1001761B3 /* resolve.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = resolve.c; sourceTree = "<group>"; };
-		FA322D0D0CEF74B1001761B3 /* resolve.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = resolve.h; sourceTree = "<group>"; };
-		FA322D100CEF74B1001761B3 /* ansi2knr.1 */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.man; path = ansi2knr.1; sourceTree = "<group>"; };
-		FA322D110CEF74B1001761B3 /* ansi2knr.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = ansi2knr.c; sourceTree = "<group>"; };
-		FA322D150CEF74B1001761B3 /* portab.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = portab.h; sourceTree = "<group>"; };
-		FA322D160CEF74B1001761B3 /* portabtest.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = portabtest.c; sourceTree = "<group>"; };
-		FA322D170CEF74B1001761B3 /* splint.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = splint.h; sourceTree = "<group>"; };
-		FA322D180CEF74B1001761B3 /* strdup.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = strdup.c; sourceTree = "<group>"; };
-		FA322D190CEF74B1001761B3 /* strlcpy.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = strlcpy.c; sourceTree = "<group>"; };
-		FA322D1A0CEF74B1001761B3 /* vsnprintf.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = vsnprintf.c; sourceTree = "<group>"; };
-		FA322D1D0CEF74B1001761B3 /* channel-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "channel-test.e"; sourceTree = "<group>"; };
-		FA322D1E0CEF74B1001761B3 /* check-idle.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "check-idle.e"; sourceTree = "<group>"; };
-		FA322D1F0CEF74B1001761B3 /* connect-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "connect-test.e"; sourceTree = "<group>"; };
-		FA322D200CEF74B1001761B3 /* functions.inc */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.pascal; path = functions.inc; sourceTree = "<group>"; };
-		FA322D210CEF74B1001761B3 /* getpid.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = getpid.sh; sourceTree = "<group>"; };
-		FA322D250CEF74B1001761B3 /* README */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
-		FA322D260CEF74B1001761B3 /* start-server.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = "start-server.sh"; sourceTree = "<group>"; };
-		FA322D270CEF74B1001761B3 /* stop-server.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = "stop-server.sh"; sourceTree = "<group>"; };
-		FA322D280CEF74B1001761B3 /* stress-A.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "stress-A.e"; sourceTree = "<group>"; };
-		FA322D290CEF74B1001761B3 /* stress-B.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "stress-B.e"; sourceTree = "<group>"; };
-		FA322D2A0CEF74B1001761B3 /* stress-server.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = "stress-server.sh"; sourceTree = "<group>"; };
-		FA322D2B0CEF74B1001761B3 /* test-loop.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = "test-loop.sh"; sourceTree = "<group>"; };
-		FA322D2C0CEF74B1001761B3 /* tests.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = tests.sh; sourceTree = "<group>"; };
-		FA322D2D0CEF74B1001761B3 /* wait-tests.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = "wait-tests.sh"; sourceTree = "<group>"; };
-		FA322D330CEF74B1001761B3 /* tool.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = tool.c; sourceTree = "<group>"; };
-		FA322D340CEF74B1001761B3 /* tool.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = tool.h; sourceTree = "<group>"; };
-		FA322D5A0CEF750F001761B3 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = AUTHORS; path = ../../AUTHORS; sourceTree = SOURCE_ROOT; };
-		FA322D5B0CEF750F001761B3 /* autogen.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; name = autogen.sh; path = ../../autogen.sh; sourceTree = SOURCE_ROOT; };
-		FA322D5C0CEF750F001761B3 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = ChangeLog; path = ../../ChangeLog; sourceTree = SOURCE_ROOT; };
-		FA322D5E0CEF750F001761B3 /* config.guess */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; name = config.guess; path = ../../config.guess; sourceTree = SOURCE_ROOT; };
-		FA322D5F0CEF750F001761B3 /* config.sub */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; name = config.sub; path = ../../config.sub; sourceTree = SOURCE_ROOT; };
-		FA322D610CEF750F001761B3 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = COPYING; path = ../../COPYING; sourceTree = SOURCE_ROOT; };
-		FA322D620CEF750F001761B3 /* INSTALL.md */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = net.daringfireball.markdown; name = INSTALL.md; path = ../../INSTALL.md; sourceTree = SOURCE_ROOT; };
-		FA322D630CEF750F001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = Makefile.am; path = ../../Makefile.am; sourceTree = SOURCE_ROOT; };
-		FA322D640CEF750F001761B3 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = NEWS; path = ../../NEWS; sourceTree = SOURCE_ROOT; };
-		FA322D650CEF750F001761B3 /* README.md */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../../README.md; sourceTree = SOURCE_ROOT; };
-		FA322D6A0CEF7523001761B3 /* changelog */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = changelog; sourceTree = "<group>"; };
-		FA322D6B0CEF7523001761B3 /* compat */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = compat; sourceTree = "<group>"; };
-		FA322D6C0CEF7523001761B3 /* control */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = control; sourceTree = "<group>"; };
-		FA322D6D0CEF7523001761B3 /* copyright */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = copyright; sourceTree = "<group>"; };
-		FA322D6E0CEF7523001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
-		FA322D6F0CEF7523001761B3 /* ngircd.default */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = ngircd.default; sourceTree = "<group>"; };
-		FA322D700CEF7523001761B3 /* ngircd.init */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = ngircd.init; sourceTree = "<group>"; };
-		FA322D710CEF7523001761B3 /* ngircd.postinst */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = ngircd.postinst; sourceTree = "<group>"; };
-		FA322D720CEF7523001761B3 /* rules */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = rules; sourceTree = "<group>"; };
-		FA322D8E0CEF7523001761B3 /* ngIRCd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = ngIRCd.xcodeproj; sourceTree = "<group>"; };
-		FA322D920CEF7523001761B3 /* ngindent.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = ngindent.sh; sourceTree = "<group>"; };
-		FA322D940CEF7523001761B3 /* ngircd.spec */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = ngircd.spec; sourceTree = "<group>"; };
-		FA322D950CEF7523001761B3 /* README */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
-		FA322D9A0CEF752C001761B3 /* FAQ.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = FAQ.txt; sourceTree = "<group>"; };
-		FA322D9B0CEF752C001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
-		FA322D9C0CEF752C001761B3 /* Platforms.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Platforms.txt; sourceTree = "<group>"; };
-		FA322D9D0CEF752C001761B3 /* Protocol.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Protocol.txt; sourceTree = "<group>"; };
-		FA322D9E0CEF752C001761B3 /* README-AUX.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "README-AUX.txt"; sourceTree = "<group>"; };
-		FA322D9F0CEF752C001761B3 /* README-BeOS.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "README-BeOS.txt"; sourceTree = "<group>"; };
-		FA322DA00CEF752C001761B3 /* RFC.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = RFC.txt; sourceTree = "<group>"; };
-		FA322DA40CEF752C001761B3 /* Doxyfile */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Doxyfile; sourceTree = "<group>"; };
-		FA322DA50CEF752C001761B3 /* footer.inc.html */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.html; path = footer.inc.html; sourceTree = "<group>"; };
-		FA322DA70CEF752C001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
-		FA322DA90CEF752C001761B3 /* SSL.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = SSL.txt; sourceTree = "<group>"; };
-		FA322DAD0CEF7538001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
-		FA322DAE0CEF7538001761B3 /* ngircd.8.tmpl */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = ngircd.8.tmpl; sourceTree = "<group>"; };
-		FA322DAF0CEF7538001761B3 /* ngircd.conf.5.tmpl */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = ngircd.conf.5.tmpl; sourceTree = "<group>"; };
-		FA322DB10CEF7565001761B3 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
-		FA322DC00CEF77CB001761B3 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = "<absolute>"; };
-		FA407F2C0DB159F400271AF1 /* ng_ipaddr.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = ng_ipaddr.c; path = ipaddr/ng_ipaddr.c; sourceTree = "<group>"; };
-		FA407F2D0DB159F400271AF1 /* ng_ipaddr.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = ng_ipaddr.h; path = ipaddr/ng_ipaddr.h; sourceTree = "<group>"; };
-		FA4B08E513E7F8FB00765BA3 /* ngircd-bsd.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "ngircd-bsd.sh"; sourceTree = "<group>"; };
-		FA4B08E613E7F91700765BA3 /* ngIRCd-Logo.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "ngIRCd-Logo.gif"; sourceTree = "<group>"; };
-		FA4B08E713E7F91700765BA3 /* ngircd-redhat.init */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "ngircd-redhat.init"; sourceTree = "<group>"; };
-		FA4B08E813E7F91C00765BA3 /* platformtest.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = platformtest.sh; sourceTree = "<group>"; };
-		FA4B4F542055B47C00A04296 /* ngircd.logcheck */ = {isa = PBXFileReference; lastKnownFileType = text; path = ngircd.logcheck; sourceTree = "<group>"; };
-		FA4B4F552055B4C800A04296 /* source */ = {isa = PBXFileReference; lastKnownFileType = folder; path = source; sourceTree = "<group>"; };
-		FA4F1659164836B100DBD011 /* irc-metadata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "irc-metadata.c"; sourceTree = "<group>"; };
-		FA4F165C164836BF00DBD011 /* irc-metadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "irc-metadata.h"; sourceTree = "<group>"; };
-		FA6BBC5F1605F0AB0004247A /* conn-encoding.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "conn-encoding.c"; sourceTree = "<group>"; };
-		FA6BBC601605F0AC0004247A /* conn-encoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "conn-encoding.h"; sourceTree = "<group>"; };
-		FA6BBC611605F0AC0004247A /* irc-encoding.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "irc-encoding.c"; sourceTree = "<group>"; };
-		FA6BBC621605F0AC0004247A /* irc-encoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "irc-encoding.h"; sourceTree = "<group>"; };
-		FA6BBC651605F6D60004247A /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = ../../../../../../../usr/lib/libiconv.dylib; sourceTree = "<group>"; };
-		FA77849A133FB9FF00740057 /* sample-ngircd.conf.tmpl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "sample-ngircd.conf.tmpl"; sourceTree = "<group>"; };
-		FA7E9FEE242FFC4500A04296 /* server-link-test.e */ = {isa = PBXFileReference; lastKnownFileType = text; path = "server-link-test.e"; sourceTree = "<group>"; };
-		FA7E9FF0242FFC6C00A04296 /* server-login-test.e */ = {isa = PBXFileReference; lastKnownFileType = text; path = "server-login-test.e"; sourceTree = "<group>"; };
-		FA85178A0FA061EC006A1F5A /* op.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = op.h; sourceTree = "<group>"; };
-		FA85178B0FA061EC006A1F5A /* op.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = op.c; sourceTree = "<group>"; };
-		FA99428A10E82A27007F27ED /* proc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = proc.h; sourceTree = "<group>"; };
-		FA99428B10E82A27007F27ED /* proc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = proc.c; sourceTree = "<group>"; };
-		FAA3D2700F139CB300B2447E /* invite-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "invite-test.e"; sourceTree = "<group>"; };
-		FAA3D2710F139CB300B2447E /* join-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "join-test.e"; sourceTree = "<group>"; };
-		FAA3D2720F139CB300B2447E /* kick-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "kick-test.e"; sourceTree = "<group>"; };
-		FAA3D2730F139CB300B2447E /* message-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "message-test.e"; sourceTree = "<group>"; };
-		FAA3D2740F139CB300B2447E /* ngircd-test1.conf */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "ngircd-test1.conf"; sourceTree = "<group>"; };
-		FAA3D2750F139CB300B2447E /* ngircd-test2.conf */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "ngircd-test2.conf"; sourceTree = "<group>"; };
-		FAA3D2760F139CB300B2447E /* opless-channel-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "opless-channel-test.e"; sourceTree = "<group>"; };
-		FAA3D2770F139CB300B2447E /* server-link-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "server-link-test.e"; sourceTree = "<group>"; };
-		FAA3D2780F139CDC00B2447E /* conf-ssl.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "conf-ssl.h"; sourceTree = "<group>"; };
-		FAA3D2790F139CDC00B2447E /* conn-ssl.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = "conn-ssl.c"; sourceTree = "<group>"; };
-		FAA3D27A0F139CDC00B2447E /* conn-ssl.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = "conn-ssl.h"; sourceTree = "<group>"; };
-		FAA3D27C0F139CF800B2447E /* strtok_r.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = strtok_r.c; sourceTree = "<group>"; };
-		FAA3D27D0F139CF800B2447E /* waitpid.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = waitpid.c; sourceTree = "<group>"; };
-		FAA3D2800F139D1500B2447E /* Services.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Services.txt; sourceTree = "<group>"; };
-		FAA3D2820F139D2E00B2447E /* 01ngircd-contents.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = "01ngircd-contents.xml"; sourceTree = "<group>"; };
-		FAA3D2830F139D2E00B2447E /* 01ngircd.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = 01ngircd.xml; sourceTree = "<group>"; };
-		FAA3D2840F139D2E00B2447E /* 02de-contents.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = "02de-contents.xml"; sourceTree = "<group>"; };
-		FAA3D2850F139D2E00B2447E /* 02de.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = 02de.xml; sourceTree = "<group>"; };
-		FAA3D2860F139D2E00B2447E /* index.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = index.xml; sourceTree = "<group>"; };
-		FAA3D2880F139D2E00B2447E /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
-		FAA3D28A0F139D2E00B2447E /* postinstall.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = postinstall.sh; sourceTree = "<group>"; };
-		FAA3D28B0F139D2E00B2447E /* preinstall.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = preinstall.sh; sourceTree = "<group>"; };
-		FAA97C55124A271400D5BBA9 /* sighandlers.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = sighandlers.c; sourceTree = "<group>"; };
-		FAA97C56124A271400D5BBA9 /* sighandlers.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = sighandlers.h; sourceTree = "<group>"; };
-		FAA9C8162377186900A04296 /* nglog.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = nglog.sh; sourceTree = "<group>"; };
-		FAACD5F314A6099C006ED74F /* class.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = class.c; sourceTree = "<group>"; };
-		FAACD5F414A6099C006ED74F /* class.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = class.h; sourceTree = "<group>"; };
-		FAC4E5CD23A7DE2400A04296 /* Makefile.am */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
-		FAD5852F15271A7800328741 /* Capabilities.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = Capabilities.txt; sourceTree = "<group>"; };
-		FAD5853015271AAB00328741 /* client-cap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "client-cap.c"; sourceTree = "<group>"; };
-		FAD5853115271AAB00328741 /* client-cap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "client-cap.h"; sourceTree = "<group>"; };
-		FAD5853315271AB800328741 /* irc-cap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "irc-cap.c"; sourceTree = "<group>"; };
-		FAD5853415271AB800328741 /* irc-cap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "irc-cap.h"; sourceTree = "<group>"; };
-		FAD5853615272C2500328741 /* login.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = login.c; sourceTree = "<group>"; };
-		FAD5853715272C2500328741 /* login.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = login.h; sourceTree = "<group>"; };
-		FAE22BD215270EA300F1A5AB /* Bopm.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = Bopm.txt; sourceTree = "<group>"; };
-		FAE22BD415270EA300F1A5AB /* Contributing.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = Contributing.txt; sourceTree = "<group>"; };
-		FAE22BD515270EB500F1A5AB /* HowToRelease.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = HowToRelease.txt; sourceTree = "<group>"; };
-		FAE22BD615270EB500F1A5AB /* Modes.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = Modes.txt; sourceTree = "<group>"; };
-		FAE22BD715270EB500F1A5AB /* PAM.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = PAM.txt; sourceTree = "<group>"; };
-		FAE22BD815270EC400F1A5AB /* README-Interix.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = "README-Interix.txt"; sourceTree = "<group>"; };
-		FAE5CC2C0CF2308A007D69B6 /* numeric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = numeric.h; sourceTree = "<group>"; };
-		FAE5CC2D0CF2308A007D69B6 /* numeric.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = numeric.c; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		8DD76FAD0486AB0100D96B5E /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FA322DC10CEF77CB001761B3 /* libz.dylib in Frameworks */,
-				FA2D567B11EA1AB300D37A35 /* libpam.dylib in Frameworks */,
-				FA6BBC661605F6D60004247A /* libiconv.dylib in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		08FB7794FE84155DC02AAC07 /* ngIRCd */ = {
-			isa = PBXGroup;
-			children = (
-				FA322D630CEF750F001761B3 /* Makefile.am */,
-				FA322D660CEF7523001761B3 /* contrib */,
-				FA322D970CEF752C001761B3 /* doc */,
-				FA322DAB0CEF7538001761B3 /* man */,
-				FA322CD40CEF74B0001761B3 /* src */,
-				FA322D5A0CEF750F001761B3 /* AUTHORS */,
-				FA322D5C0CEF750F001761B3 /* ChangeLog */,
-				FA322D610CEF750F001761B3 /* COPYING */,
-				FA322D620CEF750F001761B3 /* INSTALL.md */,
-				FA322D640CEF750F001761B3 /* NEWS */,
-				FA322D650CEF750F001761B3 /* README.md */,
-				FA322D5B0CEF750F001761B3 /* autogen.sh */,
-				FA322D5E0CEF750F001761B3 /* config.guess */,
-				FA322D5F0CEF750F001761B3 /* config.sub */,
-				FA18A63E16CEDDCE00132F66 /* configure.ng */,
-				1AB674ADFE9D54B511CA2CBB /* Products */,
-				FA6BBC651605F6D60004247A /* libiconv.dylib */,
-				FA2D567A11EA1AB300D37A35 /* libpam.dylib */,
-				FA322DC00CEF77CB001761B3 /* libz.dylib */,
-			);
-			indentWidth = 8;
-			name = ngIRCd;
-			sourceTree = "<group>";
-			tabWidth = 8;
-			usesTabs = 1;
-			wrapsLines = 0;
-		};
-		1AB674ADFE9D54B511CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				FA322BBA0CEF72E4001761B3 /* ngircd */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		FA322CD40CEF74B0001761B3 /* src */ = {
-			isa = PBXGroup;
-			children = (
-				FA322CD60CEF74B1001761B3 /* Makefile.am */,
-				FA407F270DB1598D00271AF1 /* ipaddr */,
-				FA322CD70CEF74B1001761B3 /* ngircd */,
-				FA322D0E0CEF74B1001761B3 /* portab */,
-				FA322D1B0CEF74B1001761B3 /* testsuite */,
-				FA322D2E0CEF74B1001761B3 /* tool */,
-			);
-			name = src;
-			path = ../../src;
-			sourceTree = SOURCE_ROOT;
-		};
-		FA322CD70CEF74B1001761B3 /* ngircd */ = {
-			isa = PBXGroup;
-			children = (
-				FA18A64616CEE0DD00132F66 /* Makefile.ng */,
-				FA322CD90CEF74B1001761B3 /* array.c */,
-				FA322CDA0CEF74B1001761B3 /* array.h */,
-				FA322CDB0CEF74B1001761B3 /* channel.c */,
-				FA322CDC0CEF74B1001761B3 /* channel.h */,
-				FAACD5F314A6099C006ED74F /* class.c */,
-				FAACD5F414A6099C006ED74F /* class.h */,
-				FA322CDD0CEF74B1001761B3 /* client.c */,
-				FA322CDE0CEF74B1001761B3 /* client.h */,
-				FAD5853015271AAB00328741 /* client-cap.c */,
-				FAD5853115271AAB00328741 /* client-cap.h */,
-				FA322CDF0CEF74B1001761B3 /* conf.c */,
-				FA322CE00CEF74B1001761B3 /* conf.h */,
-				FAA3D2780F139CDC00B2447E /* conf-ssl.h */,
-				FA322CE50CEF74B1001761B3 /* conn.c */,
-				FA322CE60CEF74B1001761B3 /* conn.h */,
-				FA6BBC5F1605F0AB0004247A /* conn-encoding.c */,
-				FA6BBC601605F0AC0004247A /* conn-encoding.h */,
-				FA322CE10CEF74B1001761B3 /* conn-func.c */,
-				FA322CE20CEF74B1001761B3 /* conn-func.h */,
-				FAA3D2790F139CDC00B2447E /* conn-ssl.c */,
-				FAA3D27A0F139CDC00B2447E /* conn-ssl.h */,
-				FA322CE30CEF74B1001761B3 /* conn-zip.c */,
-				FA322CE40CEF74B1001761B3 /* conn-zip.h */,
-				FA322CE70CEF74B1001761B3 /* defines.h */,
-				FA322CE80CEF74B1001761B3 /* hash.c */,
-				FA322CE90CEF74B1001761B3 /* hash.h */,
-				FA322CEA0CEF74B1001761B3 /* io.c */,
-				FA322CEB0CEF74B1001761B3 /* io.h */,
-				FA322CFC0CEF74B1001761B3 /* irc.c */,
-				FA322CFD0CEF74B1001761B3 /* irc.h */,
-				FAD5853315271AB800328741 /* irc-cap.c */,
-				FAD5853415271AB800328741 /* irc-cap.h */,
-				FA322CEC0CEF74B1001761B3 /* irc-channel.c */,
-				FA322CED0CEF74B1001761B3 /* irc-channel.h */,
-				FA6BBC611605F0AC0004247A /* irc-encoding.c */,
-				FA6BBC621605F0AC0004247A /* irc-encoding.h */,
-				FA322CEE0CEF74B1001761B3 /* irc-info.c */,
-				FA322CEF0CEF74B1001761B3 /* irc-info.h */,
-				FA322CF00CEF74B1001761B3 /* irc-login.c */,
-				FA322CF10CEF74B1001761B3 /* irc-login.h */,
-				FA1DBB6716C707D200D4F838 /* irc-macros.h */,
-				FA4F1659164836B100DBD011 /* irc-metadata.c */,
-				FA4F165C164836BF00DBD011 /* irc-metadata.h */,
-				FA322CF20CEF74B1001761B3 /* irc-mode.c */,
-				FA322CF30CEF74B1001761B3 /* irc-mode.h */,
-				FA322CF40CEF74B1001761B3 /* irc-op.c */,
-				FA322CF50CEF74B1001761B3 /* irc-op.h */,
-				FA322CF60CEF74B1001761B3 /* irc-oper.c */,
-				FA322CF70CEF74B1001761B3 /* irc-oper.h */,
-				FA322CF80CEF74B1001761B3 /* irc-server.c */,
-				FA322CF90CEF74B1001761B3 /* irc-server.h */,
-				FA322CFA0CEF74B1001761B3 /* irc-write.c */,
-				FA322CFB0CEF74B1001761B3 /* irc-write.h */,
-				FA322CFE0CEF74B1001761B3 /* lists.c */,
-				FA322CFF0CEF74B1001761B3 /* lists.h */,
-				FA322D000CEF74B1001761B3 /* log.c */,
-				FA322D010CEF74B1001761B3 /* log.h */,
-				FAD5853615272C2500328741 /* login.c */,
-				FAD5853715272C2500328741 /* login.h */,
-				FA322D030CEF74B1001761B3 /* match.c */,
-				FA322D040CEF74B1001761B3 /* match.h */,
-				FA322D050CEF74B1001761B3 /* messages.h */,
-				FA322D060CEF74B1001761B3 /* ngircd.c */,
-				FA322D070CEF74B1001761B3 /* ngircd.h */,
-				FAE5CC2D0CF2308A007D69B6 /* numeric.c */,
-				FAE5CC2C0CF2308A007D69B6 /* numeric.h */,
-				FA85178B0FA061EC006A1F5A /* op.c */,
-				FA85178A0FA061EC006A1F5A /* op.h */,
-				FA2D564911EA158B00D37A35 /* pam.c */,
-				FA2D564811EA158B00D37A35 /* pam.h */,
-				FA322D080CEF74B1001761B3 /* parse.c */,
-				FA322D090CEF74B1001761B3 /* parse.h */,
-				FA99428B10E82A27007F27ED /* proc.c */,
-				FA99428A10E82A27007F27ED /* proc.h */,
-				FA322D0C0CEF74B1001761B3 /* resolve.c */,
-				FA322D0D0CEF74B1001761B3 /* resolve.h */,
-				FAA97C55124A271400D5BBA9 /* sighandlers.c */,
-				FAA97C56124A271400D5BBA9 /* sighandlers.h */,
-			);
-			path = ngircd;
-			sourceTree = "<group>";
-		};
-		FA322D0E0CEF74B1001761B3 /* portab */ = {
-			isa = PBXGroup;
-			children = (
-				FA18A64716CEE14900132F66 /* Makefile.ng */,
-				FA322D100CEF74B1001761B3 /* ansi2knr.1 */,
-				FA322D110CEF74B1001761B3 /* ansi2knr.c */,
-				FA322D150CEF74B1001761B3 /* portab.h */,
-				FA322D160CEF74B1001761B3 /* portabtest.c */,
-				FA322D170CEF74B1001761B3 /* splint.h */,
-				FA322D180CEF74B1001761B3 /* strdup.c */,
-				FA322D190CEF74B1001761B3 /* strlcpy.c */,
-				FAA3D27C0F139CF800B2447E /* strtok_r.c */,
-				FA322D1A0CEF74B1001761B3 /* vsnprintf.c */,
-				FAA3D27D0F139CF800B2447E /* waitpid.c */,
-			);
-			path = portab;
-			sourceTree = "<group>";
-		};
-		FA322D1B0CEF74B1001761B3 /* testsuite */ = {
-			isa = PBXGroup;
-			children = (
-				FA18A64A16CEE18100132F66 /* Makefile.ng */,
-				FA322D1D0CEF74B1001761B3 /* channel-test.e */,
-				FA322D1E0CEF74B1001761B3 /* check-idle.e */,
-				FA322D1F0CEF74B1001761B3 /* connect-test.e */,
-				FA322D200CEF74B1001761B3 /* functions.inc */,
-				FA322D210CEF74B1001761B3 /* getpid.sh */,
-				FAA3D2700F139CB300B2447E /* invite-test.e */,
-				FAA3D2710F139CB300B2447E /* join-test.e */,
-				FAA3D2720F139CB300B2447E /* kick-test.e */,
-				FAA3D2730F139CB300B2447E /* message-test.e */,
-				FA18A64E16CEE24B00132F66 /* misc-test.e */,
-				FA18A64C16CEE1AC00132F66 /* mode-test.e */,
-				FAA3D2740F139CB300B2447E /* ngircd-test1.conf */,
-				FAA3D2750F139CB300B2447E /* ngircd-test2.conf */,
-				FAA3D2760F139CB300B2447E /* opless-channel-test.e */,
-				FA322D250CEF74B1001761B3 /* README */,
-				FAA3D2770F139CB300B2447E /* server-link-test.e */,
-				FA322D260CEF74B1001761B3 /* start-server.sh */,
-				FA322D270CEF74B1001761B3 /* stop-server.sh */,
-				FA322D280CEF74B1001761B3 /* stress-A.e */,
-				FA322D290CEF74B1001761B3 /* stress-B.e */,
-				FA7E9FEE242FFC4500A04296 /* server-link-test.e */,
-				FA7E9FF0242FFC6C00A04296 /* server-login-test.e */,
-				FA322D2A0CEF74B1001761B3 /* stress-server.sh */,
-				FA322D2B0CEF74B1001761B3 /* test-loop.sh */,
-				FA322D2C0CEF74B1001761B3 /* tests.sh */,
-				FA322D2D0CEF74B1001761B3 /* wait-tests.sh */,
-				FA1A6BBD0D6857D900AA8F71 /* who-test.e */,
-				FA18A64D16CEE1D900132F66 /* whois-test.e */,
-			);
-			path = testsuite;
-			sourceTree = "<group>";
-		};
-		FA322D2E0CEF74B1001761B3 /* tool */ = {
-			isa = PBXGroup;
-			children = (
-				FA18A64F16CEE27700132F66 /* Makefile.ng */,
-				FA322D330CEF74B1001761B3 /* tool.c */,
-				FA322D340CEF74B1001761B3 /* tool.h */,
-			);
-			path = tool;
-			sourceTree = "<group>";
-		};
-		FA322D660CEF7523001761B3 /* contrib */ = {
-			isa = PBXGroup;
-			children = (
-				FAC4E5CD23A7DE2400A04296 /* Makefile.am */,
-				FA322D680CEF7523001761B3 /* Debian */,
-				FA322D730CEF7523001761B3 /* MacOSX */,
-				FA322D950CEF7523001761B3 /* README */,
-				FA322D920CEF7523001761B3 /* ngindent.sh */,
-				FA4B08E513E7F8FB00765BA3 /* ngircd-bsd.sh */,
-				FA4B08E613E7F91700765BA3 /* ngIRCd-Logo.gif */,
-				FA4B08E713E7F91700765BA3 /* ngircd-redhat.init */,
-				FA4B4F542055B47C00A04296 /* ngircd.logcheck */,
-				FA18A63F16CEDE2300132F66 /* ngircd.service */,
-				FA18A64016CEDE2300132F66 /* ngircd.socket */,
-				FA322D940CEF7523001761B3 /* ngircd.spec */,
-				FAA9C8162377186900A04296 /* nglog.sh */,
-				FA4B08E813E7F91C00765BA3 /* platformtest.sh */,
-			);
-			name = contrib;
-			path = ..;
-			sourceTree = SOURCE_ROOT;
-		};
-		FA322D680CEF7523001761B3 /* Debian */ = {
-			isa = PBXGroup;
-			children = (
-				FA322D6E0CEF7523001761B3 /* Makefile.am */,
-				FA322D6A0CEF7523001761B3 /* changelog */,
-				FA322D6B0CEF7523001761B3 /* compat */,
-				FA322D6C0CEF7523001761B3 /* control */,
-				FA322D6D0CEF7523001761B3 /* copyright */,
-				FA322D6F0CEF7523001761B3 /* ngircd.default */,
-				FA322D700CEF7523001761B3 /* ngircd.init */,
-				FA18A64116CEDE3500132F66 /* ngircd.pam */,
-				FA322D710CEF7523001761B3 /* ngircd.postinst */,
-				FA322D720CEF7523001761B3 /* rules */,
-				FA4B4F552055B4C800A04296 /* source */,
-			);
-			path = Debian;
-			sourceTree = "<group>";
-		};
-		FA322D730CEF7523001761B3 /* MacOSX */ = {
-			isa = PBXGroup;
-			children = (
-				FA18A64316CEDE8100132F66 /* Makefile.am */,
-				FAA3D2810F139D2E00B2447E /* ngIRCd.pmdoc */,
-				FA322DB10CEF7565001761B3 /* config.h */,
-				FA18A64216CEDE5700132F66 /* de.barton.ngircd.plist.tmpl */,
-				FA322D8E0CEF7523001761B3 /* ngIRCd.xcodeproj */,
-				FAA3D28A0F139D2E00B2447E /* postinstall.sh */,
-				FAA3D28B0F139D2E00B2447E /* preinstall.sh */,
-			);
-			path = MacOSX;
-			sourceTree = "<group>";
-		};
-		FA322D8F0CEF7523001761B3 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		FA322D970CEF752C001761B3 /* doc */ = {
-			isa = PBXGroup;
-			children = (
-				FA322D9B0CEF752C001761B3 /* Makefile.am */,
-				FA322DA20CEF752C001761B3 /* src */,
-				FAE22BD215270EA300F1A5AB /* Bopm.txt */,
-				FAD5852F15271A7800328741 /* Capabilities.txt */,
-				FA18A64416CEDFCE00132F66 /* Commands.txt */,
-				FAE22BD415270EA300F1A5AB /* Contributing.txt */,
-				FA322D9A0CEF752C001761B3 /* FAQ.txt */,
-				FAE22BD515270EB500F1A5AB /* HowToRelease.txt */,
-				FAE22BD615270EB500F1A5AB /* Modes.txt */,
-				FAE22BD715270EB500F1A5AB /* PAM.txt */,
-				FA322D9C0CEF752C001761B3 /* Platforms.txt */,
-				FA322D9D0CEF752C001761B3 /* Protocol.txt */,
-				FA322D9E0CEF752C001761B3 /* README-AUX.txt */,
-				FA322D9F0CEF752C001761B3 /* README-BeOS.txt */,
-				FAE22BD815270EC400F1A5AB /* README-Interix.txt */,
-				FA322DA00CEF752C001761B3 /* RFC.txt */,
-				FAA3D2800F139D1500B2447E /* Services.txt */,
-				FA322DA90CEF752C001761B3 /* SSL.txt */,
-				FA77849A133FB9FF00740057 /* sample-ngircd.conf.tmpl */,
-			);
-			name = doc;
-			path = ../../doc;
-			sourceTree = SOURCE_ROOT;
-		};
-		FA322DA20CEF752C001761B3 /* src */ = {
-			isa = PBXGroup;
-			children = (
-				FA322DA70CEF752C001761B3 /* Makefile.am */,
-				FA322DA40CEF752C001761B3 /* Doxyfile */,
-				FA322DA50CEF752C001761B3 /* footer.inc.html */,
-			);
-			path = src;
-			sourceTree = "<group>";
-		};
-		FA322DAB0CEF7538001761B3 /* man */ = {
-			isa = PBXGroup;
-			children = (
-				FA322DAD0CEF7538001761B3 /* Makefile.am */,
-				FA322DAE0CEF7538001761B3 /* ngircd.8.tmpl */,
-				FA322DAF0CEF7538001761B3 /* ngircd.conf.5.tmpl */,
-			);
-			name = man;
-			path = ../../man;
-			sourceTree = SOURCE_ROOT;
-		};
-		FA407F270DB1598D00271AF1 /* ipaddr */ = {
-			isa = PBXGroup;
-			children = (
-				FA18A64516CEE0C700132F66 /* Makefile.ng */,
-				FA407F2C0DB159F400271AF1 /* ng_ipaddr.c */,
-				FA407F2D0DB159F400271AF1 /* ng_ipaddr.h */,
-			);
-			name = ipaddr;
-			sourceTree = "<group>";
-		};
-		FAA3D2810F139D2E00B2447E /* ngIRCd.pmdoc */ = {
-			isa = PBXGroup;
-			children = (
-				FAA3D2880F139D2E00B2447E /* Makefile.am */,
-				FAA3D2860F139D2E00B2447E /* index.xml */,
-				FAA3D2830F139D2E00B2447E /* 01ngircd.xml */,
-				FAA3D2820F139D2E00B2447E /* 01ngircd-contents.xml */,
-				FAA3D2850F139D2E00B2447E /* 02de.xml */,
-				FAA3D2840F139D2E00B2447E /* 02de-contents.xml */,
-			);
-			path = ngIRCd.pmdoc;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		8DD76FA90486AB0100D96B5E /* ngIRCd */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "ngIRCd" */;
-			buildPhases = (
-				8DD76FAB0486AB0100D96B5E /* Sources */,
-				8DD76FAD0486AB0100D96B5E /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = ngIRCd;
-			productInstallPath = "$(HOME)/bin";
-			productName = ngIRCd;
-			productReference = FA322BBA0CEF72E4001761B3 /* ngircd */;
-			productType = "com.apple.product-type.tool";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		08FB7793FE84155DC02AAC07 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 1140;
-				ORGANIZATIONNAME = "ngIRCd Development Team";
-			};
-			buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "ngIRCd" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = en;
-			hasScannedForEncodings = 1;
-			knownRegions = (
-				en,
-				Base,
-			);
-			mainGroup = 08FB7794FE84155DC02AAC07 /* ngIRCd */;
-			projectDirPath = "";
-			projectReferences = (
-				{
-					ProductGroup = FA322D8F0CEF7523001761B3 /* Products */;
-					ProjectRef = FA322D8E0CEF7523001761B3 /* ngIRCd.xcodeproj */;
-				},
-			);
-			projectRoot = "";
-			targets = (
-				8DD76FA90486AB0100D96B5E /* ngIRCd */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
-		8DD76FAB0486AB0100D96B5E /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FA322D350CEF74B1001761B3 /* array.c in Sources */,
-				FA322D360CEF74B1001761B3 /* channel.c in Sources */,
-				FA322D370CEF74B1001761B3 /* client.c in Sources */,
-				FA322D380CEF74B1001761B3 /* conf.c in Sources */,
-				FA322D390CEF74B1001761B3 /* conn-func.c in Sources */,
-				FA322D3A0CEF74B1001761B3 /* conn-zip.c in Sources */,
-				FA322D3B0CEF74B1001761B3 /* conn.c in Sources */,
-				FA322D3C0CEF74B1001761B3 /* hash.c in Sources */,
-				FA322D3D0CEF74B1001761B3 /* io.c in Sources */,
-				FA322D3E0CEF74B1001761B3 /* irc-channel.c in Sources */,
-				FA322D3F0CEF74B1001761B3 /* irc-info.c in Sources */,
-				FA322D400CEF74B1001761B3 /* irc-login.c in Sources */,
-				FA322D410CEF74B1001761B3 /* irc-mode.c in Sources */,
-				FA322D420CEF74B1001761B3 /* irc-op.c in Sources */,
-				FA322D430CEF74B1001761B3 /* irc-oper.c in Sources */,
-				FA322D440CEF74B1001761B3 /* irc-server.c in Sources */,
-				FA322D450CEF74B1001761B3 /* irc-write.c in Sources */,
-				FA322D460CEF74B1001761B3 /* irc.c in Sources */,
-				FA322D470CEF74B1001761B3 /* lists.c in Sources */,
-				FA322D480CEF74B1001761B3 /* log.c in Sources */,
-				FA322D490CEF74B1001761B3 /* match.c in Sources */,
-				FA322D4A0CEF74B1001761B3 /* ngircd.c in Sources */,
-				FA322D4B0CEF74B1001761B3 /* parse.c in Sources */,
-				FA322D4D0CEF74B1001761B3 /* resolve.c in Sources */,
-				FA322DBE0CEF7766001761B3 /* tool.c in Sources */,
-				FAE5CC2E0CF2308A007D69B6 /* numeric.c in Sources */,
-				FA407F2E0DB159F400271AF1 /* ng_ipaddr.c in Sources */,
-				FAA3D27B0F139CDC00B2447E /* conn-ssl.c in Sources */,
-				FA85178C0FA061EC006A1F5A /* op.c in Sources */,
-				FA99428C10E82A27007F27ED /* proc.c in Sources */,
-				FA2D564A11EA158B00D37A35 /* pam.c in Sources */,
-				FAA97C57124A271400D5BBA9 /* sighandlers.c in Sources */,
-				FAACD5F514A6099C006ED74F /* class.c in Sources */,
-				FAD5853215271AAB00328741 /* client-cap.c in Sources */,
-				FAD5853515271AB800328741 /* irc-cap.c in Sources */,
-				FAD5853815272C2600328741 /* login.c in Sources */,
-				FA6BBC631605F0AC0004247A /* conn-encoding.c in Sources */,
-				FA6BBC641605F0AC0004247A /* irc-encoding.c in Sources */,
-				FA4F165A164836B100DBD011 /* irc-metadata.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
-		1DEB928708733DD80010E9CD /* Default */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_ENABLE_OBJC_WEAK = YES;
-			};
-			name = Default;
-		};
-		1DEB928B08733DD80010E9CD /* Default */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_WARN_ASSIGN_ENUM = YES;
-				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
-				CLANG_WARN_COMMA = YES;
-				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
-				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_INFINITE_RECURSION = YES;
-				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
-				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
-				CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES;
-				CLANG_WARN_STRICT_PROTOTYPES = YES;
-				CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
-				GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
-				GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
-				GCC_WARN_PEDANTIC = YES;
-				GCC_WARN_SHADOW = YES;
-				GCC_WARN_SIGN_COMPARE = YES;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_LABEL = YES;
-				GCC_WARN_UNUSED_PARAMETER = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.6;
-				PRODUCT_NAME = ngircd;
-			};
-			name = Default;
-		};
-		FAB0570C105D917F006AF9E2 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_WARN_ASSIGN_ENUM = YES;
-				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
-				CLANG_WARN_COMMA = YES;
-				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
-				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_INFINITE_RECURSION = YES;
-				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
-				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
-				CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES;
-				CLANG_WARN_STRICT_PROTOTYPES = YES;
-				CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				ENABLE_TESTABILITY = YES;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
-				GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
-				GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
-				GCC_WARN_PEDANTIC = YES;
-				GCC_WARN_SHADOW = YES;
-				GCC_WARN_SIGN_COMPARE = YES;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_LABEL = YES;
-				GCC_WARN_UNUSED_PARAMETER = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.6;
-				ONLY_ACTIVE_ARCH = YES;
-				PRODUCT_NAME = ngircd;
-				SDKROOT = "";
-				STRIP_INSTALLED_PRODUCT = NO;
-			};
-			name = Debug;
-		};
-		FAB0570D105D917F006AF9E2 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_ENABLE_OBJC_WEAK = YES;
-			};
-			name = Debug;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "ngIRCd" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB928708733DD80010E9CD /* Default */,
-				FAB0570D105D917F006AF9E2 /* Debug */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Default;
-		};
-		1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "ngIRCd" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB928B08733DD80010E9CD /* Default */,
-				FAB0570C105D917F006AF9E2 /* Debug */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Default;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
-}

+ 0 - 56
contrib/MacOSX/postinstall.sh

@@ -1,56 +0,0 @@
-#!/bin/sh
-# ngIRCd Mac OS X postinstall/postupgrade script
-
-LDPLIST="/Library/LaunchDaemons/de.barton.ngircd.plist"
-
-if [ ! -e /etc/ngircd ]; then
-	echo "Creating symlink: /opt/ngircd/etc -> /etc/ngircd"
-	ln -s /opt/ngircd/etc /etc/ngircd || exit 1
-else
-	echo "/etc/ngircd already exists. Don't create symlink."
-fi
-
-if [ ! -e /opt/ngircd/etc/ngircd.conf ]; then
-	echo "Creating default configuration: /opt/ngircd/etc/ngircd.conf"
-	cp /opt/ngircd/share/doc/ngircd/sample-ngircd.conf \
-	 /opt/ngircd/etc/ngircd.conf || exit 1
-else
-	echo "/opt/ngircd/etc/ngircd.conf exists. Don't copy sample file."
-fi
-chmod o-rwx /opt/ngircd/etc/ngircd.conf
-
-if [ ! -e /opt/ngircd/etc/ngircd.pam ]; then
-	echo "Creating default PAM configuration: /opt/ngircd/etc/ngircd.pam"
-	echo "# PAM configuration for ngIRCd" >/opt/ngircd/etc/ngircd.pam
-	echo "" >>/opt/ngircd/etc/ngircd.pam
-	echo "auth required pam_permit.so" >>/opt/ngircd/etc/ngircd.pam
-	echo "#auth required pam_opendirectory.so" >>/opt/ngircd/etc/ngircd.pam
-fi
-chmod 644 /opt/ngircd/etc/ngircd.pam
-
-if [ ! -e /etc/pam.d/ngircd ]; then
-	echo "Linkint /opt/ngircd/etc/ngircd.pam to /etc/pam.d/ngircd"
-	ln -s /opt/ngircd/etc/ngircd.pam /etc/pam.d/ngircd || exit 1
-fi
-
-if [ -f "$LDPLIST" ]; then
-	echo "Fixing ownership and permissions of LaunchDaemon script ..."
-	chown root:wheel "$LDPLIST" || exit 1
-	chmod 644 "$LDPLIST" || exit 1
-fi
-
-if [ -f /tmp/ngircd_needs_restart ]; then
-	echo "ngIRCd should be (re-)started ..."
-	if [ -r "$LDPLIST" ]; then
-		echo "LaunchDaemon script found, starting daemon ..."
-		launchctl load -w "$LDPLIST" || exit 1
-		echo "OK, LaunchDaemon script loaded successfully."
-	else
-		echo "LaunchDaemon script not installed. Can't start daemon."
-	fi
-else
-	echo "Not loading LaunchDaemon script."
-fi
-rm -f /tmp/ngircd_needs_restart
-
-# -eof-

+ 0 - 25
contrib/MacOSX/preinstall.sh

@@ -1,25 +0,0 @@
-#!/bin/sh
-# ngIRCd Mac OS X preinstall/preupgrade script
-
-LDPLIST="/Library/LaunchDaemons/de.barton.ngircd.plist"
-
-rm -f /tmp/ngircd_needs_restart || exit 1
-if [ -r "$LDPLIST" ]; then
-	echo "LaunchDaemon script found, checking status ..."
-	launchctl list | fgrep "de.barton.ngIRCd" >/dev/null 2>&1
-	if [ $? -eq 0 ]; then
-		# ngIRCd is already running; stop it and touch a
-		# "stamp file" so that we know that we have to
-		# restart it after installation/upgrade.
-		echo "ngIRCd is already running; stop it ..."
-		launchctl unload "$LDPLIST" || exit 1
-		echo "Daemon has been stopped."
-		touch /tmp/ngircd_needs_restart || exit 1
-	else
-		echo "ngIRCd is not running."
-	fi
-else
-	echo "LaunchDaemon script not found."
-fi
-
-# -eof-

+ 5 - 3
contrib/Makefile.am

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2020 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -9,10 +9,12 @@
 # Please read the file COPYING, README and AUTHORS for more information.
 #
 
-SUBDIRS = Debian MacOSX
+SUBDIRS = Debian
 
-EXTRA_DIST = README \
+EXTRA_DIST = README.md \
 	de.barton.ngircd.metainfo.xml \
+	de.barton.ngircd.plist \
+	Dockerfile \
 	ngindent.sh \
 	ngircd-bsd.sh \
 	ngIRCd-Logo.gif \

+ 6 - 4
contrib/Makefile.in

@@ -17,7 +17,7 @@
 
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2020 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -62,7 +62,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = contrib
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -231,9 +231,11 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-SUBDIRS = Debian MacOSX
-EXTRA_DIST = README \
+SUBDIRS = Debian
+EXTRA_DIST = README.md \
 	de.barton.ngircd.metainfo.xml \
+	de.barton.ngircd.plist \
+	Dockerfile \
 	ngindent.sh \
 	ngircd-bsd.sh \
 	ngIRCd-Logo.gif \

+ 0 - 49
contrib/README

@@ -1,49 +0,0 @@
-
-                     ngIRCd - Next Generation IRC Server
-                           http://ngircd.barton.de/
-
-               (c)2001-2020 Alexander Barton and Contributors.
-               ngIRCd is free software and published under the
-                   terms of the GNU General Public License.
-
-                             -- Contributions --
-
-
-Debian/
- - Various files for building Debian GNU/Linux packages (".deb's").
-	- ngircd.init; ngircd.default: init script for Debian-based systems.
-	- ngircd.pam: example PAM configuration.
-
-MacOSX/
- - Project files for XCode, the "project builder" of Apple Mac OS X.
-	- de.barton.ngircd.plist[.tmpl]: launchd(8) property list.
-
-de.barton.ngircd.metainfo.xml
- - AppStream metadata file.
-
-ngindent.sh
- - Script to indent the code of ngIRCd in the "standard way".
-
-ngircd-bsd.sh
- - Start script for FreeBSD.
-
-ngircd-redhat.init
- - Start/stop script for RedHat-based distributions (like CentOS).
-
-ngircd.logcheck
- - Sample rules for logcheck(8) to ignore "normal" log messages of ngIRCd.
-
-ngircd.service
- - systemd(8) service unit configuration file.
-
-ngircd.socket
- - systemd(8) socket unit configuration file for "socket activation".
-
-ngircd.spec
- - RPM "spec" file.
-
-nglog.sh
- - Colorizes the log messages of ngircd(8) accoring to their log level.
-
-platformtest.sh
- - Build ngIRCd and output a "result line" suitable for doc/Platforms.txt.

+ 38 - 0
contrib/README.md

@@ -0,0 +1,38 @@
+# [ngIRCd](https://ngircd.barton.de) - Supplemental Files
+
+This `contrib/` directory contains the following sub-folders and files:
+
+- `Debian/` folder: This subfolder contains the _rules_ file and additional
+  assets for building Debian packages.
+
+- `de.barton.ngircd.metainfo.xml`: AppStream metadata file.
+
+- `de.barton.ngircd.plist[.tmpl]`: launchd(8) property list file.
+
+- `Dockerfile`: Container definition file, for Docker or Podman for example.
+  More information can be found in the `doc/Container.md` file.
+
+- `ngindent.sh`: Script to indent the code of ngIRCd in the "standard way".
+
+- `ngircd-bsd.sh`: Start/stop script for FreeBSD.
+
+- `ngircd-redhat.init`: Start/stop script for old(er) RedHat-based
+  distributions (like CentOS and Fedora), which did _not_ use systemd(8).
+
+- `ngIRCd-Logo.gif`: The ngIRCd logo as GIF file.
+
+- `ngircd.logcheck`: Sample rules for logcheck(8) to ignore "normal" log
+  messages of ngIRCd.
+
+- `ngircd.service`: systemd(8) service unit configuration file.
+
+- `ngircd.socket`: systemd(8) socket unit configuration file for "socket
+  activation".
+
+- `ngircd.spec`: RPM "spec" file.
+
+- `nglog.sh`: Script for colorizing the log messages of ngircd(8) according to
+  their log level. Example: `./src/ngircd/ngircd -n | ./contrib/nglog.sh`.
+
+- `platformtest.sh`: Build ngIRCd and output a "result line" suitable for
+  the `doc/Platforms.txt` file.

+ 3 - 2
contrib/de.barton.ngircd.metainfo.xml

@@ -9,8 +9,8 @@
 	<update_contact>alex@barton.de</update_contact>
 	<description>
 		<p>ngIRCd is a free, portable and lightweight Internet Relay Chat server for small or private networks, developed under the GNU General Public License (GPL).</p>
-		<p>The server is quite easy to configure, can handle dynamic IP addresses, and optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for user authentication as well as character set conversion for legacy clients. The server has been written from scratch and is not based on the "forefather", the daemon of the IRCNet.</p>
-		<p>The name ngIRCd means next-generation IRC daemon, which is a little bit exaggerated: lightweight Internet Relay Chat server most probably would have been a better name :-)</p>
+		<p>The server is quite easy to configure and runs as a single-node server or can be part of a network of ngIRCd servers in a LAN or across the internet. It optionally supports the IPv6 protocol, SSL/TLS-protected client-server and server-server links, the Pluggable Authentication Modules (PAM) system for user authentication, IDENT requests, and character set conversion for legacy clients.</p>
+		<p>The name ngIRCd stands for next-generation IRC daemon, which is a little bit exaggerated: lightweight Internet Relay Chat server most probably would have been a better name :-)</p>
 	</description>
 	<icon type="remote" width="300" height="300">https://ngircd.barton.de/common/ngircd-300x300.png</icon>
 	<categories>
@@ -24,6 +24,7 @@
 	</provides>
 	<launchable type="service">ngircd</launchable>
 	<releases>
+		<release version="27~rc1" date="2024-04-13" />
 		<release version="26.1" date="2021-01-02" />
 		<release version="26" date="2020-06-20" />
 		<release version="26~rc2" date="2020-06-11" type="development" />

+ 1 - 1
contrib/MacOSX/de.barton.ngircd.plist.tmpl

@@ -10,7 +10,7 @@
 	<string>de.barton.ngIRCd</string>
 	<key>ProgramArguments</key>
 	<array>
-		<string>:SBINDIR:/ngircd</string>
+		<string>/opt/ngircd/sbin/ngircd</string>
 		<string>--nodaemon</string>
 	</array>
 	<key>RunAtLoad</key>

+ 40 - 47
contrib/ngircd.logcheck

@@ -1,61 +1,54 @@
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: ".*" added ".*" to G-Line list: ".*" \([0-9]+ seconds\)\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: (GnuTLS|OpenSSL) .* initialized\.$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Accepted connection [0-9]+ from ".*:[0-9]+" on socket [0-9]+\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve address ".*": Name or service not known \[.*\]\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve ".*": host not found$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve ".*": Name or service not known$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve ".*": No address associated with hostname$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Can't connect\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Client closed connection\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Got QUIT command\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Read error\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): SSL accept error, closing socket\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client ".*" unregistered (connection [0-9]+): Timeout\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Timeout\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Write error\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized SSL3\.0 using cipher .*\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized TLS1\.[012] using cipher .*\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized TLSv1\.[012] using cipher .*\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized TLSv1 using cipher .*\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Address mismatch:
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't create pre-defined channel ".*": name already in use\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve( address)? ".*": (Name or service not known|No address associated with hostname|Temporary failure in name resolution)( \[.*\]\.)?$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client( ".*")? unregistered \(connection [0-9]+\): (Can't connect|Client closed connection|Got QUIT command|Read error|Server configuration already in use|SSL accept error, closing socket|Timeout|Write error)\.$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+ \(socket [0-9]+\) with ".*:[0-9]+" established\. Now logging in \.\.\.$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+ with ".*:[0-9]+" closed \(in: .*, out: .*\)\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized TLSv?1\.[0123] using cipher .*\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Created pre-defined channel ".*", mode ".*" \((channel key set|no channel key), user limit [0-9]+\)\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Deleted ".*" \(".*"\) from G-Line list \(expired\)\.$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Enabled link compression \(zlib\) on connection [0-9]+\.$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Establishing connection for ".*" to ".*:[0-9]+" \(.*\), socket [0-9]+ \.\.\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: IDENT lookup for connection [0-9]+: ".*"\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: IDENT lookup for connection [0-9]+: no result\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: File descriptor limit is [0-9]+; "MaxConnections" is (not set|set to [0-9]+)\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Got (valid server|unchecked peer) certificate: .*\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Got signal "(Hangup|Terminated)" \.\.\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Got valid OPER for ".*" from ".*", user is an IRC operator now\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: IDENT lookup for connection [0-9]+: (no result|".*")\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: IO subsystem: epoll \(hint size 100, initial maxfd 100, masterfd [0-9]+\)\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Not running with changed root directory\.$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Now listening on .*:[0-9]+ \(socket [0-9]+\)\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: OpenSSL .* initialized\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Possible forgery: .* resolved to ".*", which has no IP address!$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Peer did not present a certificate\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Peer on connection [0-9]+ announces itself as .* using protocol .* \(flags: ".*"\)\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Possible forgery: .* resolved to ".*", which (has no IP address|points to a different address)!$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Preparing to establish a new server link for ".*" \.\.\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Re-reading configuration NOW!$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Re-reading of configuration done\.$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Read error on connection [0-9]+ \(socket [0-9]+\): Connection reset by peer!$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Running as user .*, group .*, with PID [0-9]+\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL connection on socket [0-9]+ failed!$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error, client disconnected \[in .*\(\)\]!$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: (Connection reset by peer|Broken pipe) \[in .*\]!$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL protocol error: (ConnSSL_Read|ConnSSL_Write|SSL_accept) \(.*\)$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server ".*" \(on ".*"\) ready\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server ".*" registered \(connection [0-9]+, 1 hop - direct link\)\.$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server ".*" registered \(via .*, connected to .*, [0-9]+ hops\)\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server ".*" unregistered \(connection [0-9]+\): Ping timeout: [0-9]+ seconds\.
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server ".*" unregistered( \(connection [0-9]+\))?: .* \(Server going down\)\.
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server ".*" unregistered: .* .*\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server ".*" unregistered: ".*" \(SQUIT from .*\)\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server \".*\" \(on ".*"\) ready\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server going down NOW!$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down all listening sockets \([0-9]+ total\) \.\.\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Can't connect\) with ".*:[0-9]+" \.\.\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Client closed connection\) with ".*:[0-9]+" \.\.\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Got QUIT command\) with ".*:[0-9]+" \.\.\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Ping timeout: [0-9]+ seconds\) with ".*:[0-9]+" \.\.\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Read error\) with ".*:[0-9]+" \.\.\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Server going down\) with ".*:[0-9]+" \.\.\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(SSL accept error, closing socket\) with ".*:[0-9]+" \.\.\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Timeout\) with ".*:[0-9]+" \.\.\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Write error\) with ".*:[0-9]+" \.\.\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL connection [0-9]+ shutting down \.\.\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL connection [0-9]+ with ".*:[0-9]+" established\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL connection on socket [0-9]+ failed!$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: A TLS packet with unexpected length was received\. \[ConnSSL_Read\]\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: A TLS packet with unexpected length was received\. \[gnutls_handshake\]\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: Broken pipe \[in ConnSSL_Write\(\)\]!$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: Connection reset by peer \[in ConnSSL_Read\(\)\]!$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: Connection reset by peer \[in SSL_connect\(\)\]!$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL protocol error: SSL_accept \(.*\)$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Can't connect|Client closed connection|Closing connection: .* \(Server going down\)|Got QUIT command|ID ".*" already registered|Ping timeout: [0-9]+ seconds|Read error|SSL accept error, closing socket|Server configuration already in use|Server going down|Timeout|Write error|".*" \((G-Line|SQUIT from .*)\)\) with ".*:[0-9]+" \.\.\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Synchronization with ".*" done \(connection [0-9]+\): [0-9]+ seconds? \[[0-9]+ users, [0-9]+ channels\]\.$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" changed nick \(connection [0-9]+\): ".*" -> ".*"\.$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" registered \(connection [0-9]+\)\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Client closed connection\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Got QUIT command\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Ping timeout: [0-9]+ seconds\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Read error\.$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Server going down\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): (Client closed connection|Got QUIT command|Ping timeout: [0-9]+ seconds|Read error|Server going down)\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Using (default|specified) configuration file ".*" \.\.\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Write error on connection [0-9]+ \(socket [0-9]+\): (Broken pipe|Connection reset by peer)!$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: ngIRCd [0-9].* starting \.\.\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: ngIRCd done, served [0-9]+ connections?\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: warning: /etc/hosts\.allow, line [0-9]+: (can't verify hostname|host name/address mismatch): getaddrinfo\(.*, AF_INET\) failed$
 ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: warning: can't get client address: Connection reset by peer$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: warning: /etc/hosts\.allow, line [0-9]+: can't verify hostname: getaddrinfo\(.*, AF_INET\) failed$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Write error on connection [0-9]+ \(socket [0-9]+\): Broken pipe!$
-^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Write error on connection [0-9]+ \(socket [0-9]+\): Connection reset by peer!$

+ 9 - 4
contrib/ngircd.service

@@ -6,12 +6,12 @@ Description=Next Generation IRC Daemon
 Documentation=man:ngircd(8) man:ngircd.conf(5) https://ngircd.barton.de
 After=network.target
 Wants=anope.service atheme.service irc-services.service
-Wants=bopm.service
+Wants=bopm.service hopm.service
 Before=anope.service atheme.service irc-services.service
-Before=bopm.service
+Before=bopm.service hopm.service
 
 [Service]
-Type=forking
+Type=notify
 User=irc
 Group=irc
 # Settings & limits:
@@ -29,14 +29,19 @@ RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
 RestrictRealtime=yes
 RuntimeDirectory=ircd
 RuntimeDirectoryMode=750
+StandardError=journal
+StandardOutput=journal
 # Try to load "default files" from any Debian package variant to keep this
 # unit generic.
 EnvironmentFile=-/etc/default/ngircd
 EnvironmentFile=-/etc/default/ngircd-full
 EnvironmentFile=-/etc/default/ngircd-full-dbg
 # Start ngIRCd. Note: systemd doesn't allow to use $DAEMON here!
-ExecStart=/usr/sbin/ngircd $PARAMS
+ExecStart=/usr/sbin/ngircd --nodaemon --syslog $PARAMS
 ExecReload=/bin/kill -HUP $MAINPID
+# Error handling:
+# ngIRCd tries to "ping" the service manager every 3 seconds.
+WatchdogSec=10
 Restart=on-failure
 
 [Install]

+ 2 - 2
contrib/ngircd.spec

@@ -1,5 +1,5 @@
 %define name    ngircd
-%define version 26.1
+%define version 27~rc1
 %define release 1
 %define prefix  %{_prefix}
 
@@ -50,7 +50,7 @@ make %{?_smp_mflags}
 
 %files
 %defattr(755,root,root)
-%doc AUTHORS COPYING ChangeLog INSTALL.md NEWS README.md doc/*
+%doc AUTHORS.md COPYING ChangeLog INSTALL.md NEWS README.md doc/*
 %config(noreplace) /etc
 %{_prefix}/sbin
 %{_mandir}/man5/ngircd.conf*

+ 1 - 1
contrib/nglog.sh

@@ -10,7 +10,7 @@
 # Please read the file COPYING, README and AUTHORS for more information.
 #
 # This script parses the log output of ngircd(8), and colorizes the messages
-# accoring to their log level. Example usage:
+# according to their log level. Example usage:
 # ./src/ngircd/ngircd -f $PWD/doc/sample-ngircd.conf -np | ./contrib/nglog.sh
 #
 

+ 1 - 1
contrib/platformtest.sh

@@ -12,7 +12,7 @@
 
 # This script analyzes the build process of ngIRCd and generates output
 # suitable for inclusion in doc/Platforms.txt -- please send reports
-# to the ngIRCd mailing list: <ngircd-ml@ngircd.barton.de>.
+# to the ngIRCd mailing list: <ngircd@lists.barton.de>.
 
 NAME=$(basename "$0")
 VERBOSE=

+ 83 - 0
doc/Container.md

@@ -0,0 +1,83 @@
+# [ngIRCd](https://ngircd.barton.de) - Container How-To
+
+The ngIRCd daemon can be run as a containerized application, for example using
+Docker or Podman (the latter being preferred and used in the examples below).
+The container definition file, also known as "Docker file", is bundled with this
+distribution as `contrib/Dockerfile` and based on the official "stable-slim"
+container of the Debian project (see https://hub.docker.com/_/debian).
+
+## Building the container
+
+You can use the following command to build the ngIRCd container image:
+
+```bash
+podman build --format=docker -f contrib/Dockerfile .
+```
+
+The `Dockerfile` includes a `HEALTHCHECK` directive, which is not supported by
+the default OCI 1.0 image format, therefore we use the "docker" format here.
+
+If you are using Git, you can tag the built image like this (use the ID of the
+newly built image!):
+
+```bash
+tag=$(git describe --tags | sed 's/rel-//g')
+podman tag <container_id> "ngircd:${tag}"
+```
+
+## Running the container
+
+You can use this command to run the ngIRCd container using Podman, for example:
+
+```bash
+podman run --name=ngircd --detach \
+  -p 127.0.0.1:6667:6667 \
+  ngircd:<tag>
+```
+
+This creates and starts a new container named "ngircd" from the image
+"ngircd:<tag>" (you habe to substitute _<tag>_ with the real tag name here!) and
+maps the host port 6667 on localhost to the port 6667 inside of the container.
+
+### Configuring the container
+
+The ngIRCd inside of the container is installed inside of `/opt/ngircd/` and the
+default drop-in directory is `/opt/ngircd/etc/ngircd.conf.d`. Therefore you can
+map a host folder to this drop-in directory inside of the container and place
+drop-in configuration file(s) in the host path like this:
+
+```bash
+mkdir -p /host/path/to/ngircd/conf.d
+touch /host/path/to/ngircd/conf.d/my.conf
+podman run --name=ngircd --detach \
+  -p 127.0.0.1:6667:6667 \
+  -v "/host/path/to/ngircd/conf.d:/opt/ngircd/etc/ngircd.conf.d" \
+  ngircd:<tag>
+```
+
+### Testing the configuration
+
+As with the native daemon, it is a very good idea to validate the configuration
+of the daemon after making changes.
+
+With Docker and Podman, you can pass arguments to the `ngircd` binary inside of
+the container by simply appending it to the "run" command line like this:
+
+```bash
+podman run --rm -it \
+  -v "/host/path/to/ngircd/conf.d:/opt/ngircd/etc/ngircd.conf.d" \
+  ngircd:<tag> \
+  --configtest
+```
+
+### Reloading the daemon configuration in a running container
+
+To activate changed configuration of ngIRCd, you can either restart the
+container (which will disconnect all currently connected clients) or signal
+`ngircd`(8) inside of the running container to reload its configuration file(s).
+
+The latter can be done with this command, for example:
+
+```bash
+podman exec -it ngircd /bin/bash -c 'kill -HUP $(/usr/bin/pidof -s ngircd)'
+```

+ 176 - 0
doc/FAQ.md

@@ -0,0 +1,176 @@
+# [ngIRCd](https://ngircd.barton.de) - FAQ, Tips & Tricks
+
+# General
+
+## Is it possible to link ngIRCd with other non-ngIRCd servers?
+
+Yes and no. Back in the beginning (2001, 2002, ...) the server-server protocol
+used by ngIRCd was compatible to the original ircd used by IRCNet at that time,
+version 2.10.3p3. And most probably this is still the case today, although not
+actively tested for a long time.
+
+Please note that newer ircd versions (2.11.x) are *not* compatible any more!
+
+And other server-server protocols were never supported.
+
+## Is there a homepage with further information and downloads?
+
+Yes. Please visit https://ngircd.barton.de :-)
+
+## Why should I use ngIRCd instead of the original one?
+
+The `README.md` file and the [homepage](https://ngircd.barton.de) list a few
+advantages of ngIRCd:
+
+- Well arranged (lean) configuration file.
+- Simple to build, install, configure, and maintain.
+- Supports IPv6 and SSL.
+- Can use PAM for user authentication.
+- Lots of popular user and channel modes are implemented.
+- Supports "cloaking" of users.
+- No problems with servers that have dynamic IP addresses.
+- Freely available, modern, portable and tidy C source.
+- Wide field of supported platforms, including AIX, A/UX, FreeBSD, HP-UX,
+  IRIX, Linux, macOS, NetBSD, OpenBSD, Solaris and Windows with WSL or Cygwin.
+
+# Building and Compilation
+
+## The `./configure` script is missing in the source directory!?
+
+When using sources checked out via *Git*, the `configure` script as well as the
+`Makefile.in` templates must be generated using the GNU *automake*, *autoconf*
+and *pkg-config* tools. To simplify this task run the `./autogen.sh` script
+which will execute the required commands for you; then continue with executing
+the `./configure` script as usual.
+
+Please see the `INSTALL.md` file for details!
+
+## Error message `aclocal: command not found`
+
+GNU *automake* is missing on your system but required for building Git versions
+of ngIRCd. Install GNU automake 1.6 or later and try again.
+
+## Error message `autoheader: command not found`?
+
+GNU *autoconf* is missing on your system but required for building Git versions
+of ngIRCd. Install GNU autoconf 2.52 or later and try again.
+
+## Error message `automake: configure.in: AM_INIT_AUTOMAKE must be used`?
+
+Most probably you are using version 1.5 of GNU automake which seems to be
+incompatible to the build system of ngIRCd. Solution: upgrade to at least
+version 1.6 of GNU automake.
+
+(If you are using Debian 3.0 "Woody" you can try to downgrade to version 1.4 of
+GNU automake shipped with this distribution; it should work, too.)
+
+# Troubleshooting ngIRCd Runtime Issues
+
+Always start with:
+
+1.  Make sure that ngIRCd parsed its configuration file as it was intended!
+    Run `ngircd --configest` and double-check its output!
+
+2.  Check the logs of your system, especially the entries generated by ngIRCd!
+    Where you can find the log messages depends on your system and your setup:
+    it can be plain text files in `/var/log/` (syslog) or the systemd journal
+    database, for example.
+
+3.  Ensure that the daemon started up successfully, is actually running and did
+    not stop/crash in the meantime. You can check this with your service
+    manager (like `systemctl status ngircd` on Linux systems using systemd) or
+    using `pgrep -l ngircd` to check for "ngircd" processes. If ngIRCd is not
+    running, try to restart the service and check the service status and the
+    logs (syslog, systemd journal) again!
+
+## Where is the log file stored?
+
+See introduction to this section above :-)
+
+## "Connection refused" errors
+
+1.  Is the daemon really running? See introduction to this section above!
+
+2.  Does ngIRCd listen on the correct interface(s) and port(s)? On Linux, you
+    can check this with `sudo ss -ltnp|awk '/ngircd/{print $4}`, for example.
+    Check your `Listen` and `Ports` settings in the `[Global]` (and `[SSL]`)
+    sections and the startup messages of the daemon, especially the lines
+    stating "Now listening on xxx:yyy (socket zzz)"!
+
+3.  Are you able to connect to the ngIRCd service locally from the system the
+    daemon runs on? Test all the interface IP addresses you expect ngIRCd to
+    listen on, for example with a regular IRC client or tools like `telnet` or
+    `nc` ("net cat"): `telnet localhost 6667`, `nc 192.168.1.2 6667`, ...
+
+    If all the above works as expected, the issue most probably is not with
+    ngIRCd or its configuration but the network layer.
+
+4.  Are the port(s) ngIRCd listens on open and not blocked by a firewall? Check
+    the logs of your firewall solution (on the server itself and all firewalls
+    "in front of it") and use tools like `tcpdump` to check the network layer!
+
+## Issues related to running ngIRCd inside of a `chroot` environment
+
+**I cannot connect to remote peers when I use the chroot option, the following
+is logged: `Can't resolve example.com: unknown error!`**
+
+See next question blow ...
+
+**When running ngIRCd inside a chroot, no IP addresses can be translated in DNS
+names, errors like "Name or service not known" are logged!**
+
+On Linux/glibc with chroot enabled you need to put some libraries inside
+the chroot as well, notably `libnss_dns`; maybe others. Unfortunately, even
+linking ngIRCd statically does not help this. So you can either copy
+all the required files into the chroot directory:
+
+``` bash
+mkdir -p ./chroot/etc ./chroot/lib
+cp -a /etc/hosts /etc/resolv.conf /etc/nsswitch.conf ./chroot/etc/
+cp -a /lib/libresolv* /lib/libnss_* ./chroot/lib/
+```
+
+Or you can try to link ngIRCd against an other C library (like dietlibc) that do
+not depend on NSS modules and these files.
+
+# IRC Features
+
+## I have added an `[Oper]` section, but how do I log in as an IRC operator?
+
+You can use the `/OPER <name> <password>` command in your IRC client to become
+an IRC operator as defined in an `[Oper]` block in your configuration file.
+
+ngIRCd will also log all OPER requests (using syslog), and if an OPER command
+fails you can look there to determine why it did not work (bad password,
+unauthorized host mask, ...).
+
+Please keep in mind that the "name" in the `/OPER` command is *not* related to
+your nick name at all!
+
+## I am an IRC operator, but MODE doesn't work!
+
+By default, IRC operators are still not allowed to use `/MODE` globally.
+
+If you set `OperCanUseMode = yes` in your configuration, then IRC operators can
+use the `/MODE` command for changing modes even when they are not joined to the
+specific channel.
+
+## How can I "auto-op" users in channels?
+
+ngIRCd can't do this: you would have to use some "IRC Services", like
+[Atheme](http://atheme.net/atheme.html) or [Anope](http://www.anope.org).
+
+See `doc/Services.txt` for setup instructions.
+
+# Bugs!?
+
+## Is there a list of known bugs and desired feature enhancements?
+
+Yes. Have a look at the bug tracking system (GitHub issues) for ngIRCd located
+at <https://github.com/ngircd/ngircd/issues>. There you can file bug reports and
+feature requests as well as search the bug database.
+
+## What should I do if I found a bug?
+
+Please file a bug report at <https://github.com/ngircd/ngircd/issues/new>!
+The authors will be notified automagically :-)

+ 0 - 109
doc/FAQ.txt

@@ -1,109 +0,0 @@
-
-                     ngIRCd - Next Generation IRC Server
-
-                      (c)2001-2010 by Alexander Barton,
-                    alex@barton.de, http://www.barton.de/
-
-               ngIRCd is free software and published under the
-                   terms of the GNU General Public License.
-
-                    -- FAQ: Frequently Asked Questions --
-
-
-I. General
-~~~~~~~~~~
-
-Q: Is it possible to link the ngIRCd with non-ngIRCd servers?
-A: Yes. ngIRCd is compatible to the original ircd used by IRCNet. Actually
-   this is being tested with version 2.10.3p3. Please note that newer
-   versions (2.11.x) aren't compatible any more!
-
-Q: Is there a homepage with further information and downloads?
-A: Yes. Please visit <http://ngircd.barton.de/>.
-
-Q: Why should I use ngIRCd instead of the original one?
-A: ngIRCd offers several benefits: no problems with dynamic IPs, easy to
-   configure, open source (GPL), under active development.
-
-
-II. Compilation
-~~~~~~~~~~~~~~~
-
-Q: I did a "Git checkout" but can't execute ./configure because the script
-   is missing in the generated directory!?
-A: When using development versions via Git, the configure script as well as
-   the Makefile.in templates must be generated using GNU automake and GNU
-   autoconf. To simplify this task run the ./autogen.sh script which will
-   execute the required tools for you; then continue with executing the
-   ./configure script as usual.
-
-Q: The ./autogen.sh script complains "aclocal: command not found".
-A: GNU automake is missing on your system but required for building Git
-   versions of ngIRCd. Install GNU automake 1.6 or later and try again.
-
-Q: The ./autogen.sh script stops with "autoheader: command not found".
-A: GNU autoconf is missing on your system but required for building Git
-   versions of ngIRCd. Install GNU autoconf 2.52 or later and try again.
-
-Q: The ./autogen.sh script fails and the message "automake: configure.in:
-   AM_INIT_AUTOMAKE must be used" is displayed.
-A: Most probably you are using version 1.5 of GNU automake which seems to be
-   incompatible to the build system of ngIRCd. Solution: upgrade to at least
-   version 1.6 of GNU automake.
-   (If you are using Debian 3.0 "Woody" you can try to downgrade to version
-   1.4 of GNU automake shipped with this distribution; it should work, too.)
-
-
-III. Runtime
-~~~~~~~~~~~~
-
-Q: Where is the log file located?
-A: ngIRCd does not write its own log file. Instead, ngIRCd uses syslog(3).
-   Check the files in /var/log/ and/or consult the documentation for your
-   system logger daemon.
-
-Q: I cannot connect to remote peers when I use the chroot option, the
-   following is logged: "Can't resolve example.com: unknown error!".
-A: see next question blow ...
-
-Q: When running ngIRCd inside a chroot, no IP addresses can be translated
-   in DNS names, errors like "Name or service not known" are logged.
-A: On Linux/glibc with chroot enabled you need to put some libraries inside
-   the chroot as well, notably libnss_dns; maybe others. Unfortunately, even
-   linking ngIRCd statically does not help this. So you can either copy
-   all the required files into the chroot directory:
-     $ mkdir -p ./chroot/etc ./chroot/lib
-     $ cp -a /etc/hosts /etc/resolv.conf /etc/nsswitch.conf ./chroot/etc/
-     $ cp -a /lib/libresolv* /lib/libnss_* ./chroot/lib/
-   Or you can try to link ngIRCd against an other C library (like dietlibc)
-   that doesn't depend on NSS modules and/or these files.
-
-Q: I have added an [Oper] section, how do i log on as IRC operator?
-A: You can use the /OPER command in your IRC client to become an IRC operator.
-   ngIRCd will also log all OPER requests (using syslog), if OPER fails you
-   can look there to determine why it did not work (bad password, unauthorized
-   host mask, etc.)
-
-Q: I am an IRC operator, but MODE doesn't work!
-A: You need to set 'OperCanUseMode = yes' in ngircd.conf, then IRC operators
-   can use the MODE command for changing modes even when they are not joined
-   to the specific channel.
-
-Q: How can I "auto-op" users in channels?
-A: ngIRCd can't do this: you would have to use some "IRC Services", like
-   Atheme (<http://atheme.net/atheme.html>) or Anope (<http://www.anope.org>).
-   See "doc/Services.txt" for setup instructions.
-
-
-IV. Bugs!?
-~~~~~~~~~~
-
-Q: Is there a list of known bugs and desired feature enhancements?
-A: Yes. Have a look at the bug tracking system (GitHub issues) for ngIRCd located
-   at <https://github.com/ngircd/ngircd/issues>. There you can file bug
-   reports and feature requests as well as search the bug database.
-
-Q: What should I do if I found a bug?
-A: Please file a bug report at <https://github.com/ngircd/ngircd/issues/new>!
-   The author will be notified automagically :-)
-

+ 7 - 6
doc/HowToRelease.txt

@@ -2,7 +2,7 @@
                      ngIRCd - Next Generation IRC Server
                            http://ngircd.barton.de/
 
-               (c)2001-2021 Alexander Barton and Contributors.
+               (c)2001-2024 Alexander Barton and Contributors.
                ngIRCd is free software and published under the
                    terms of the GNU General Public License.
 
@@ -46,9 +46,10 @@ b) Make sure the source tree is in a releasable state ;-)
     - Are all branches & patches merged? Check GitHub issues, pull requests
       and milestones!
     - Run as many tests as you can!
-    - Is the AUTHORS file up to date? This command may be helpful:
-      "( grep '>$' AUTHORS; git shortlog -se | cut -c8- ) | grep -Ev \
-       '(alex@barton.de|fw@strlen.de)' | LC_ALL=de_DE.UTF-8 sort -u"
+    - Is the AUTHORS.md file up to date? This command may be helpful:
+      "( grep '>$' AUTHORS.md; git shortlog -se|cut -c8-|sed 's/^/- /' ) \
+        | grep -Ev '(alex@barton.de|fw@strlen.de)' \
+        | LC_ALL=de_DE.UTF-8 sort -u"
 
 c) Update the files describing the new release:
     - ChangeLog
@@ -73,8 +74,8 @@ h) Run "./autogen.sh" to update the ./configure script with the correct
 
 i) Run "./configure" to rebuild all generated Makefiles.
 
-j) Run "make distcheck" (and "make dist-tarZ dist-xz") to generate all of the
-   distribution archives.
+j) Run "make distcheck" (and "make dist-tarZ && make dist-xz") to generate all
+   of the distribution archives.
 
 k) Sign the distribution archive(s) using GnuPG: "gpg -b <archivefile>"
 

+ 6 - 8
doc/Makefile.am

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2020 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,8 +21,9 @@ static_docs = \
 	Bopm.txt \
 	Capabilities.txt \
 	Commands.txt \
+	Container.md \
 	Contributing.txt \
-	FAQ.txt \
+	FAQ.md \
 	HowToRelease.txt \
 	Modes.txt \
 	PAM.txt \
@@ -33,13 +34,13 @@ static_docs = \
 	README-Interix.txt \
 	RFC.txt \
 	Services.txt \
-	SSL.txt
+	SSL.md
 
 doc_templates = sample-ngircd.conf.tmpl
 
 generated_docs = sample-ngircd.conf
 
-toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL.md ../NEWS ../README.md
+toplevel_docs = ../AUTHORS.md ../COPYING ../ChangeLog ../INSTALL.md ../NEWS ../README.md
 
 SUBDIRS = src
 
@@ -86,9 +87,6 @@ uninstall-hook:
 uninstall-config:
 	rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf
 
-srcdoc:
-	${MAKE} -C src srcdoc
-
-.PHONY: install-config uninstall-config srcdoc
+.PHONY: install-config uninstall-config
 
 # -eof-

+ 6 - 8
doc/Makefile.in

@@ -17,7 +17,7 @@
 
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2020 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -236,8 +236,9 @@ static_docs = \
 	Bopm.txt \
 	Capabilities.txt \
 	Commands.txt \
+	Container.md \
 	Contributing.txt \
-	FAQ.txt \
+	FAQ.md \
 	HowToRelease.txt \
 	Modes.txt \
 	PAM.txt \
@@ -248,11 +249,11 @@ static_docs = \
 	README-Interix.txt \
 	RFC.txt \
 	Services.txt \
-	SSL.txt
+	SSL.md
 
 doc_templates = sample-ngircd.conf.tmpl
 generated_docs = sample-ngircd.conf
-toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL.md ../NEWS ../README.md
+toplevel_docs = ../AUTHORS.md ../COPYING ../ChangeLog ../INSTALL.md ../NEWS ../README.md
 SUBDIRS = src
 EXTRA_DIST = $(static_docs) $(doc_templates)
 CLEANFILES = $(generated_docs)
@@ -650,10 +651,7 @@ uninstall-hook:
 uninstall-config:
 	rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf
 
-srcdoc:
-	${MAKE} -C src srcdoc
-
-.PHONY: install-config uninstall-config srcdoc
+.PHONY: install-config uninstall-config
 
 # -eof-
 

+ 14 - 5
doc/Platforms.txt

@@ -26,7 +26,8 @@ for inclusion here. Thanks for your help!
                                                                       | | | |
 Platform                    Compiler     ngIRCd     Date     Tester   C M T R *
 --------------------------- ------------ ---------- -------- -------- - - - - -
-aarch64/apple/darwin        A-clang 12.0.0 26       20-12-10 goetz    N Y Y Y 3
+aarch64/apple/darwin        A-clang 12.0 26         20-12-10 goetz    N Y Y Y 3
+aarch64/apple/darwin23.4.0  A-clang 15.0 26.1~131   24-04-01 alex     Y Y Y Y 3
 alpha/unknown/netbsd3.0     gcc 3.3.3    CVSHEAD    06-05-07 fw       Y Y Y Y 3
 armv6l/unk./linux-gnueabi   gcc 4.7.2    20.2       13-03-08 goetz    Y Y Y Y 5
 armv6l/unk./linux-gnueabihf gcc 4.6.3    21~rc2     13-10-26 pi       Y Y Y Y 5
@@ -72,6 +73,7 @@ i686/pc/linux-gnu           gcc 4.3.2    14.1       09-08-04 alex     Y Y Y Y 1
 i686/pc/minix               gcc 4.4.6    21~rc2     13-10-27 alex     Y Y N N
 i686/unknown/gnu0.3         gcc 4.4.5    19         12-02-29 alex     Y Y Y Y
 i686/unknown/gnu0.5         gcc 4.9.1    22~rc1-3   14-10-11 alex     Y Y Y Y
+i686/unknown/gnu0.9         gcc 12.2.0   26.1~131-g 24-04-01 alex     Y Y Y Y
 i686/unkn./kfreebsd7.2-gnu  gcc 4.3.4    15         09-12-02 alex     Y Y Y Y 3
 m68k/apple/aux3.0.1         gcc 2.7.2    17         10-11-07 alex     Y Y N Y
 m68k/apple/aux3.0.1         Orig. A/UX   17         10-11-07 alex     Y Y N Y 2
@@ -103,16 +105,19 @@ x86_64/apple/darwin16.5.0   A-clang 8.1  25~rc1-7-g 18-11-04 alex     Y Y Y Y 3
 x86_64/apple/darwin17.7.0   A-clang 10.0 25~rc1     18-11-04 alex     Y Y Y Y 3
 x86_64/apple/darwin18.2.0   A-clang 10.0 25~rc1-11  19-01-23 alex     Y Y Y Y 3
 x86_64/apple/darwin19.4.0   A-clang 11.0 26~rc1     20-05-10 alex     Y Y Y Y 3
-x86_64/apple/darwin19.6.0   A-clang 12.0.0 26       20-10-20 alex     Y Y Y Y 3
-x86_64/apple/darwin20.1.0   A-clang 12.0.0 26       21-01-01 alex     Y Y Y Y 3
+x86_64/apple/darwin19.6.0   A-clang 12.0 26         20-10-20 alex     Y Y Y Y 3
+x86_64/apple/darwin20.1.0   A-clang 12.0 26         21-01-01 alex     Y Y Y Y 3
+x86_64/apple/darwin23.4.0   A-clang 15.0 26.1~133-g 24-04-03 alex     Y Y Y Y 3
 x86_64/unknown/dragonfly3.4 gcc 4.7.2    21         13-11-12 goetz    Y Y N Y 3
 x86_64/unkn./freebsd8.1-gnu gcc 4.4.5    19         12-02-26 alex     Y Y Y Y 3
 x86_64/unknown/freebsd8.4   gcc 4.2.1    24~rc1-7   17-01-20 alex     Y Y Y Y 3
 x86_64/unknown/freebsd9.2   gcc 4.2.1    22~rc1-3   14-10-10 alex     Y Y Y Y 3
 x86_64/unknown/freebsd10.3  F-clang 3.4  24         17-01-20 goetz    Y Y Y Y 3
 x86_64/unknown/freebsd11.0  F-clang 3.8  24         17-01-21 goetz    Y Y Y Y 3
-x86_64/unknown/freebsd12.1  F-clang 8.0.1 26        20-08-28 alex     Y Y Y Y 3
+x86_64/unknown/freebsd12.1  F-clang 8.0  26         20-08-28 alex     Y Y Y Y 3
+x86_64/unknown/freebsd14.0  F-clang 16.0 26.1~131   24-04-01 alex     Y Y Y Y 3
 x86_64/unknown/haiku        gcc 7.3.0    25~rc1-11  19-01-06 alex     Y Y N Y
+x86_64/unknown/haiku        gcc 13.2.0   26.1~132-g 24-04-02 alex     Y Y Y Y
 x86_64/unknown/linux-gnu    clang 3.3    21         14-01-07 alex     Y Y Y Y 1
 x86_64/unknown/linux-gnu    clang 3.4    22~rc1-3   14-10-11 alex     Y Y Y Y 1
 x86_64/pc/linux-gnu         gcc 4.4.5    24~rc1-7   17-01-20 alex     Y Y Y Y 1
@@ -124,18 +129,22 @@ x86_64/pc/linux-gnu [WSL]   gcc 5.4.0    24         18-03-07 goetz    Y Y y Y 7
 x86_64/pc/linux-gnu         gcc 6.2.1    24~rc1-7   17-01-20 alex     Y Y Y Y 1
 x86_64/pc/linux-gnu         gcc 6.3.0    25~rc1-11  19-01-23 alex     Y Y Y Y 1
 x86_64/pc/linux-gnu         gcc 8.3.0    26         20-08-28 alex     Y Y Y Y 1
+x86_64/pc/linux-gnu         gcc 11.4.0   26.1~133-g 24-04-03 alex     Y Y Y Y 1
+x86_64/pc/linux-gnu         gcc 12.2.0   26.1~132-g 24-04-02 alex     Y Y Y Y 1
 x86_64/unknown/linux-gnu    icc 16       23         16-01-13 goetz    Y Y Y Y 1
 x86_64/unknown/linux-gnu    nwcc 0.8.2   21         13-12-01 goetz    Y Y Y Y 1
 x86_64/unknown/linux-gnu    Open64       21.1       14-03-27 goetz    Y Y Y Y 1
 x86_64/unknown/linux-gnu    Sun C 5.12   21.1       14-03-27 goetz    Y Y Y Y 1
 x86_64/unknown/netbsd9.0    gcc 7.4.0    26         20-08-28 alex     Y Y y Y 3
+x86_64/unknown/netbsd10.0   gcc 10.5.0   26.1~131-g 24-04-01 alex     Y Y Y Y 3
 x86_64/unknown/openbsd4.7   gcc 3.3.5    20~rc1     12-02-26 alex     Y Y Y Y 3
 x86_64/unknown/openbsd4.8   gcc 4.2.1    22~rc1-3   14-10-10 alex     Y Y y Y 3
 x86_64/unknown/openbsd5.1   gcc 4.2.1    21         13-12-28 alex     Y Y Y Y 3
 x86_64/unknown/openbsd5.5   gcc 4.2.1    22~rc1-3   14-10-10 alex     Y Y Y Y 3
 x86_64/unknown/openbsd6.6   gcc 4.2.1    26         20-08-28 alex     Y Y Y Y 3
-x86_64/unknown/openbsd6.6   O-clang 8.0.1 26        20-08-28 alex     Y Y Y Y 3
+x86_64/unknown/openbsd6.6   O-clang 8.0  26         20-08-28 alex     Y Y Y Y 3
 x86_64/unknown/openbsd6.7   gcc 4.2.1    26         20-09-26 goetz    Y Y y Y 3
+x86_64/unknown/openbsd7.4   O-clang 13.0 26.1~131-g 24-04-01 alex     Y Y Y Y 3
 
 
 * Notes

+ 80 - 0
doc/SSL.md

@@ -0,0 +1,80 @@
+# [ngIRCd](https://ngircd.barton.de) - SSL/TLS Encrypted Connections
+
+ngIRCd supports SSL/TLS encrypted connections using the *OpenSSL* or *GnuTLS*
+libraries. Both encrypted server-server links as well as client-server links
+are supported.
+
+SSL is a compile-time option which is disabled by default. Use one of these
+options of the ./configure script to enable it:
+
+- `--with-openssl`: enable SSL support using OpenSSL.
+- `--with-gnutls`: enable SSL support using GnuTLS.
+
+You can check the output of `ngircd --version` to validate if your executable
+includes support for SSL or not: "+SSL" must be listed in the feature flags.
+
+You also need a SSL key and certificate, for example using Let's Encrypt, which
+is out of the scope of this document.
+
+From a feature point of view, ngIRCds support for both libraries is
+comparable. The only major difference (at this time) is that ngIRCd with GnuTLS
+does not support password protected private keys.
+
+## Configuration
+
+SSL-encrypted connections and plain-text connects can't run on the same network
+port (which is a limitation of the IRC protocol); therefore you have to define
+separate port(s) in your `[SSL]` block in the configuration file.
+
+A minimal configuration for *accepting* SSL-encrypted client & server
+connections looks like this:
+
+``` ini
+[SSL]
+CertFile = /etc/ssl/certs/my-fullchain.pem
+KeyFile = /etc/ssl/certs/my-privkey.pem
+Ports = 6697, 6698
+```
+
+In this case, the server only deals with *incoming* connections and never has to
+validate SSL certificates itself, and therefore no "Certificate Authorities" are
+needed.
+
+If you want to use *outgoing* SSL-connections to other servers, you need to add:
+
+``` ini
+[SSL]
+...
+CAFile = /etc/ssl/certs/ca-certificates.crt
+DHFile = /etc/ngircd/dhparams.pem
+
+[SERVER]
+...
+SSLConnect = yes
+```
+
+The `CAFile` option configures a file listing all the certificates of the
+trusted Certificate Authorities.
+
+The Diffie-Hellman parameters file `dhparams.pem` can be created like this:
+
+- OpenSSL: `openssl dhparam -2 -out /etc/ngircd/dhparams.pem 4096`
+- GnuTLS: `certtool --generate-dh-params --bits 4096 --outfile /etc/ngircd/dhparams.pem`
+
+Note that enabling `SSLConnect` not only enforces SSL-encrypted links for
+*outgoing* connections to other servers, but for *incoming* connections as well:
+If a server configured with `SSLConnect = yes` tries to connect on a plain-text
+connection, it won't be accepted to prevent data leakage! Therefore you should
+set this for *all* servers you expect to use SSL-encrypted connections!
+
+## Accepting untrusted Remote Certificates
+
+If you are using self-signed certificates or otherwise invalid certificates,
+which ngIRCd would reject by default, you can force ngIRCd to skip certificate
+validation on a per-server basis and continue establishing outgoing connections
+to the respective peer by setting `SSLVerify = no` in the `[SERVER]` block of
+this remote server in your configuration.
+
+But please think twice before doing so: the established connection is still
+encrypted but the remote site is *not verified at all* and man-in-the-middle
+attacks are possible!

+ 0 - 108
doc/SSL.txt

@@ -1,108 +0,0 @@
-
-                     ngIRCd - Next Generation IRC Server
-
-                        (c)2001-2008 Alexander Barton,
-                    alex@barton.de, http://www.barton.de/
-
-               ngIRCd is free software and published under the
-                   terms of the GNU General Public License.
-
-                                 -- SSL.txt --
-
-
-ngIRCd supports SSL/TLSv1 encrypted connections using the OpenSSL or GnuTLS
-libraries. Both encrypted server-server links as well as client-server links
-are supported.
-
-SSL is a compile-time option which is disabled by default. Use one of these
-options of the ./configure script to enable it:
-
-  --with-openssl     enable SSL support using OpenSSL
-  --with-gnutls      enable SSL support using GnuTLS
-
-You also need a key/certificate, see below for how to create a self-signed one.
-
-From a feature point of view, ngIRCds support for both libraries is
-comparable. The only major difference (at this time) is that ngircd with gnutls
-does not support password protected private keys.
-
-Configuration
-~~~~~~~~~~~~~
-
-To enable SSL connections a separate port must be configured: it is NOT
-possible to handle unencrypted and encrypted connections on the same port!
-This is a limitation of the IRC protocol ...
-
-You have to set (at least) the following configuration variables in the
-[SSL] section of ngircd.conf(5): Ports, KeyFile, and CertFile.
-
-Now IRC clients are able to connect using SSL on the configured port(s).
-(Using port 6697 for encrypted connections is common.)
-
-To enable encrypted server-server links, you have to additionally set
-SSLConnect to "yes" in the corresponding [SERVER] section.
-
-
-Creating a self-signed certificate
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-OpenSSL:
-
-Creating a self-signed certificate and key:
- $ openssl req -newkey rsa:2048 -x509 -keyout server-key.pem -out server-cert.pem -days 1461
-Create DH parameters (optional):
- $ openssl dhparam -2 -out dhparams.pem 4096
-
-GnuTLS:
-
-Creating a self-signed certificate and key:
- $ certtool --generate-privkey --bits 2048 --outfile server-key.pem
- $ certtool --generate-self-signed --load-privkey server-key.pem --outfile server-cert.pem
-Create DH parameters (optional):
- $ certtool  --generate-dh-params --bits 4096 --outfile dhparams.pem
-
-
-Alternate approach using stunnel(1)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Alternatively (or if you are using ngIRCd compiled without support
-for GnuTLS/OpenSSL), you can use external programs/tools like stunnel(1) to
-get SSL encrypted connections:
-
-  <http://stunnel.mirt.net/>
-  <http://www.stunnel.org/>
-
-Stefan Sperling (stefan at binarchy dot net) mailed the following text as a
-short "how-to", thanks Stefan!
-
-=== snip ===
-    ! This guide applies to stunnel 4.x !
-
-    Put this in your stunnel.conf:
-
-        [ircs]
-        accept = 6667
-        connect = 6668
-
-    This makes stunnel listen for incoming connections
-    on port 6667 and forward decrypted data to port 6668.
-    We call the connection 'ircs'. Stunnel will use this
-    name when logging connection attempts via syslog.
-    You can also use the name in /etc/hosts.{allow,deny}
-    if you run tcp-wrappers.
-
-    To make sure ngircd is listening on the port where
-    the decrypted data arrives, set
-
-        Ports = 6668
-
-    in your ngircd.conf.
-
-    Start stunnel and restart ngircd.
-
-    That's it.
-    Don't forget to activate ssl support in your irc client ;)
-    The main drawback of this approach compared to using builtin ssl
-    is that from ngIRCds point of view, all ssl-enabled client connections will
-    originate from the host running stunnel.
-=== snip ===

+ 29 - 6
doc/sample-ngircd.conf.tmpl

@@ -24,8 +24,9 @@
 	# make sure that they correspond to your installation and setup!
 
 	# Server name in the IRC network, must contain at least one dot
-	# (".") and be unique in the IRC network. Required!
-	Name = irc.example.net
+	# (".") and be unique in the IRC network. When not set, ngIRCd tries
+	# to deduce a valid IRC server name from the local host name.
+	;Name = irc.example.net
 
 	# Information about the server and the administrator, used by the
 	# ADMIN command. Not required by server but by RFC!
@@ -34,12 +35,14 @@
 	;AdminEMail = admin@irc.server
 
 	# Text file which contains the ngIRCd help text. This file is required
-	# to display help texts when using the "HELP <cmd>" command.
+	# to display help texts when using the "HELP <cmd>" command. Default: a
+	# built-in standard path (check "ngircd --configtest").
 	;HelpFile = :DOCDIR:/Commands.txt
 
 	# Info text of the server. This will be shown by WHOIS and
-	# LINKS requests for example.
-	Info = Server Info Text
+	# LINKS requests for example. Set to the server software name and
+	# version by default.
+	;Info = Server Info Text
 
 	# Comma separated list of IP addresses on which the server should
 	# listen. Default values are:
@@ -48,7 +51,8 @@
 	;Listen = 127.0.0.1,192.168.0.1
 
 	# Text file with the "message of the day" (MOTD). This message will
-	# be shown to all users connecting to the server:
+	# be shown to all users connecting to the server: Default: a built-in
+	# standard path (check "ngircd --configtest").
 	;MotdFile = :ETCDIR:/ngircd.motd
 
 	# A simple Phrase (<127 chars) if you don't want to use a motd file.
@@ -192,6 +196,9 @@
 
 	# Directory containing configuration snippets (*.conf), that should
 	# be read in after parsing this configuration file.
+	# Default: a built-in directory name when no configuration file was
+	# explicitly given on the command line (check "ngircd --configtest"),
+	# none (empty) otherwise.
 	;IncludeDir = :ETCDIR:/conf.d
 
 	# Enhance user privacy slightly (useful for IRC server on TOR or I2P)
@@ -266,6 +273,13 @@
 	# is only available when ngIRCd is compiled with support for SSL!
 	# So don't forget to remove the ";" above if this is the case ...
 
+	# SSL Trusted CA Certificates File (for verifying peer certificates)
+	;CAFile = /etc/ssl/CA/cacert.pem
+
+	# Certificate Revocation File (for marking otherwise valid
+	# certficates as invalid)
+	;CRLFile = /etc/ssl/CA/crl.pem
+
 	# SSL Server Key Certificate
 	;CertFile = :ETCDIR:/ssl/server-cert.pem
 
@@ -357,6 +371,10 @@
 	# Connect to the remote server using TLS/SSL (Default: false)
 	;SSLConnect = yes
 
+	# Verify the TLS certificate presented by the remote server
+	# (Default: yes)
+	;SSLVerify = yes
+
 	# Define a (case insensitive) list of masks matching nicknames that
 	# should be treated as IRC services when introduced via this remote
 	# server, separated by commas (",").
@@ -391,6 +409,11 @@
 	;Modes = +tnk mykey +l 5
 	;Modes = +b nick!~user@bad.host.example.com
 
+	# Should ngIRCd automatically join ("autojoin") all users to this
+	# channel on connect? Note: The users must have permissions to access
+	# the channel, otherwise joining them will fail!
+	;Autojoin = yes
+
 	# Key file, syntax for each line: "<user>:<nick>:<key>".
 	# Default: none.
 	;KeyFile = :ETCDIR:/#chan.key

+ 4 - 3
doc/src/footer.inc.html

@@ -2,9 +2,10 @@
 <hr class="footer">
 <p style="text-align: center">
   ngIRCd
-  <a href="http://ngircd.barton.de/">Homepage</a>,
-  <a href="http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git">GIT-Repository</a>,
-  <a href="http://ngircd.barton.de/bugzilla/index.cgi">Bug-Tracker</a>.
+  <a href="https://ngircd.barton.de/">Homepage</a>.
+  GitHub:
+  <a href="https://github.com/ngircd/ngircd">Code Repository</a>,
+  <a href="https://github.com/ngircd/ngircd/issues">Bug-Tracker</a>.
 </p>
 
 </body>

+ 47 - 24
man/ngircd.8.tmpl

@@ -1,7 +1,7 @@
 .\"
 .\" ngircd(8) manual page template
 .\"
-.TH ngircd 8 "Jan 2021" ngIRCd "ngIRCd Manual"
+.TH ngircd 8 "Sep 2023" ngIRCd "ngIRCd Manual"
 .SH NAME
 ngIRCd \- the "next generation" IRC daemon
 .SH SYNOPSIS
@@ -11,27 +11,22 @@ ngIRCd \- the "next generation" IRC daemon
 ]
 .SH DESCRIPTION
 .BR ngIRCd
-is a free, portable and lightweight Internet Relay Chat server for small
+is a free, portable and lightweight Internet Relay Chat (IRC) server for small
 or private networks, developed under the GNU General Public License (GPL).
 .PP
-The server is quite easy to configure, can handle dynamic IP addresses, and
-optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for
-user authentication as well as character set conversion for legacy clients. The
-server has been written from scratch and is not based on the "forefather", the
-daemon of the IRCNet.
+The server is quite easy to configure and runs as a single-node server or can
+be part of a network of ngIRCd servers in a LAN or across the internet. It
+optionally supports the IPv6 protocol, SSL/TLS-protected client-server and
+server-server links, the Pluggable Authentication Modules (PAM) system for user
+authentication, IDENT requests, and character set conversion for legacy
+clients.
 .PP
-The name ngIRCd means
+The name ngIRCd stands for
 .IR "next-generation IRC daemon",
 which is a little bit exaggerated:
 .IR "lightweight Internet Relay Chat server"
 most probably would have been a better name :-)
 .PP
-Currently supported platforms include AIX, A/UX, FreeBSD, HP-UX, Hurd, IRIX,
-Linux, Mac OS X, Minix, NetBSD, OpenBSD, Solaris, and Windows with Cygwin.
-As ngIRCd relies on UNIX standards and uses GNU automake and GNU autoconf
-there are good chances that it also supports other UNIX-based operating
-systems as well.
-.PP
 By default ngIRCd logs diagnostic and informational messages using the syslog
 mechanism, or writes directly to the console when running in the foreground
 (see below).
@@ -57,14 +52,25 @@ terminate the server.
 Disable automatic connections to other servers. You can use the IRC command
 CONNECT later on as IRC Operator to link this ngIRCd to other servers.
 .TP
+\fB\-y\fR, \fB\-\-syslog\fR
+Write log messages to the syslog even when running in the foreground. This only
+makes sense when
+.I \-n/\-\-nodaemon
+was given on the command line
+.I before
+this option!
+.PP
+The following options prevent ngIRCd from starting regularly, but perform a
+specific action and then exit the daemon again:
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Display a brief help text and exit.
+.TP
 \fB\-t\fR, \fB\-\-configtest\fR
 Read, validate and display the configuration; then exit.
 .TP
 \fB\-V\fR, \fB\-\-version\fR
 Output version information and exit.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-Display a brief help text and exit.
 .SH FILES
 .I :ETCDIR:/ngircd.conf
 .RS
@@ -84,14 +90,28 @@ Shut down all connections and terminate the daemon.
 Shut down all listening sockets, re-read the configuration file and
 re-initialize the daemon.
 .SH HINTS
-It's wise to use "ngircd \-\-configtest" to validate the configuration file
-after changing it.
+It is
+.I always wise
+to use "ngircd \-\-configtest" to validate the configuration of ngIRCd after
+making changes to the configuration files!
 .SH DEBUGGING
-When ngIRCd is compiled with debug code, that is, its source code has
-been ./configure'd with "\-\-enable\-debug" and/or "\-\-enable\-sniffer" (witch
-enables debug mode automatically as well), you can use two more command
-line options and two more signals to debug problems with the daemon itself
-or IRC clients:
+ngIRCd can log additional debug messages, which can be enabled with the command
+line option \-\-debug (\-d) or by sending the USR1 signal to the running daemon.
+Some of those messages may leak personal information, be very technical and can
+be very verbose. Therefore the debug mode is meant for troubleshooting only and
+should definitely be disabled during normal operation!
+.PP
+In addition, a "protocol sniffer" can be enabled on build time by passing the
+"\-\-enable\-sniffer" option to the ./configure script which enables the
+"\-\-sniffer" (\-s) command line option (which is not available by default):
+this "sniffer" logs all incoming and outgoing IRC commands on all connections,
+which can be handy to debug problems with the daemon itself or IRC clients.
+.PP
+Both modes are indicated in the version string shown by the IRC "VERSION"
+command: if the version ends in a dot (like in "26.1."), the daemon operates in
+"normal" mode (the version used in the example is "26.1"). If it ends in ".1"
+(like in "26.1.1") the "debug-mode" is enabled; and if it ends in ".2" (like in
+"26.1.2") the "IRC sniffer" is enabled, too.
 .PP
 \fBOptions:\fR
 .TP
@@ -104,6 +124,9 @@ the console/syslog. This option requires that ngIRCd has been ./configure'd
 with "\-\-enable\-sniffer" and enables debug mode automatically, too.
 .PP
 \fBSignals:\fR
+.PP
+Note: Usage of these signals is broadcasted to all users with the +s ("receive
+server notices") mode set!
 .TP
 \fBUSR1\fR
 Toggle debug mode on and off during runtime.

+ 34 - 7
man/ngircd.conf.5.tmpl

@@ -1,7 +1,7 @@
 .\"
 .\" ngircd.conf(5) manual page template
 .\"
-.TH ngircd.conf 5 "Jan 2021" ngIRCd "ngIRCd Manual"
+.TH ngircd.conf 5 "Sep 2023" ngIRCd "ngIRCd Manual"
 .SH NAME
 ngircd.conf \- configuration file of ngIRCd
 .SH SYNOPSIS
@@ -93,10 +93,11 @@ like the server name and the ports on which the server should be listening.
 These settings depend on your personal preferences, so you should make sure
 that they correspond to your installation and setup!
 .TP
-\fBName\fR (string; required)
+\fBName\fR (string)
 Server name in the IRC network. This is an individual name of the IRC
 server, it is not related to the DNS host name. It must be unique in the
-IRC network and must contain at least one dot (".") character.
+IRC network and must contain at least one dot (".") character. When not set,
+ngIRCd tries to deduce a valid IRC server name from the local host name.
 .TP
 \fBAdminInfo1\fR, \fBAdminInfo2\fR, \fBAdminEMail\fR (string)
 Information about the server and the administrator, used by the ADMIN
@@ -106,11 +107,12 @@ command. This information is not required by the server but by RFC!
 Text file which contains the ngIRCd help text. This file is required
 to display help texts when using the "HELP <cmd>" command.
 Please note: Changes made to this file take effect when ngircd starts up
-or is instructed to re-read its configuration file.
+or is instructed to re-read its configuration file. Default: a built-in
+standard path.
 .TP
 \fBInfo\fR (string)
 Info text of the server. This will be shown by WHOIS and LINKS requests for
-example.
+example. Set to the server software name and version by default.
 .TP
 \fBListen\fR (list of strings)
 A comma separated list of IP address on which the server should listen.
@@ -122,7 +124,7 @@ IP addresses and interfaces by default.
 Text file with the "message of the day" (MOTD). This message will be shown to
 all users connecting to the server. Please note: Changes made to this file
 take effect when ngircd starts up or is instructed to re-read its
-configuration file.
+configuration file. Default: a built-in standard path.
 .TP
 \fBMotdPhrase\fR (string)
 A simple Phrase (<127 chars) if you don't want to use a MOTD file.
@@ -293,7 +295,17 @@ Default: yes.
 \fBIncludeDir\fR (string)
 Directory containing configuration snippets (*.conf), that should be read in
 after parsing the current configuration file.
-Default: none.
+Default: a built-in directory name when no configuration file was explicitly
+given on the command line (check "ngircd --configtest"), none (empty)
+otherwise.
+.PP
+.RS
+This way no default include directory is used when a possibly non-default
+configuration file was explicitly specified using "--config"/"-f" on the
+command line which (intentionally) did not specify an
+.I "IncludeDir"
+directive.
+.RE
 .TP
 \fBMorePrivacy\fR (boolean)
 This will cause ngIRCd to censor user idle time, logon time as well as the
@@ -385,6 +397,10 @@ All SSL-related configuration variables are located in the
 section. Please note that this whole section is only recognized by ngIRCd
 when it is compiled with support for SSL using OpenSSL or GnuTLS!
 .TP
+\fBCAFile\fR (string)
+Filename pointing to the Trusted CA Certificates. This is required for
+verifying peer certificates.
+.TP
 \fBCertFile\fR (string)
 SSL Certificate file of the private server key.
 .TP
@@ -394,6 +410,9 @@ Select cipher suites allowed for SSL/TLS connections.  This defaults to
 Please see 'man 1ssl ciphers' (OpenSSL) and 'man 3 gnutls_priority_init'
 (GnuTLS) for details.
 .TP
+\fBCRLFile\fR (string)
+Filename of Certificate Revocation List.
+.TP
 \fBDHFile\fR (string)
 Name of the Diffie-Hellman Parameter file. Can be created with GnuTLS
 "certtool \-\-generate-dh-params" or "openssl dhparam". If this file is not
@@ -479,6 +498,9 @@ You can use the IRC Operator command CONNECT later on to create the link.
 \fBSSLConnect\fR (boolean)
 Connect to the remote server using TLS/SSL. Default: false.
 .TP
+\fBSSLVerify\fR (boolean)
+Verify the TLS certificate presented by the remote server. Default: yes.
+.TP
 \fBServiceMask\fR (string)
 Define a (case insensitive) list of masks matching nicknames that should be
 treated as IRC services when introduced via this remote server, separated
@@ -517,6 +539,11 @@ invite list, exception list) is supported.
 This option can be specified multiple times, evaluated top to bottom.
 .RE
 .TP
+\fBAutojoin\fR (boolean)
+Should ngIRCd automatically join ("autojoin") all users to this channel on
+connect? Note: The users must have permissions to access the channel, otherwise
+joining them will fail!
+.TP
 \fBKeyFile\fR (string)
 Path and file name of a "key file" containing individual channel keys for
 different users. The file consists of plain text lines with the following

+ 18 - 6
src/config.h.in

@@ -111,9 +111,6 @@
 /* Define to 1 if you have the `memmove' function. */
 #undef HAVE_MEMMOVE
 
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
 /* Define to 1 if you have the `memset' function. */
 #undef HAVE_MEMSET
 
@@ -153,6 +150,9 @@
 /* Define to 1 if you have the `setgroups' function. */
 #undef HAVE_SETGROUPS
 
+/* Define to 1 if you have the `setrlimit' function. */
+#undef HAVE_SETRLIMIT
+
 /* Define to 1 if you have the `setsid' function. */
 #undef HAVE_SETSID
 
@@ -180,6 +180,9 @@
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
@@ -240,6 +243,9 @@
 /* Define to 1 if you have the <sys/devpoll.h> header file. */
 #undef HAVE_SYS_DEVPOLL_H
 
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
 /* Define to 1 if you have the <sys/socket.h> header file. */
 #undef HAVE_SYS_SOCKET_H
 
@@ -252,6 +258,9 @@
 /* Define to 1 if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H
 
+/* Define to 1 if you have the <sys/un.h> header file. */
+#undef HAVE_SYS_UN_H
+
 /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
 #undef HAVE_SYS_WAIT_H
 
@@ -342,7 +351,9 @@
 /* Define if IRC sniffer should be enabled */
 #undef SNIFFER
 
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+   required in a freestanding environment). This macro is provided for
+   backward compatibility; new code need not use it. */
 #undef STDC_HEADERS
 
 /* Define if ngIRCd should behave strict RFC compliant */
@@ -354,7 +365,8 @@
 /* Define if TCP wrappers should be used */
 #undef TCPWRAP
 
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
+   macro is obsolete. */
 #undef TIME_WITH_SYS_TIME
 
 /* Version number of package */
@@ -391,7 +403,7 @@
 #undef inline
 #endif
 
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed integer type capable of holding a process identifier. */
 #undef pid_t
 
 /* Define to `unsigned int' if <sys/types.h> does not define. */

+ 2 - 31
src/ngircd/Makefile.am

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,9 +15,6 @@ EXTRA_DIST = Makefile.ng
 
 AM_CPPFLAGS = -I$(srcdir)/../portab -I$(srcdir)/../tool -I$(srcdir)/../ipaddr
 
-LINTARGS = -weak -warnunixlib +unixlib -booltype BOOLEAN \
- -varuse -retvalother -emptyret -unrecog
-
 sbin_PROGRAMS = ngircd
 
 ngircd_SOURCES = \
@@ -107,7 +104,7 @@ noinst_HEADERS = \
 	sighandlers.h
 
 clean-local:
-	rm -f check-version check-help lint.out
+	rm -f check-version check-help
 
 maintainer-clean-local:
 	rm -f Makefile Makefile.in Makefile.am
@@ -122,32 +119,6 @@ check-help: Makefile
 	echo "./ngircd --help | grep help >/dev/null 2>&1" >>check-help
 	chmod 755 check-help
 
-lint:
-	@splint --version >/dev/null 2>&1 \
-	 || ( echo; echo "Error: \"splint\" not found!"; echo; exit 1 )
-	@echo; warnings=0; files=0; \
-	for f in *.c; do \
-	 echo "checking $$f ..."; \
-	 splint $$f $(LINTARGS) -I$(srcdir) -I$(srcdir)/.. \
-	  $(AM_CPPFLAGS) $(AM_CFLAGS) >lint.out 2>&1; \
-	 grep "no warnings" lint.out > /dev/null 2>&1; \
-	 if [ $$? -ne 0 ]; then \
-	  waswarning=1; \
-	  echo; grep -v "^Command Line: " lint.out; echo; \
-	  w=$$( grep "code warning" lint.out | $(AWK) "{ print \$$4 }" ); \
-	  [ "$$w" -gt 0 ] && warnings=`expr $$warnings + $$w`; \
-	  files=`expr $$files + 1`; \
-	 else \
-	  waswarning=0; \
-	 fi; \
-	 rm -f lint.out; \
-	done; \
-	[ $$waswarning -eq 0 ] && echo; \
-	[ $$warnings -gt 0 ] \
-	 && echo "Result: $$warnings warning(s) in $$files file(s)!" \
-	 || echo "Result: no warnings found."; \
-	echo; [ $$warnings -gt 0 ] && exit 1
-
 TESTS = check-version check-help
 
 # -eof-

+ 2 - 31
src/ngircd/Makefile.in

@@ -17,7 +17,7 @@
 
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -251,9 +251,6 @@ top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = ../portab/ansi2knr
 EXTRA_DIST = Makefile.ng
 AM_CPPFLAGS = -I$(srcdir)/../portab -I$(srcdir)/../tool -I$(srcdir)/../ipaddr
-LINTARGS = -weak -warnunixlib +unixlib -booltype BOOLEAN \
- -varuse -retvalother -emptyret -unrecog
-
 ngircd_SOURCES = \
 	ngircd.c \
 	array.c \
@@ -867,7 +864,7 @@ uninstall-am: uninstall-sbinPROGRAMS
 
 
 clean-local:
-	rm -f check-version check-help lint.out
+	rm -f check-version check-help
 
 maintainer-clean-local:
 	rm -f Makefile Makefile.in Makefile.am
@@ -882,32 +879,6 @@ check-help: Makefile
 	echo "./ngircd --help | grep help >/dev/null 2>&1" >>check-help
 	chmod 755 check-help
 
-lint:
-	@splint --version >/dev/null 2>&1 \
-	 || ( echo; echo "Error: \"splint\" not found!"; echo; exit 1 )
-	@echo; warnings=0; files=0; \
-	for f in *.c; do \
-	 echo "checking $$f ..."; \
-	 splint $$f $(LINTARGS) -I$(srcdir) -I$(srcdir)/.. \
-	  $(AM_CPPFLAGS) $(AM_CFLAGS) >lint.out 2>&1; \
-	 grep "no warnings" lint.out > /dev/null 2>&1; \
-	 if [ $$? -ne 0 ]; then \
-	  waswarning=1; \
-	  echo; grep -v "^Command Line: " lint.out; echo; \
-	  w=$$( grep "code warning" lint.out | $(AWK) "{ print \$$4 }" ); \
-	  [ "$$w" -gt 0 ] && warnings=`expr $$warnings + $$w`; \
-	  files=`expr $$files + 1`; \
-	 else \
-	  waswarning=0; \
-	 fi; \
-	 rm -f lint.out; \
-	done; \
-	[ $$waswarning -eq 0 ] && echo; \
-	[ $$warnings -gt 0 ] \
-	 && echo "Result: $$warnings warning(s) in $$files file(s)!" \
-	 || echo "Result: no warnings found."; \
-	echo; [ $$warnings -gt 0 ] && exit 1
-
 # -eof-
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.

+ 2 - 31
src/ngircd/Makefile.ng

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,9 +15,6 @@ EXTRA_DIST = Makefile.ng
 
 AM_CPPFLAGS = -I$(srcdir)/../portab -I$(srcdir)/../tool -I$(srcdir)/../ipaddr
 
-LINTARGS = -weak -warnunixlib +unixlib -booltype BOOLEAN \
- -varuse -retvalother -emptyret -unrecog
-
 sbin_PROGRAMS = ngircd
 
 ngircd_SOURCES = \
@@ -107,7 +104,7 @@ noinst_HEADERS = \
 	sighandlers.h
 
 clean-local:
-	rm -f check-version check-help lint.out
+	rm -f check-version check-help
 
 maintainer-clean-local:
 	rm -f Makefile Makefile.in Makefile.am
@@ -122,32 +119,6 @@ check-help: Makefile
 	echo "./ngircd --help | grep help >/dev/null 2>&1" >>check-help
 	chmod 755 check-help
 
-lint:
-	@splint --version >/dev/null 2>&1 \
-	 || ( echo; echo "Error: \"splint\" not found!"; echo; exit 1 )
-	@echo; warnings=0; files=0; \
-	for f in *.c; do \
-	 echo "checking $$f ..."; \
-	 splint $$f $(LINTARGS) -I$(srcdir) -I$(srcdir)/.. \
-	  $(AM_CPPFLAGS) $(AM_CFLAGS) >lint.out 2>&1; \
-	 grep "no warnings" lint.out > /dev/null 2>&1; \
-	 if [ $$? -ne 0 ]; then \
-	  waswarning=1; \
-	  echo; grep -v "^Command Line: " lint.out; echo; \
-	  w=$$( grep "code warning" lint.out | $(AWK) "{ print \$$4 }" ); \
-	  [ "$$w" -gt 0 ] && warnings=`expr $$warnings + $$w`; \
-	  files=`expr $$files + 1`; \
-	 else \
-	  waswarning=0; \
-	 fi; \
-	 rm -f lint.out; \
-	done; \
-	[ $$waswarning -eq 0 ] && echo; \
-	[ $$warnings -gt 0 ] \
-	 && echo "Result: $$warnings warning(s) in $$files file(s)!" \
-	 || echo "Result: no warnings found."; \
-	echo; [ $$warnings -gt 0 ] && exit 1
-
 TESTS = check-version check-help
 
 # -eof-

+ 4 - 4
src/ngircd/array.c

@@ -68,7 +68,7 @@ array_alloc(array * a, size_t size, size_t pos)
 
 	if (a->allocated < alloc) {
 #if DEBUG_ARRAY
-		Log(LOG_DEBUG, "array_alloc(): changing size from %u to %u bytes.",
+		LogDebug("array_alloc(): changing size from %u to %u bytes.",
 		    a->allocated, alloc);
 #endif
 		tmp = realloc(a->mem, alloc);
@@ -169,7 +169,7 @@ array_catb(array * dest, const char *src, size_t len)
 	assert(ptr != NULL);
 
 #if DEBUG_ARRAY
-	Log(LOG_DEBUG,
+	LogDebug(
 	    "array_catb(): appending %u bytes to array (now %u bytes in array).",
 	    len, tmp);
 #endif
@@ -249,7 +249,7 @@ array_free(array * a)
 {
 	assert(a != NULL);
 #if DEBUG_ARRAY
-	Log(LOG_DEBUG,
+	LogDebug(
 	    "array_free(): %u bytes free'd (%u bytes still used at time of free()).",
 	    a->allocated, a->used);
 #endif
@@ -315,7 +315,7 @@ array_moveleft(array * a, size_t membersize, size_t pos)
 		return;	/* nothing to do */
 
 #if DEBUG_ARRAY
-	Log(LOG_DEBUG,
+	LogDebug(
 	    "array_moveleft(): %u bytes used in array, starting at position %u.",
 	    a->used, bytepos);
 #endif

+ 25 - 8
src/ngircd/channel.c

@@ -139,7 +139,7 @@ Channel_InitPredefined( void )
 		if (conf_chan->modes_num) {
 			/* Prepare fake request structure */
 			strlcpy(name, conf_chan->name, sizeof(name));
-			Log(LOG_INFO, "Evaluating predefined channel modes for \"%s\".", name);
+			LogDebug("Evaluating predefined channel modes for \"%s\" ...", name);
 			Req.argv[0] = name;
 			Req.prefix = Client_ID(Client_ThisServer());
 			Req.command = "MODE";
@@ -148,7 +148,7 @@ Channel_InitPredefined( void )
 			for (n = 0; n < conf_chan->modes_num; n++) {
 				Req.argc = 1;
 				strlcpy(modes, conf_chan->modes[n], sizeof(modes));
-				Log(LOG_DEBUG, "Evaluate \"MODE %s %s\".", name, modes);
+				LogDebug("Evaluate \"MODE %s %s\".", name, modes);
 				c = strtok(modes, " ");
 				while (c && Req.argc < 15) {
 					Req.argv[Req.argc++] = c;
@@ -174,7 +174,7 @@ Channel_InitPredefined( void )
 					IRC_MODE(Client_ThisServer(), &Req);
 				}
 
-				/* Original channel modes srings are no longer needed */
+				/* Original channel modes strings are no longer needed */
 				free(conf_chan->modes[n]);
 			}
 		}
@@ -182,12 +182,11 @@ Channel_InitPredefined( void )
 		Set_KeyFile(new_chan, conf_chan->keyfile);
 
 		Log(LOG_INFO,
-		    "Created pre-defined channel \"%s\", mode \"%s\" (key \"%s\", limit %d).",
-		    new_chan->name, new_chan->modes, new_chan->key,
+		    "Created pre-defined channel \"%s\", mode \"%s\" (%s, user limit %d).",
+		    new_chan->name, new_chan->modes,
+		    new_chan->key[0] ? "channel key set" : "no channel key",
 		    new_chan->maxusers);
 	}
-	if (channel_count)
-		array_free(&Conf_Channels);
 
 	/* Make sure the local &SERVER channel exists */
 	if (!Channel_Search("&SERVER")) {
@@ -780,10 +779,28 @@ Channel_UserModes( CHANNEL *Chan, CLIENT *Client )
 } /* Channel_UserModes */
 
 
+/**
+ * Test if a user has a given channel user mode.
+ *
+ * @param Chan The channel to check.
+ * @param Client The client to check.
+ * @param Mode The channel user mode to test for.
+ * @return true if the user has the given channel user mode set.
+ */
 GLOBAL bool
 Channel_UserHasMode( CHANNEL *Chan, CLIENT *Client, char Mode )
 {
-	return strchr(Channel_UserModes(Chan, Client), Mode) != NULL;
+	char *channel_user_modes;
+
+	assert(Chan != NULL);
+	assert(Client != NULL);
+	assert(Mode > 0);
+
+	channel_user_modes = Channel_UserModes(Chan, Client);
+	if (!channel_user_modes || !*channel_user_modes)
+		return false;
+
+	return strchr(channel_user_modes, Mode) != NULL;
 } /* Channel_UserHasMode */
 
 

+ 2 - 2
src/ngircd/channel.h

@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
  * Channel management (header)
  */
 
-#if defined(__channel_c__) | defined(S_SPLINT_S)
+#if defined(__channel_c__)
 
 #include "lists.h"
 #include "defines.h"

+ 10 - 14
src/ngircd/client.c

@@ -213,7 +213,7 @@ Init_New_Client(CONN_ID Idx, CLIENT *Introducer, CLIENT *TopServer,
 		Generate_MyToken(client);
 
 	if (Client_HasMode(client, 'a'))
-		client->away = strndup(DEFAULT_AWAY_MSG, CLIENT_AWAY_LEN - 1);
+		client->away = strdup(DEFAULT_AWAY_MSG);
 
 	client->next = (POINTER *)My_Clients;
 	My_Clients = client;
@@ -653,7 +653,7 @@ Client_SearchServer(const char *Mask)
 
 
 /**
- * Get client structure ("introducer") identfied by a server token.
+ * Get client structure ("introducer") identified by a server token.
  * @return CLIENT structure or NULL if none could be found.
  */
 GLOBAL CLIENT *
@@ -698,10 +698,8 @@ Client_ID( CLIENT *Client )
 {
 	assert( Client != NULL );
 
-#ifdef DEBUG
 	if(Client->type == CLIENT_USER)
 		assert(strlen(Client->id) < Conf_MaxNickLength);
-#endif
 
 	if( Client->id[0] ) return Client->id;
 	else return "*";
@@ -1315,12 +1313,14 @@ Client_Reject(CLIENT *Client, const char *Reason, bool InformClient)
 GLOBAL void
 Client_Introduce(CLIENT *From, CLIENT *Client, int Type)
 {
+	int server;
+
 	/* Set client type (user or service) */
 	Client_SetType(Client, Type);
 
 	if (From) {
-		if (Conf_NickIsService(Conf_GetServer(Client_Conn(From)),
-				   Client_ID(Client)))
+		server = Conf_GetServer(Client_Conn(From));
+		if (server > NONE && Conf_NickIsService(server, Client_ID(Client)))
 			Client_SetType(Client, CLIENT_SERVICE);
 		LogDebug("%s \"%s\" (+%s) registered (via %s, on %s, %d hop%s).",
 			 Client_TypeText(Client), Client_Mask(Client),
@@ -1378,7 +1378,7 @@ MyCount( CLIENT_TYPE Type )
 
 
 /**
- * Allocate and initialize new CLIENT strcuture.
+ * Allocate and initialize new CLIENT structure.
  *
  * @return Pointer to CLIENT structure or NULL on error.
  */
@@ -1497,9 +1497,7 @@ Client_RegisterWhowas( CLIENT *Client )
 	slot = Last_Whowas + 1;
 	if( slot >= MAX_WHOWAS || slot < 0 ) slot = 0;
 
-#ifdef DEBUG
-	Log( LOG_DEBUG, "Saving WHOWAS information to slot %d ...", slot );
-#endif
+	LogDebug( "Saving WHOWAS information to slot %d ...", slot );
 
 	My_Whowas[slot].time = now;
 	strlcpy( My_Whowas[slot].id, Client_ID( Client ),
@@ -1694,17 +1692,16 @@ Client_Announce(CLIENT * Client, CLIENT * Prefix, CLIENT * User)
 } /* Client_Announce */
 
 
-#ifdef DEBUG
 
 GLOBAL void
 Client_DebugDump(void)
 {
 	CLIENT *c;
 
-	Log(LOG_DEBUG, "Client status:");
+	LogDebug("Client status:");
 	c = My_Clients;
 	while (c) {
-		Log(LOG_DEBUG,
+		LogDebug(
 		    " - %s: type=%d, host=%s, user=%s, conn=%d, start=%ld, flags=%s",
                    Client_ID(c), Client_Type(c), Client_Hostname(c),
                    Client_User(c), Client_Conn(c), Client_StartTime(c),
@@ -1713,7 +1710,6 @@ Client_DebugDump(void)
 	}
 } /* Client_DumpClients */
 
-#endif
 
 
 /* -eof- */

+ 2 - 4
src/ngircd/client.h

@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@
 
 #include "defines.h"
 
-#if defined(__client_c__) | defined(__client_cap_c__) | defined(S_SPLINT_S)
+#if defined(__client_c__) | defined(__client_cap_c__)
 
 typedef struct _CLIENT
 {
@@ -182,9 +182,7 @@ GLOBAL void Client_UpdateCloakedHostname PARAMS((CLIENT *Client,
 						 const char *hostname));
 
 
-#ifdef DEBUG
 GLOBAL void Client_DebugDump PARAMS((void));
-#endif
 
 #endif
 

+ 173 - 51
src/ngircd/conf.c

@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2019 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -33,6 +33,11 @@
 #include <grp.h>
 #include <sys/types.h>
 #include <dirent.h>
+#include <netdb.h>
+
+#ifdef HAVE_SYS_RESOURCE_H
+#	include <sys/resource.h>
+#endif
 
 #include "ngircd.h"
 #include "conn.h"
@@ -112,6 +117,12 @@ ConfSSL_Init(void)
 	free(Conf_SSLOptions.CertFile);
 	Conf_SSLOptions.CertFile = NULL;
 
+	free(Conf_SSLOptions.CAFile);
+	Conf_SSLOptions.CAFile = NULL;
+
+	free(Conf_SSLOptions.CRLFile);
+	Conf_SSLOptions.CRLFile = NULL;
+
 	free(Conf_SSLOptions.DHFile);
 	Conf_SSLOptions.DHFile = NULL;
 	array_free_wipe(&Conf_SSLOptions.KeyFilePassword);
@@ -408,7 +419,7 @@ Conf_Test( void )
 #endif
 	printf("  DefaultUserModes = %s\n", Conf_DefaultUserModes);
 	printf("  DNS = %s\n", yesno_to_str(Conf_DNS));
-#ifdef IDENT
+#ifdef IDENTAUTH
 	printf("  Ident = %s\n", yesno_to_str(Conf_Ident));
 #endif
 	printf("  IncludeDir = %s\n", Conf_IncludeDir);
@@ -435,10 +446,14 @@ Conf_Test( void )
 
 #ifdef SSL_SUPPORT
 	puts("[SSL]");
+	printf("  CAFile = %s\n", Conf_SSLOptions.CAFile
+					? Conf_SSLOptions.CAFile : "");
 	printf("  CertFile = %s\n", Conf_SSLOptions.CertFile
 					? Conf_SSLOptions.CertFile : "");
 	printf("  CipherList = %s\n", Conf_SSLOptions.CipherList ?
 	       Conf_SSLOptions.CipherList : DEFAULT_CIPHERS);
+	printf("  CRLFile = %s\n", Conf_SSLOptions.CRLFile
+					? Conf_SSLOptions.CRLFile : "");
 	printf("  DHFile = %s\n", Conf_SSLOptions.DHFile
 					? Conf_SSLOptions.DHFile : "");
 	printf("  KeyFile = %s\n", Conf_SSLOptions.KeyFile
@@ -464,13 +479,16 @@ Conf_Test( void )
 		printf( "  Host = %s\n", Conf_Server[i].host );
 		printf( "  Port = %u\n", (unsigned int)Conf_Server[i].port );
 #ifdef SSL_SUPPORT
-		printf( "  SSLConnect = %s\n", Conf_Server[i].SSLConnect?"yes":"no");
+		printf("  SSLConnect = %s\n",
+		       yesno_to_str(Conf_Server[i].SSLConnect));
+		printf("  SSLVerify = %s\n",
+		       yesno_to_str(Conf_Server[i].SSLVerify));
 #endif
 		printf( "  MyPassword = %s\n", Conf_Server[i].pwd_in );
 		printf( "  PeerPassword = %s\n", Conf_Server[i].pwd_out );
 		printf( "  ServiceMask = %s\n", Conf_Server[i].svs_mask);
 		printf( "  Group = %d\n", Conf_Server[i].group );
-		printf( "  Passive = %s\n\n", Conf_Server[i].flags & CONF_SFLAG_DISABLED ? "yes" : "no");
+		printf( "  Passive = %s\n\n", yesno_to_str(Conf_Server[i].flags & CONF_SFLAG_DISABLED));
 	}
 
 	predef_channel_count = array_length(&Conf_Channels, sizeof(*predef_chan));
@@ -488,6 +506,7 @@ Conf_Test( void )
 		printf("  Key = %s\n", predef_chan->key);
 		printf("  MaxUsers = %lu\n", predef_chan->maxusers);
 		printf("  Topic = %s\n", predef_chan->topic);
+		printf("  Autojoin = %s\n", yesno_to_str(predef_chan->autojoin));
 		printf("  KeyFile = %s\n\n", predef_chan->keyfile);
 	}
 
@@ -901,29 +920,46 @@ Read_Config(bool TestOnly, bool IsStarting)
 	struct dirent *entry;
 	int i, n;
 	FILE *fd;
-	DIR *dh;
+	DIR *dh = NULL;
+
+	if (!NGIRCd_ConfFile[0]) {
+		/* No configuration file name explicitly given on the command
+		 * line, use defaults but ignore errors when this file can't be
+		 * read later on. */
+		strlcpy(file, SYSCONFDIR, sizeof(file));
+		strlcat(file, CONFIG_FILE, sizeof(file));
+		ptr = file;
+	} else
+		ptr = NGIRCd_ConfFile;
 
-	Config_Error(LOG_INFO, "Using configuration file \"%s\" ...", NGIRCd_ConfFile);
+	Config_Error(LOG_INFO, "Using %s configuration file \"%s\" ...",
+		     !NGIRCd_ConfFile[0] ? "default" : "specified", ptr);
 
 	/* Open configuration file */
-	fd = fopen( NGIRCd_ConfFile, "r" );
-	if( ! fd ) {
-		/* No configuration file found! */
-		Config_Error( LOG_ALERT, "Can't read configuration \"%s\": %s",
-					NGIRCd_ConfFile, strerror( errno ));
-		if (!IsStarting)
-			return false;
-		Config_Error( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE_NAME );
-		exit( 1 );
+	fd = fopen(ptr, "r");
+	if (!fd) {
+		if (NGIRCd_ConfFile[0]) {
+			Config_Error(LOG_ALERT,
+				     "Can't read specified configuration file \"%s\": %s",
+				     ptr, strerror(errno));
+			if (IsStarting) {
+				Config_Error(LOG_ALERT,
+					     "%s exiting due to fatal errors!",
+					     PACKAGE_NAME);
+				exit(1);
+			}
+		}
+		Config_Error(LOG_WARNING,
+			     "Can't read default configuration file \"%s\": %s - Ignored.",
+			     ptr, strerror(errno));
 	}
 
 	opers_free();
 	Set_Defaults(IsStarting);
 
-	if (TestOnly)
+	if (TestOnly && fd)
 		Config_Error(LOG_INFO,
-			     "Reading configuration from \"%s\" ...",
-			     NGIRCd_ConfFile );
+			     "Reading configuration from \"%s\" ...", ptr);
 
 	/* Clean up server configuration structure: mark all already
 	 * configured servers as "once" so that they are deleted
@@ -942,16 +978,13 @@ Read_Config(bool TestOnly, bool IsStarting)
 
 					if( Conf_Server[i].conn_id == Conf_Server[n].conn_id ) {
 						Init_Server_Struct( &Conf_Server[n] );
-#ifdef DEBUG
-						Log(LOG_DEBUG,"Deleted unused duplicate server %d (kept %d).",
-												n, i );
-#endif
+						LogDebug("Deleted unused duplicate server %d (kept %d).", n, i);
 					}
 				}
 			} else {
 				/* Mark server as "once" */
 				Conf_Server[i].flags |= CONF_SFLAG_ONCE;
-				Log( LOG_DEBUG, "Marked server %d as \"once\"", i );
+				LogDebug("Marked server %d as \"once\"", i);
 			}
 		}
 	}
@@ -963,16 +996,23 @@ Read_Config(bool TestOnly, bool IsStarting)
 	ConfSSL_Init();
 #endif
 
-	Read_Config_File(NGIRCd_ConfFile, fd);
-	fclose(fd);
+	if (fd) {
+		Read_Config_File(ptr, fd);
+		fclose(fd);
+	}
 
 	if (Conf_IncludeDir[0]) {
+		/* Include directory was set in the main configuration file. So
+		 * use it and show errors. */
 		dh = opendir(Conf_IncludeDir);
 		if (!dh)
 			Config_Error(LOG_ALERT,
 				     "Can't open include directory \"%s\": %s",
 				     Conf_IncludeDir, strerror(errno));
-	} else {
+	} else if (!NGIRCd_ConfFile[0]) {
+		/* No include dir set in the configuration file used (if any)
+		 * but no config file explicitly specified either: so use the
+		 * default include path here as well! */
 		strlcpy(Conf_IncludeDir, SYSCONFDIR, sizeof(Conf_IncludeDir));
 		strlcat(Conf_IncludeDir, CONFIG_DIR, sizeof(Conf_IncludeDir));
 		dh = opendir(Conf_IncludeDir);
@@ -1294,7 +1334,7 @@ WarnPAM(const char UNUSED *File, int UNUSED Line)
 /**
  * Handle variable in [Global] configuration section.
  *
- * @param Line	Line numer in configuration file.
+ * @param Line	Line number in configuration file.
  * @param Var	Variable name.
  * @param Arg	Variable argument.
  */
@@ -1449,7 +1489,7 @@ Handle_GLOBAL(const char *File, int Line, char *Var, char *Arg )
 /**
  * Handle variable in [Limits] configuration section.
  *
- * @param Line	Line numer in configuration file.
+ * @param Line	Line number in configuration file.
  * @param Var	Variable name.
  * @param Arg	Variable argument.
  */
@@ -1538,7 +1578,7 @@ Handle_LIMITS(const char *File, int Line, char *Var, char *Arg)
 /**
  * Handle variable in [Options] configuration section.
  *
- * @param Line	Line numer in configuration file.
+ * @param Line	Line number in configuration file.
  * @param Var	Variable name.
  * @param Arg	Variable argument.
  */
@@ -1730,7 +1770,7 @@ Handle_OPTIONS(const char *File, int Line, char *Var, char *Arg)
 /**
  * Handle variable in [SSL] configuration section.
  *
- * @param Line	Line numer in configuration file.
+ * @param Line	Line number in configuration file.
  * @param Var	Variable name.
  * @param Arg	Variable argument.
  */
@@ -1774,6 +1814,16 @@ Handle_SSL(const char *File, int Line, char *Var, char *Arg)
 		Conf_SSLOptions.CipherList = strdup_warn(Arg);
 		return;
 	}
+	if (strcasecmp(Var, "CAFile") == 0) {
+		assert(Conf_SSLOptions.CAFile == NULL);
+		Conf_SSLOptions.CAFile = strdup_warn(Arg);
+		return;
+	}
+	if (strcasecmp(Var, "CRLFile") == 0) {
+		assert(Conf_SSLOptions.CRLFile == NULL);
+		Conf_SSLOptions.CRLFile = strdup_warn(Arg);
+		return;
+	}
 
 	Config_Error_Section(File, Line, Var, "SSL");
 }
@@ -1783,7 +1833,7 @@ Handle_SSL(const char *File, int Line, char *Var, char *Arg)
 /**
  * Handle variable in [Operator] configuration section.
  *
- * @param Line	Line numer in configuration file.
+ * @param Line	Line number in configuration file.
  * @param Var	Variable name.
  * @param Arg	Variable argument.
  */
@@ -1830,7 +1880,7 @@ Handle_OPERATOR(const char *File, int Line, char *Var, char *Arg )
 /**
  * Handle variable in [Server] configuration section.
  *
- * @param Line	Line numer in configuration file.
+ * @param Line	Line number in configuration file.
  * @param Var	Variable name.
  * @param Arg	Variable argument.
  */
@@ -1904,7 +1954,11 @@ Handle_SERVER(const char *File, int Line, char *Var, char *Arg )
 	if( strcasecmp( Var, "SSLConnect" ) == 0 ) {
 		New_Server.SSLConnect = Check_ArgIsTrue(Arg);
 		return;
-        }
+	}
+	if (strcasecmp(Var, "SSLVerify") == 0) {
+		New_Server.SSLVerify = Check_ArgIsTrue(Arg);
+		return;
+	}
 #endif
 	if( strcasecmp( Var, "Group" ) == 0 ) {
 		/* Server group */
@@ -1960,7 +2014,7 @@ Handle_Channelname(struct Conf_Channel *new_chan, const char *name)
 /**
  * Handle variable in [Channel] configuration section.
  *
- * @param Line	Line numer in configuration file.
+ * @param Line	Line number in configuration file.
  * @param Var	Variable name.
  * @param Arg	Variable argument.
  */
@@ -2003,6 +2057,11 @@ Handle_CHANNEL(const char *File, int Line, char *Var, char *Arg)
 			Config_Error_TooLong(File, Line, Var);
 		return;
 	}
+	if( strcasecmp( Var, "Autojoin" ) == 0 ) {
+		/* Check autojoin */
+		chan->autojoin = Check_ArgIsTrue(Arg);
+		return;
+	}
 	if( strcasecmp( Var, "Key" ) == 0 ) {
 		/* Initial Channel Key (mode k) */
 		len = strlcpy(chan->key, Arg, sizeof(chan->key));
@@ -2049,11 +2108,14 @@ Validate_Config(bool Configtest, bool Rehash)
 {
 	/* Validate configuration settings. */
 
-#ifdef DEBUG
 	int i, servers, servers_once;
-#endif
+	struct hostent *h;
 	bool config_valid = true;
 	char *ptr;
+#ifdef HAVE_SETRLIMIT
+	struct rlimit rlim;
+	long fd_lim_old;
+#endif
 
 	/* Emit a warning when the config file is not a full path name */
 	if (NGIRCd_ConfFile[0] && NGIRCd_ConfFile[0] != '/') {
@@ -2062,6 +2124,28 @@ Validate_Config(bool Configtest, bool Rehash)
 			NGIRCd_ConfFile);
 	}
 
+	if (!Conf_ServerName[0]) {
+		/* No server name configured, try to get a sane name from the
+		 * host name. Note: the IRC server name MUST contain
+		 * at least one dot, so the "node name" is not sufficient! */
+		gethostname(Conf_ServerName, sizeof(Conf_ServerName));
+		if (Conf_DNS) {
+			/* Try to get a proper host name ... */
+			h = gethostbyname(Conf_ServerName);
+			if (h)
+				strlcpy(Conf_ServerName, h->h_name,
+					sizeof(Conf_ServerName));
+		}
+		if (!strchr(Conf_ServerName, '.')) {
+			/* (Still) No dot in the name! */
+			strlcat(Conf_ServerName, ".host",
+				sizeof(Conf_ServerName));
+		}
+		Config_Error(LOG_WARNING,
+			     "No server name configured, using host name \"%s\".",
+			     Conf_ServerName);
+	}
+
 	/* Validate configured server name, see RFC 2812 section 2.3.1 */
 	ptr = Conf_ServerName;
 	do {
@@ -2076,13 +2160,10 @@ Validate_Config(bool Configtest, bool Rehash)
 		break;
 	} while (*(++ptr));
 
-	if (!Conf_ServerName[0] || !strchr(Conf_ServerName, '.'))
-	{
-		/* No server name configured! */
+	if (!Conf_ServerName[0] || !strchr(Conf_ServerName, '.')) {
 		config_valid = false;
 		Config_Error(LOG_ALERT,
-			     "No (valid) server name configured in \"%s\" (section 'Global': 'Name')!",
-			     NGIRCd_ConfFile);
+			     "No (valid) server name configured (section 'Global': 'Name')!");
 		if (!Configtest && !Rehash) {
 			Config_Error(LOG_ALERT,
 				     "%s exiting due to fatal errors!",
@@ -2096,8 +2177,7 @@ Validate_Config(bool Configtest, bool Rehash)
 		/* No administrative contact configured! */
 		config_valid = false;
 		Config_Error(LOG_ALERT,
-			     "No administrator email address configured in \"%s\" ('AdminEMail')!",
-			     NGIRCd_ConfFile);
+			     "No administrator email address configured ('AdminEMail')!");
 		if (!Configtest) {
 			Config_Error(LOG_ALERT,
 				     "%s exiting due to fatal errors!",
@@ -2125,7 +2205,48 @@ Validate_Config(bool Configtest, bool Rehash)
 			     "Maximum penalty increase ('MaxPenaltyTime') is set to %ld, this is not recommended!",
 			     Conf_MaxPenaltyTime);
 
-#ifdef DEBUG
+#ifdef HAVE_SETRLIMIT
+	if(getrlimit(RLIMIT_NOFILE, &rlim) == 0) {
+		LogDebug("Current file descriptor limit is %ld, maximum %ld. \"MaxConnections\" is %ld.",
+			 (long)rlim.rlim_cur, (long)rlim.rlim_max,
+			 Conf_MaxConnections);
+		fd_lim_old = rlim.rlim_cur;
+		/* Don't request "infinite" file descriptors, use a limit! */
+		if (rlim.rlim_max != RLIM_INFINITY && rlim.rlim_max < MAX_FD_LIMIT)
+			rlim.rlim_cur = rlim.rlim_max;
+		else
+			rlim.rlim_cur = MAX_FD_LIMIT;
+		if ((long)rlim.rlim_cur != fd_lim_old) {
+			/* Try to adjust the current file descriptor limit: */
+			LogDebug("Trying to upgrade \"soft\" file descriptor limit: %ld -> %ld ...",
+				 fd_lim_old, (long)rlim.rlim_cur);
+			if(setrlimit(RLIMIT_NOFILE, &rlim) != 0)
+				Config_Error(LOG_ERR, "Failed to adjust file descriptor limit from %ld to %ld: %s",
+					     fd_lim_old, (long)rlim.rlim_cur,
+					     strerror(errno));
+		}
+		/* Check the (updated?) file descriptor limit: */
+		getrlimit(RLIMIT_NOFILE, &rlim);
+		if (rlim.rlim_cur != RLIM_INFINITY
+		    && (long)rlim.rlim_cur <= (long)Conf_MaxConnections) {
+			Config_Error(LOG_WARNING,
+				     "Current file descriptor limit (%ld) is not higher than configured \"MaxConnections\" (%ld)!",
+				     (long)rlim.rlim_cur, Conf_MaxConnections);
+		} else if (!Configtest) {
+			if (Conf_MaxConnections > 0)
+				Log(LOG_INFO,
+				    "File descriptor limit is %ld; \"MaxConnections\" is set to %ld.",
+				    (long)rlim.rlim_cur, Conf_MaxConnections);
+			else
+				Log(LOG_INFO,
+				    "File descriptor limit is %ld; \"MaxConnections\" is not set.",
+				    (long)rlim.rlim_cur);
+		}
+	} else
+		Config_Error(LOG_ERR, "Failed to get file descriptor limit: %s",
+			     strerror(errno));
+#endif
+
 	servers = servers_once = 0;
 	for (i = 0; i < MAX_SERVERS; i++) {
 		if (Conf_Server[i].name[0]) {
@@ -2134,12 +2255,10 @@ Validate_Config(bool Configtest, bool Rehash)
 				servers_once++;
 		}
 	}
-	Log(LOG_DEBUG,
-	    "Configuration: Operators=%ld, Servers=%d[%d], Channels=%ld",
+	LogDebug("Configuration: Operators=%ld, Servers=%d[%d], Channels=%ld",
 	    array_length(&Conf_Opers, sizeof(struct Conf_Oper)),
 	    servers, servers_once,
 	    array_length(&Conf_Channels, sizeof(struct Conf_Channel)));
-#endif
 
 	return config_valid;
 }
@@ -2226,7 +2345,6 @@ va_dcl
 		Log(Level, "%s", msg);
 }
 
-#ifdef DEBUG
 
 /**
  * Dump internal state of the "configuration module".
@@ -2236,11 +2354,11 @@ Conf_DebugDump(void)
 {
 	int i;
 
-	Log(LOG_DEBUG, "Configured servers:");
+	LogDebug("Configured servers:");
 	for (i = 0; i < MAX_SERVERS; i++) {
 		if (! Conf_Server[i].name[0])
 			continue;
-		Log(LOG_DEBUG,
+		LogDebug(
 		    " - %s: %s:%d, last=%ld, group=%d, flags=%d, conn=%d",
 		    Conf_Server[i].name, Conf_Server[i].host,
 		    Conf_Server[i].port, Conf_Server[i].lasttry,
@@ -2249,7 +2367,6 @@ Conf_DebugDump(void)
 	}
 }
 
-#endif
 
 /**
  * Initialize server configuration structure to default values.
@@ -2271,6 +2388,11 @@ Init_Server_Struct( CONF_SERVER *Server )
 	Proc_InitStruct(&Server->res_stat);
 	Server->conn_id = NONE;
 	memset(&Server->bind_addr, 0, sizeof(Server->bind_addr));
+
+#ifdef SSL_SUPPORT
+	/* Verify SSL connections by default! */
+	Server->SSLVerify = true;
+#endif
 }
 
 /* -eof- */

+ 6 - 4
src/ngircd/conf.h

@@ -61,6 +61,7 @@ typedef struct _Conf_Server
 	ng_ipaddr_t dst_addr[2];	/**< List of addresses to connect to */
 #ifdef SSL_SUPPORT
 	bool SSLConnect;		/**< Establish connection using SSL? */
+	bool SSLVerify;			/**< Verify server certificate using CA? */
 #endif
 	char svs_mask[CLIENT_ID_LEN];	/**< Mask of nicknames that should be
 					     treated and counted as services */
@@ -76,6 +77,8 @@ struct SSLOptions {
 	array ListenPorts;		/**< Array of listening SSL ports */
 	array KeyFilePassword;		/**< Key file password */
 	char *CipherList;		/**< Set SSL cipher list to use */
+	char *CAFile;			/**< Trusted CA certificates file */
+	char *CRLFile;			/**< Certificate revocation file */
 };
 #endif
 
@@ -87,6 +90,7 @@ struct Conf_Channel {
 	char key[CLIENT_PASS_LEN];      /**< Channel key ("password", mode "k" ) */
 	char topic[COMMAND_LEN];	/**< Initial topic */
 	char keyfile[512];		/**< Path and name of channel key file */
+	bool autojoin;			/**< 1 to make all users autojoin this channel */
 	unsigned long maxusers;		/**< User limit for this channel, mode "l" */
 	unsigned int modes_num;		/**< Number of channel modes to evaluate */
 };
@@ -222,7 +226,7 @@ GLOBAL bool Conf_ConnectIPv6;
 /** Try to connect to remote systems using the IPv4 protocol (true) */
 GLOBAL bool Conf_ConnectIPv4;
 
-/** Idle timout (seconds), after which the daemon should exit */
+/** Idle timeout (seconds), after which the daemon should exit */
 GLOBAL int Conf_IdleTimeout;
 
 /** Maximum number of simultaneous connections to this server */
@@ -240,7 +244,7 @@ GLOBAL unsigned int Conf_MaxNickLength;
 /** Maximum number of channels returned to /list */
 GLOBAL int Conf_MaxListSize;
 
-/** Maximium seconds to add per "penalty". -1 = unlimited. */
+/** Maximum seconds to add per "penalty". -1 = unlimited. */
 GLOBAL time_t Conf_MaxPenaltyTime;
 
 #ifndef STRICT_RFC
@@ -280,9 +284,7 @@ GLOBAL bool Conf_SSLInUse PARAMS((void));
 /* Password required by WEBIRC command */
 GLOBAL char Conf_WebircPwd[CLIENT_PASS_LEN];
 
-#ifdef DEBUG
 GLOBAL void Conf_DebugDump PARAMS((void));
-#endif
 
 
 #endif

+ 3 - 9
src/ngircd/conn-func.c

@@ -21,11 +21,8 @@
 #include <assert.h>
 #include <time.h>
 
-#ifdef DEBUG
-# include "log.h"
-#endif
+#include "log.h"
 #include "conn.h"
-
 #include "conf.h"
 #include "conn-func.h"
 
@@ -71,7 +68,7 @@ Conn_GetSignon(CONN_ID Idx)
 GLOBAL time_t
 Conn_GetIdle( CONN_ID Idx )
 {
-	/* Return Idle-Timer of a connetion */
+	/* Return Idle-Timer of a connection */
 	assert( Idx > NONE );
 	return time( NULL ) - My_Connections[Idx].lastprivmsg;
 } /* Conn_GetIdle */
@@ -116,13 +113,10 @@ Conn_SetPenalty(CONN_ID Idx, time_t Seconds)
 
 	My_Connections[Idx].delaytime += Seconds;
 
-#ifdef DEBUG
-	Log(LOG_DEBUG,
-	    "Add penalty time on connection %d: %ld second%s, total %ld second%s.",
+	LogDebug("Add penalty time on connection %d: %ld second%s, total %ld second%s.",
 	    Idx, (long)Seconds, Seconds != 1 ? "s" : "",
 	    My_Connections[Idx].delaytime - t,
 	    My_Connections[Idx].delaytime - t != 1 ? "s" : "");
-#endif
 } /* Conn_SetPenalty */
 
 GLOBAL void

+ 378 - 40
src/ngircd/conn-ssl.c

@@ -43,11 +43,15 @@ extern struct SSLOptions Conf_SSLOptions;
 #include <openssl/err.h>
 #include <openssl/rand.h>
 #include <openssl/dh.h>
+#include <openssl/x509v3.h>
+
+#define MAX_CERT_CHAIN_LENGTH	10	/* XXX: do not hardcode */
 
 static SSL_CTX * ssl_ctx;
 static DH *dh_params;
 
 static bool ConnSSL_LoadServerKey_openssl PARAMS(( SSL_CTX *c ));
+static bool ConnSSL_SetVerifyProperties_openssl PARAMS((SSL_CTX * c));
 #endif
 
 #ifdef HAVE_LIBGNUTLS
@@ -74,6 +78,7 @@ static size_t x509_cred_idx;
 static gnutls_dh_params_t dh_params;
 static gnutls_priority_t priorities_cache = NULL;
 static bool ConnSSL_LoadServerKey_gnutls PARAMS(( void ));
+static bool ConnSSL_SetVerifyProperties_gnutls PARAMS((void));
 #endif
 
 #define SHA256_STRING_LEN	(32 * 2 + 1)
@@ -131,10 +136,38 @@ out:
 /**
  * Log OpenSSL error message.
  *
+ * @param level The log level
  * @param msg The error message.
  * @param info Additional information text or NULL.
  */
 static void
+LogOpenSSL_CertInfo(int level, X509 * cert, const char *msg)
+{
+	BIO *mem;
+	char *memptr;
+	long len;
+
+	assert(cert);
+	assert(msg);
+
+	if (!cert)
+		return;
+	mem = BIO_new(BIO_s_mem());
+	if (!mem)
+		return;
+	X509_NAME_print_ex(mem, X509_get_subject_name(cert), 0,
+			   XN_FLAG_ONELINE);
+	X509_NAME_print_ex(mem, X509_get_issuer_name(cert), 2, XN_FLAG_ONELINE);
+	if (BIO_write(mem, "", 1) == 1) {
+		len = BIO_get_mem_data(mem, &memptr);
+		if (memptr && len > 0)
+			Log(level, "%s: \"%s\".", msg, memptr);
+	}
+	(void)BIO_set_close(mem, BIO_CLOSE);
+	BIO_free(mem);
+}
+
+static void
 LogOpenSSLError(const char *error, const char *info)
 {
 	unsigned long err = ERR_get_error();
@@ -176,8 +209,24 @@ pem_passwd_cb(char *buf, int size, int rwflag, void *password)
 
 
 static int
-Verify_openssl(UNUSED int preverify_ok, UNUSED X509_STORE_CTX *x509_ctx)
+Verify_openssl(int preverify_ok, X509_STORE_CTX * ctx)
 {
+#ifdef DEBUG
+	if (!preverify_ok) {
+		int err = X509_STORE_CTX_get_error(ctx);
+		LogDebug("Certificate validation failed: %s",
+			 X509_verify_cert_error_string(err));
+	}
+#else
+	(void)preverify_ok;
+	(void)ctx;
+#endif
+
+	/* Always(!) return success as we have to deal with invalid
+	 * (self-signed, expired, ...) client certificates and with invalid
+	 * server certificates when "SSLVerify" is disabled, which we don't
+	 * know at this stage. Therefore we postpone this check, it will be
+	 * (and has to be!) handled in cb_connserver_login_ssl(). */
 	return 1;
 }
 #endif
@@ -280,8 +329,8 @@ void ConnSSL_Free(CONNECTION *c)
 	assert(slot->x509_cred != NULL);
 	slot->refcnt--;
 	if ((c->ssl_state.x509_cred_idx != x509_cred_idx) && (slot->refcnt <= 0)) {
-		Log(LOG_INFO, "Discarding X509 certificate credentials from slot %zd.",
-		    c->ssl_state.x509_cred_idx);
+		LogDebug("Discarding X509 certificate credentials from slot %zd.",
+			 c->ssl_state.x509_cred_idx);
 		gnutls_certificate_free_keys(slot->x509_cred);
 		gnutls_certificate_free_credentials(slot->x509_cred);
 		slot->x509_cred = NULL;
@@ -354,10 +403,13 @@ ConnSSL_InitLibrary( void )
 	}
 
 	SSL_CTX_set_session_id_context(newctx, (unsigned char *)"ngircd", 6);
-	SSL_CTX_set_options(newctx, SSL_OP_SINGLE_DH_USE|SSL_OP_NO_SSLv2);
+	if (!ConnSSL_SetVerifyProperties_openssl(newctx))
+		goto out;
+	SSL_CTX_set_options(newctx,
+			    SSL_OP_SINGLE_DH_USE | SSL_OP_NO_SSLv2 |
+			    SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1 |
+			    SSL_OP_NO_COMPRESSION);
 	SSL_CTX_set_mode(newctx, SSL_MODE_ENABLE_PARTIAL_WRITE);
-	SSL_CTX_set_verify(newctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
-			   Verify_openssl);
 	SSL_CTX_free(ssl_ctx);
 	ssl_ctx = newctx;
 	Log(LOG_INFO, "%s initialized.", OpenSSL_version(OPENSSL_VERSION));
@@ -394,6 +446,9 @@ out:
 		goto out;
 	}
 
+	if (!ConnSSL_SetVerifyProperties_gnutls())
+		goto out;
+
 	Log(LOG_INFO, "GnuTLS %s initialized.", gnutls_check_version(NULL));
 	initialized = true;
 	return true;
@@ -406,6 +461,40 @@ out:
 
 #ifdef HAVE_LIBGNUTLS
 static bool
+ConnSSL_SetVerifyProperties_gnutls(void)
+{
+	int err;
+
+	if (!Conf_SSLOptions.CAFile)
+		return true;
+
+	x509_cred_slot *slot = array_get(&x509_creds, sizeof(x509_cred_slot), x509_cred_idx);
+	gnutls_certificate_credentials_t x509_cred = slot->x509_cred;
+
+	err = gnutls_certificate_set_x509_trust_file(x509_cred,
+						     Conf_SSLOptions.CAFile,
+						     GNUTLS_X509_FMT_PEM);
+	if (err < 0) {
+		Log(LOG_ERR, "Failed to load x509 trust file %s: %s",
+		    Conf_SSLOptions.CAFile, gnutls_strerror(err));
+		return false;
+	}
+	if (Conf_SSLOptions.CRLFile) {
+		err =
+		    gnutls_certificate_set_x509_crl_file(x509_cred,
+							 Conf_SSLOptions.CRLFile,
+							 GNUTLS_X509_FMT_PEM);
+		if (err < 0) {
+			Log(LOG_ERR, "Failed to load x509 crl file %s: %s",
+			    Conf_SSLOptions.CRLFile, gnutls_strerror(err));
+			return false;
+		}
+	}
+	return true;
+}
+
+
+static bool
 ConnSSL_LoadServerKey_gnutls(void)
 {
 	int err;
@@ -421,12 +510,6 @@ ConnSSL_LoadServerKey_gnutls(void)
 		return false;
 	}
 
-	cert_file = Conf_SSLOptions.CertFile ? Conf_SSLOptions.CertFile:Conf_SSLOptions.KeyFile;
-	if (!cert_file) {
-		Log(LOG_ERR, "No SSL server key configured!");
-		return false;
-	}
-
 	if (array_bytes(&Conf_SSLOptions.KeyFilePassword))
 		Log(LOG_WARNING,
 		    "Ignoring SSL \"KeyFilePassword\": Not supported by GnuTLS.");
@@ -435,20 +518,29 @@ ConnSSL_LoadServerKey_gnutls(void)
 		return false;
 
 	gnutls_certificate_set_dh_params(x509_cred, dh_params);
-	err = gnutls_certificate_set_x509_key_file(x509_cred, cert_file, Conf_SSLOptions.KeyFile, GNUTLS_X509_FMT_PEM);
-	if (err < 0) {
-		Log(LOG_ERR,
-		    "Failed to set certificate key file (cert %s, key %s): %s",
-		    cert_file,
-		    Conf_SSLOptions.KeyFile ? Conf_SSLOptions.KeyFile : "(NULL)",
-		    gnutls_strerror(err));
-		return false;
+	gnutls_certificate_set_flags(x509_cred, GNUTLS_CERTIFICATE_VERIFY_CRLS);
+
+	cert_file = Conf_SSLOptions.CertFile ?
+			Conf_SSLOptions.CertFile : Conf_SSLOptions.KeyFile;
+	if (Conf_SSLOptions.KeyFile) {
+		err = gnutls_certificate_set_x509_key_file(x509_cred, cert_file,
+							   Conf_SSLOptions.KeyFile,
+							   GNUTLS_X509_FMT_PEM);
+		if (err < 0) {
+			Log(LOG_ERR,
+			    "Failed to set certificate key file (cert %s, key %s): %s",
+			    cert_file,
+			    Conf_SSLOptions.KeyFile ? Conf_SSLOptions.KeyFile : "(NULL)",
+			    gnutls_strerror(err));
+			return false;
+		}
 	}
 
 	/* Free currently active x509 context (if any) unless it is still in use */
 	slot = array_get(&x509_creds, sizeof(x509_cred_slot), x509_cred_idx);
 	if ((slot != NULL) && (slot->refcnt <= 0) && (slot->x509_cred != NULL)) {
-		Log(LOG_INFO, "Discarding X509 certificate credentials from slot %zd.", x509_cred_idx);
+		LogDebug("Discarding X509 certificate credentials from slot %zd.",
+			 x509_cred_idx);
 		gnutls_certificate_free_keys(slot->x509_cred);
 		gnutls_certificate_free_credentials(slot->x509_cred);
 		slot->x509_cred = NULL;
@@ -477,7 +569,7 @@ ConnSSL_LoadServerKey_gnutls(void)
 			return false;
 		}
 	}
-	Log(LOG_INFO, "Storing new X509 certificate credentials in slot %zd.", x509_cred_idx);
+	LogDebug("Storing new X509 certificate credentials in slot %zd.", x509_cred_idx);
 	slot->x509_cred = x509_cred;
 	slot->refcnt = 0;
 
@@ -493,14 +585,12 @@ ConnSSL_LoadServerKey_openssl(SSL_CTX *ctx)
 	char *cert_key;
 
 	assert(ctx);
-	if (!Conf_SSLOptions.KeyFile) {
-		Log(LOG_ERR, "No SSL server key configured!");
-		return false;
-	}
-
 	SSL_CTX_set_default_passwd_cb(ctx, pem_passwd_cb);
 	SSL_CTX_set_default_passwd_cb_userdata(ctx, &Conf_SSLOptions.KeyFilePassword);
 
+	if (!Conf_SSLOptions.KeyFile)
+		return true;
+
 	if (SSL_CTX_use_PrivateKey_file(ctx, Conf_SSLOptions.KeyFile, SSL_FILETYPE_PEM) != 1) {
 		array_free_wipe(&Conf_SSLOptions.KeyFilePassword);
 		LogOpenSSLError("Failed to add private key", Conf_SSLOptions.KeyFile);
@@ -531,6 +621,56 @@ ConnSSL_LoadServerKey_openssl(SSL_CTX *ctx)
 }
 
 
+static bool
+ConnSSL_SetVerifyProperties_openssl(SSL_CTX * ctx)
+{
+	X509_STORE *store = NULL;
+	X509_LOOKUP *lookup;
+	bool ret = false;
+
+	if (!Conf_SSLOptions.CAFile)
+		return true;
+
+	if (SSL_CTX_load_verify_locations(ctx, Conf_SSLOptions.CAFile, NULL) !=
+	    1) {
+		LogOpenSSLError("SSL_CTX_load_verify_locations", NULL);
+		goto out;
+	}
+
+	if (Conf_SSLOptions.CRLFile) {
+		X509_VERIFY_PARAM *param = X509_VERIFY_PARAM_new();
+		X509_VERIFY_PARAM_set_flags(param, X509_V_FLAG_CRL_CHECK);
+		SSL_CTX_set1_param(ctx, param);
+
+		store = SSL_CTX_get_cert_store(ctx);
+		assert(store);
+		lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
+		if (!lookup) {
+			LogOpenSSLError("X509_STORE_add_lookup",
+					Conf_SSLOptions.CRLFile);
+			goto out;
+		}
+
+		if (X509_load_crl_file
+		    (lookup, Conf_SSLOptions.CRLFile, X509_FILETYPE_PEM) != 1) {
+			LogOpenSSLError("X509_load_crl_file",
+					Conf_SSLOptions.CRLFile);
+			goto out;
+		}
+	}
+
+	SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
+			   Verify_openssl);
+	SSL_CTX_set_verify_depth(ctx, MAX_CERT_CHAIN_LENGTH);
+	ret = true;
+out:
+	if (Conf_SSLOptions.CRLFile)
+		free(Conf_SSLOptions.CRLFile);
+	Conf_SSLOptions.CRLFile = NULL;
+	return ret;
+}
+
+
 #endif
 static bool
 ConnSSL_Init_SSL(CONNECTION *c)
@@ -583,7 +723,7 @@ ConnSSL_Init_SSL(CONNECTION *c)
 	gnutls_certificate_server_set_request(c->ssl_state.gnutls_session,
 					      GNUTLS_CERT_REQUEST);
 
-	Log(LOG_INFO, "Using X509 credentials from slot %zd", x509_cred_idx);
+	LogDebug("Using X509 credentials from slot %zd.", x509_cred_idx);
 	c->ssl_state.x509_cred_idx = x509_cred_idx;
 	x509_cred_slot *slot = array_get(&x509_creds, sizeof(x509_cred_slot), x509_cred_idx);
 	slot->refcnt++;
@@ -602,27 +742,45 @@ ConnSSL_Init_SSL(CONNECTION *c)
 
 
 bool
-ConnSSL_PrepareConnect(CONNECTION *c, UNUSED CONF_SERVER *s)
+ConnSSL_PrepareConnect(CONNECTION * c, CONF_SERVER * s)
 {
 	bool ret;
 #ifdef HAVE_LIBGNUTLS
 	int err;
 
+	(void)s;
 	err = gnutls_init(&c->ssl_state.gnutls_session, GNUTLS_CLIENT);
 	if (err) {
 		Log(LOG_ERR, "Failed to initialize new SSL session: %s",
 		    gnutls_strerror(err));
 		return false;
-        }
+	}
 #endif
 	ret = ConnSSL_Init_SSL(c);
 	if (!ret)
 		return false;
 	Conn_OPTION_ADD(c, CONN_SSL_CONNECT);
+
 #ifdef HAVE_LIBSSL
 	assert(c->ssl_state.ssl);
-	SSL_set_verify(c->ssl_state.ssl, SSL_VERIFY_NONE, NULL);
+
+	X509_VERIFY_PARAM *param = SSL_get0_param(c->ssl_state.ssl);
+	X509_VERIFY_PARAM_set_hostflags(param, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
+	int err = X509_VERIFY_PARAM_set1_host(param, s->host, 0);
+	if (err != 1) {
+		Log(LOG_ERR,
+		    "Cannot set up hostname verification for '%s': %u",
+		    s->host, err);
+		return false;
+	}
+
+	if (s->SSLVerify)
+		SSL_set_verify(c->ssl_state.ssl, SSL_VERIFY_PEER,
+			       Verify_openssl);
+	else
+		SSL_set_verify(c->ssl_state.ssl, SSL_VERIFY_NONE, NULL);
 #endif
+
 	return true;
 }
 
@@ -679,9 +837,12 @@ ConnSSL_HandleError(CONNECTION * c, const int code, const char *fname)
 				    "SSL error, client disconnected [in %s()]!",
 				    fname);
 				break;
-			case -1:	/* low level socket I/O error, check errno */
-				Log(LOG_ERR, "SSL error: %s [in %s()]!",
-				    strerror(real_errno), fname);
+			case -1:
+				/* Low level socket I/O error, check errno. But
+				 * we don't need to log this here, the generic
+				 * connection layer will take care of it. */
+				LogDebug("SSL error: %s [in %s()]!",
+					 strerror(real_errno), fname);
 			}
 		}
 		break;
@@ -709,8 +870,10 @@ ConnSSL_HandleError(CONNECTION * c, const int code, const char *fname)
 	default:
 		assert(code < 0);
 		if (gnutls_error_is_fatal(code)) {
-			Log(LOG_ERR, "SSL error: %s [%s].",
-			    gnutls_strerror(code), fname);
+			/* We don't need to log this here, the generic
+			 * connection layer will take care of it. */
+			LogDebug("SSL error: %s [%s].",
+				 gnutls_strerror(code), fname);
 			ConnSSL_Free(c);
 			return -1;
 		}
@@ -720,18 +883,114 @@ ConnSSL_HandleError(CONNECTION * c, const int code, const char *fname)
 }
 
 
+#ifdef HAVE_LIBGNUTLS
+static void *
+LogMalloc(size_t s)
+{
+	void *mem = malloc(s);
+	if (!mem)
+		Log(LOG_ERR, "Out of memory: Could not allocate %lu byte",
+		    (unsigned long)s);
+	return mem;
+}
+
+
+static void
+LogGnuTLS_CertInfo(int level, gnutls_x509_crt_t cert, const char *msg)
+{
+	char *dn, *issuer_dn;
+	size_t size = 0;
+	int err = gnutls_x509_crt_get_dn(cert, NULL, &size);
+	if (size == 0) {
+		Log(LOG_ERR, "gnutls_x509_crt_get_dn: size == 0");
+		return;
+	}
+	if (err && err != GNUTLS_E_SHORT_MEMORY_BUFFER)
+		goto err_crt_get;
+	dn = LogMalloc(size);
+	if (!dn)
+		return;
+	err = gnutls_x509_crt_get_dn(cert, dn, &size);
+	if (err)
+		goto err_crt_get;
+	gnutls_x509_crt_get_issuer_dn(cert, NULL, &size);
+	assert(size);
+	issuer_dn = LogMalloc(size);
+	if (!issuer_dn) {
+		Log(level, "%s: Distinguished Name \"%s\".", msg, dn);
+		free(dn);
+		return;
+	}
+	gnutls_x509_crt_get_issuer_dn(cert, issuer_dn, &size);
+	Log(level, "%s: Distinguished Name \"%s\", Issuer \"%s\".", msg, dn,
+	    issuer_dn);
+	free(dn);
+	free(issuer_dn);
+	return;
+
+      err_crt_get:
+	Log(LOG_ERR, "gnutls_x509_crt_get_dn: %s", gnutls_strerror(err));
+	return;
+}
+#endif
+
+
 static void
-ConnSSL_LogCertInfo( CONNECTION *c )
+ConnSSL_LogCertInfo( CONNECTION * c, bool connect)
 {
+	bool cert_seen = false, cert_ok = false;
+	char msg[128];
 #ifdef HAVE_LIBSSL
+	const char *comp_alg = "no compression";
+	const void *comp;
+	X509 *peer_cert = NULL;
 	SSL *ssl = c->ssl_state.ssl;
 
 	assert(ssl);
 
-	Log(LOG_INFO, "Connection %d: initialized %s using cipher %s.",
-		c->sock, SSL_get_version(ssl), SSL_get_cipher(ssl));
+	comp = SSL_get_current_compression(ssl);
+	if (comp)
+		comp_alg = SSL_COMP_get_name(comp);
+	Log(LOG_INFO, "Connection %d: initialized %s using cipher %s, %s.",
+	    c->sock, SSL_get_version(ssl), SSL_get_cipher(ssl), comp_alg);
+	peer_cert = SSL_get_peer_certificate(ssl);
+	if (peer_cert) {
+		cert_seen = true;
+
+		if (connect) {
+			/* Outgoing connection. Verify the remote server! */
+			int err = SSL_get_verify_result(ssl);
+			if (err == X509_V_OK) {
+				const char *peername = SSL_get0_peername(ssl);
+				if (peername != NULL)
+					cert_ok = true;
+				LogDebug("X509_V_OK, peername = '%s'", peername);
+			} else
+				Log(LOG_WARNING, "Certificate validation failed: %s!",
+				    X509_verify_cert_error_string(err));
+
+			snprintf(msg, sizeof(msg), "Got %svalid server certificate",
+				 cert_ok ? "" : "in");
+			LogOpenSSL_CertInfo(LOG_INFO, peer_cert, msg);
+		} else {
+			/* Incoming connection.
+			 * Accept all certificates, don't depend on their
+			 * validity: for example, we don't know the hostname
+			 * to check, because we not yet even know if this is a
+			 * server connection at all and if so, which one, so we
+			 * don't know a host name to look for. On the other
+			 * hand we want client certificates, for example for
+			 * "CertFP" authentication with services ... */
+			LogOpenSSL_CertInfo(LOG_INFO, peer_cert,
+					    "Got unchecked peer certificate");
+		}
+
+		X509_free(peer_cert);
+	}
 #endif
 #ifdef HAVE_LIBGNUTLS
+	unsigned int status;
+	gnutls_credentials_type_t cred;
 	gnutls_session_t sess = c->ssl_state.gnutls_session;
 	gnutls_cipher_algorithm_t cipher = gnutls_cipher_get(sess);
 
@@ -740,7 +999,86 @@ ConnSSL_LogCertInfo( CONNECTION *c )
 	    gnutls_protocol_get_name(gnutls_protocol_get_version(sess)),
 	    gnutls_cipher_get_name(cipher),
 	    gnutls_mac_get_name(gnutls_mac_get(sess)));
+	cred = gnutls_auth_get_type(c->ssl_state.gnutls_session);
+	if (cred == GNUTLS_CRD_CERTIFICATE) {
+		gnutls_x509_crt_t cert;
+		unsigned cert_list_size;
+		const gnutls_datum_t *cert_list =
+		    gnutls_certificate_get_peers(sess, &cert_list_size);
+
+		if (!cert_list || cert_list_size == 0)
+			goto done_cn_validation;
+
+		cert_seen = true;
+		int err = gnutls_x509_crt_init(&cert);
+		if (err < 0) {
+			Log(LOG_ERR,
+			    "Failed to initialize x509 certificate: %s",
+			    gnutls_strerror(err));
+			goto done_cn_validation;
+		}
+		err = gnutls_x509_crt_import(cert, cert_list,
+					   GNUTLS_X509_FMT_DER);
+		if (err < 0) {
+			Log(LOG_ERR, "Failed to parse the certificate: %s",
+			    gnutls_strerror(err));
+			goto done_cn_validation;
+		}
+
+		if (connect) {
+			int verify =
+			    gnutls_certificate_verify_peers2(c->
+							     ssl_state.gnutls_session,
+							     &status);
+			if (verify < 0) {
+				Log(LOG_ERR,
+				    "gnutls_certificate_verify_peers2 failed: %s",
+				    gnutls_strerror(verify));
+				goto done_cn_validation;
+			} else if (status) {
+				gnutls_datum_t out;
+
+				if (gnutls_certificate_verification_status_print
+				    (status, gnutls_certificate_type_get(sess), &out,
+				     0) == GNUTLS_E_SUCCESS) {
+					Log(LOG_ERR,
+					    "Certificate validation failed: %s",
+					    out.data);
+					gnutls_free(out.data);
+				}
+			}
+
+			err = gnutls_x509_crt_check_hostname(cert, c->host);
+			if (err == 0)
+				Log(LOG_ERR,
+				    "Failed to verify the hostname, expected \"%s\"",
+				    c->host);
+			else
+				cert_ok = verify == 0 && status == 0;
+
+			snprintf(msg, sizeof(msg), "Got %svalid server certificate",
+				cert_ok ? "" : "in");
+			LogGnuTLS_CertInfo(LOG_INFO, cert, msg);
+		} else {
+			/* Incoming connection. Please see comments for OpenSSL! */
+			LogGnuTLS_CertInfo(LOG_INFO, cert,
+					    "Got unchecked peer certificate");
+		}
+
+		gnutls_x509_crt_deinit(cert);
+done_cn_validation:
+		;
+	}
 #endif
+	/*
+	 * can be used later to check if connection was authenticated, e.g.
+	 * if inbound connection tries to register itself as server.
+	 * Could also restrict /OPER to authenticated connections, etc.
+	 */
+	if (cert_ok)
+		Conn_OPTION_ADD(c, CONN_SSL_PEERCERT_OK);
+	if (!cert_seen)
+		Log(LOG_INFO, "Peer did not present a certificate.");
 }
 
 
@@ -879,7 +1217,7 @@ ConnectAccept( CONNECTION *c, bool connect)
 	(void)ConnSSL_InitCertFp(c);
 
 	Conn_OPTION_DEL(c, (CONN_SSL_WANT_WRITE|CONN_SSL_WANT_READ|CONN_SSL_CONNECT));
-	ConnSSL_LogCertInfo(c);
+	ConnSSL_LogCertInfo(c, connect);
 
 	Conn_StartLogin(CONNECTION2ID(c));
 	return 1;

+ 4 - 4
src/ngircd/conn-zip.c

@@ -142,7 +142,7 @@ Zip_Flush( CONN_ID Idx )
 	out->avail_out = (uInt)sizeof zipbuf;
 
 #if DEBUG_ZIP
-	Log(LOG_DEBUG, "out->avail_in %d, out->avail_out %d",
+	LogDebug("out->avail_in %d, out->avail_out %d",
 		out->avail_in, out->avail_out);
 #endif
 	result = deflate( out, Z_SYNC_FLUSH );
@@ -165,7 +165,7 @@ Zip_Flush( CONN_ID Idx )
 
 	zipbuf_used = WRITEBUFFER_SLINK_LEN - out->avail_out;
 #if DEBUG_ZIP
-	Log(LOG_DEBUG, "zipbuf_used: %d", zipbuf_used);
+	LogDebug("zipbuf_used: %d", zipbuf_used);
 #endif
 	if (!array_catb(&My_Connections[Idx].wbuf,
 			(char *)zipbuf, (size_t) zipbuf_used)) {
@@ -217,7 +217,7 @@ Unzip_Buffer( CONN_ID Idx )
 	in->avail_out = (uInt)sizeof unzipbuf;
 
 #if DEBUG_ZIP
-	Log(LOG_DEBUG, "in->avail_in %d, in->avail_out %d",
+	LogDebug("in->avail_in %d, in->avail_out %d",
 		in->avail_in, in->avail_out);
 #endif
 	result = inflate( in, Z_SYNC_FLUSH );
@@ -232,7 +232,7 @@ Unzip_Buffer( CONN_ID Idx )
 	in_len = z_rdatalen - in->avail_in;
 	unzipbuf_used = READBUFFER_LEN - in->avail_out;
 #if DEBUG_ZIP
-	Log(LOG_DEBUG, "unzipbuf_used: %d - %d = %d", READBUFFER_LEN,
+	LogDebug("unzipbuf_used: %d - %d = %d", READBUFFER_LEN,
 		in->avail_out, unzipbuf_used);
 #endif
 	assert(unzipbuf_used <= READBUFFER_LEN);

+ 105 - 48
src/ngircd/conn.c

@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2019 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -66,6 +66,7 @@
 #include "ng_ipaddr.h"
 #include "parse.h"
 #include "resolve.h"
+#include "sighandlers.h"
 
 #define SERVER_WAIT (NONE - 1)		/** "Wait for outgoing connection" flag */
 
@@ -479,6 +480,15 @@ Conn_InitListeners( void )
 
 	/* not using systemd socket activation, initialize listening sockets: */
 
+#ifdef SSL_SUPPORT
+	if (!Conf_SSLOptions.KeyFile &&
+	    array_length(&Conf_SSLOptions.ListenPorts, sizeof (UINT16))) {
+		Log(LOG_ERR,
+		    "Ignoring SSL-enabled listening ports: No key file set!");
+		array_free(&Conf_SSLOptions.ListenPorts);
+	}
+#endif
+
 	/* can't use Conf_ListenAddress directly, see below */
 	copy = strdup(Conf_ListenAddress);
 	if (!copy) {
@@ -566,7 +576,7 @@ InitSinaddrListenAddr(ng_ipaddr_t *addr, const char *listen_addrstr, UINT16 Port
 /**
  * Set a socket to "IPv6 only". If the given socket doesn't belong to the
  * AF_INET6 family, or the operating system doesn't support this functionality,
- * this function retruns silently.
+ * this function returns silently.
  *
  * @param af	Address family of the socket.
  * @param sock	Socket handle.
@@ -591,7 +601,7 @@ set_v6_only(int af, int sock)
 /**
  * Initialize new listening port.
  *
- * @param listen_addr	Local address to bind the socet to (can be 0.0.0.0).
+ * @param listen_addr	Local address to bind the socket to (can be 0.0.0.0).
  * @param Port		Port number on which the new socket should be listening.
  * @returns		file descriptor of the socket or -1 on failure.
  */
@@ -659,11 +669,13 @@ Conn_Handler(void)
 	int i;
 	size_t wdatalen;
 	struct timeval tv;
-	time_t t;
+	time_t t, notify_t = 0;
 	bool command_available;
+	char status[200];
 
 	Log(LOG_NOTICE, "Server \"%s\" (on \"%s\") ready.",
 	    Client_ID(Client_ThisServer()), Client_Hostname(Client_ThisServer()));
+	Signal_NotifySvcMgr("READY=1\n");
 
 	while (!NGIRCd_SignalQuit && !NGIRCd_SignalRestart) {
 		t = time(NULL);
@@ -772,20 +784,34 @@ Conn_Handler(void)
 			exit(1);
 		}
 
-		/* Should ngIRCd timeout when idle? */
+		t = time(NULL);
 		if (Conf_IdleTimeout > 0 && NumConnectionsAccepted > 0
-		    && idle_t > 0 && time(NULL) - idle_t >= Conf_IdleTimeout) {
+		    && idle_t > 0 && t - idle_t >= Conf_IdleTimeout) {
+			/* Should ngIRCd timeout when idle? */
 			LogDebug("Server idle timeout reached: %d second%s. Initiating shutdown ...",
 				 Conf_IdleTimeout,
 				 Conf_IdleTimeout == 1 ? "" : "s");
 			NGIRCd_SignalQuit = true;
+		} else if (Signal_NotifySvcMgr_Possible() && t - notify_t > 3) {
+			/* Send the current status to the service manager. */
+			snprintf(status, sizeof(status),
+				 "WATCHDOG=1\nSTATUS=%ld connection%s established (%ld user%s, %ld server%s), %ld maximum. %ld accepted in total.\n",
+				 NumConnections, NumConnections == 1 ? "" : "s",
+				 Client_MyUserCount(), Client_MyUserCount() == 1 ? "" : "s",
+				 Client_MyServerCount(), Client_MyServerCount() == 1 ? "" : "s",
+				 NumConnectionsMax, NumConnectionsAccepted);
+			Signal_NotifySvcMgr(status);
+			notify_t = t;
 		}
 	}
 
-	if (NGIRCd_SignalQuit)
+	if (NGIRCd_SignalQuit) {
 		Log(LOG_NOTICE | LOG_snotice, "Server going down NOW!");
-	else if (NGIRCd_SignalRestart)
+		Signal_NotifySvcMgr("STOPPING=1\n");
+	} else if (NGIRCd_SignalRestart) {
 		Log(LOG_NOTICE | LOG_snotice, "Server restarting NOW!");
+		Signal_NotifySvcMgr("RELOADING=1\n");
+	}
 } /* Conn_Handler */
 
 /**
@@ -795,7 +821,7 @@ Conn_Handler(void)
  * the result is a valid IRC message (oversized messages are shortened, for
  * example). Then it calls the Conn_Write() function to do the actual sending.
  *
- * @param Idx		Index fo the connection.
+ * @param Idx		Index of the connection.
  * @param Format	Format string, see printf().
  * @returns		true on success, false otherwise.
  */
@@ -875,7 +901,7 @@ va_dcl
 
 #ifdef SNIFFER
 	if (NGIRCd_Sniffer)
-		Log(LOG_DEBUG, " -> connection %d: '%s'.", Idx, buffer);
+		LogDebug("-> connection %d: '%s'.", Idx, buffer);
 #endif
 
 	len = strlcat( buffer, "\r\n", sizeof( buffer ));
@@ -1055,8 +1081,10 @@ Conn_Close(CONN_ID Idx, const char *LogMsg, const char *FwdMsg, bool InformClien
 		}
 #endif
 		/* Send ERROR to client (see RFC 2812, section 3.1.7) */
-		if (FwdMsg)
-			Conn_WriteStr(Idx, "ERROR :%s", FwdMsg);
+		if (c)
+			Conn_WriteStr(Idx, "ERROR :Closing connection: %s[%s@%s] (%s)",
+				      Client_ID(c), Client_User(c), Client_Hostname(c),
+				      FwdMsg ? FwdMsg : "\"\"");
 		else
 			Conn_WriteStr(Idx, "ERROR :Closing connection");
 	}
@@ -1175,7 +1203,7 @@ Conn_CountMax(void)
 } /* Conn_CountMax */
 
 /**
- * Get number of connections accepted since the daemon startet.
+ * Get number of connections accepted since the daemon started.
  *
  * @returns	Number of connections accepted.
  */
@@ -1289,14 +1317,12 @@ Handle_Write( CONN_ID Idx )
 		if (errno == EAGAIN || errno == EINTR)
 			return true;
 
-		/* Log write errors but do not close the connection yet.
-		 * Calling Conn_Close() now could result in too many recursive calls.
-		 */
-		if (!Conn_OPTION_ISSET(&My_Connections[Idx], CONN_ISCLOSING))
+		if (!Conn_OPTION_ISSET(&My_Connections[Idx], CONN_ISCLOSING)) {
 			Log(LOG_ERR,
 			    "Write error on connection %d (socket %d): %s!",
 			    Idx, My_Connections[Idx].sock, strerror(errno));
-		else
+			Conn_Close(Idx, "Write error", NULL, false);
+		} else
 			LogDebug("Recursive write error on connection %d (socket %d): %s!",
 				 Idx, My_Connections[Idx].sock, strerror(errno));
 
@@ -1356,13 +1382,14 @@ New_Connection(int Sock, UNUSED bool IsSSL)
 	new_sock = accept(Sock, (struct sockaddr *)&new_addr,
 			  (socklen_t *)&new_sock_len);
 	if (new_sock < 0) {
-		Log(LOG_CRIT, "Can't accept connection: %s!", strerror(errno));
+		Log(LOG_CRIT, "Can't accept connection on socket %d: %s!",
+		    Sock, strerror(errno));
 		return -1;
 	}
 	NumConnectionsAccepted++;
 
 	if (!ng_ipaddr_tostr_r(&new_addr, ip_str)) {
-		Log(LOG_CRIT, "fd %d: Can't convert IP address!", new_sock);
+		Log(LOG_CRIT, "Can't convert peer IP address of socket %d!", new_sock);
 		Simple_Message(new_sock, "ERROR :Internal Server Error");
 		close(new_sock);
 		return -1;
@@ -1375,7 +1402,8 @@ New_Connection(int Sock, UNUSED bool IsSSL)
 	fromhost(&req);
 	if (!hosts_access(&req)) {
 		Log(deny_severity,
-		    "Refused connection from %s (by TCP Wrappers)!", ip_str);
+		    "Refused connection from %s on socket %d (by TCP Wrappers)!",
+		    ip_str, Sock);
 		Simple_Message(new_sock, "ERROR :Connection refused");
 		close(new_sock);
 		return -1;
@@ -1400,8 +1428,8 @@ New_Connection(int Sock, UNUSED bool IsSSL)
 	if ((Conf_MaxConnectionsIP > 0) && (cnt >= Conf_MaxConnectionsIP)) {
 		/* Access denied, too many connections from this IP address! */
 		Log(LOG_ERR,
-		    "Refused connection from %s: too may connections (%ld) from this IP address!",
-		    ip_str, cnt);
+		    "Refused connection from %s on socket %d: too may connections (%ld) from this IP address!",
+		    ip_str, Sock, cnt);
 		Simple_Message(new_sock,
 			       "ERROR :Connection refused, too many connections from your IP address");
 		close(new_sock);
@@ -1454,7 +1482,7 @@ New_Connection(int Sock, UNUSED bool IsSSL)
 	Account_Connection();
 
 #ifdef SSL_SUPPORT
-	/* Delay connection initalization until SSL handshake is finished */
+	/* Delay connection initialization until SSL handshake is finished */
 	if (!IsSSL)
 #endif
 		Conn_StartLogin(new_sock);
@@ -1474,10 +1502,6 @@ Conn_StartLogin(CONN_ID Idx)
 
 	assert(Idx >= 0);
 
-	/* Nothing to do if DNS (and resolver subprocess) is disabled */
-	if (!Conf_DNS)
-		return;
-
 #ifdef IDENTAUTH
 	/* Should we make an IDENT request? */
 	if (Conf_Ident)
@@ -1487,13 +1511,21 @@ Conn_StartLogin(CONN_ID Idx)
 	if (Conf_NoticeBeforeRegistration) {
 		/* Send "NOTICE *" messages to the client */
 #ifdef IDENTAUTH
-		if (Conf_Ident)
-			(void)Conn_WriteStr(Idx,
-				"NOTICE * :*** Looking up your hostname and checking ident");
-		else
+		if (Conf_Ident) {
+			if (Conf_DNS)
+				(void)Conn_WriteStr(Idx,
+					"NOTICE * :*** Looking up your hostname and checking ident");
+			else
+				(void)Conn_WriteStr(Idx,
+					"NOTICE * :*** Checking ident");
+		} else
 #endif
+		if(Conf_DNS)
 			(void)Conn_WriteStr(Idx,
 				"NOTICE * :*** Looking up your hostname");
+		else
+			(void)Conn_WriteStr(Idx,
+				"NOTICE * :*** Processing your connection");
 		/* Send buffered data to the client, but break on errors
 		 * because Handle_Write() would have closed the connection
 		 * again in this case! */
@@ -1501,8 +1533,9 @@ Conn_StartLogin(CONN_ID Idx)
 			return;
 	}
 
-	Resolve_Addr(&My_Connections[Idx].proc_stat, &My_Connections[Idx].addr,
-		     ident_sock, cb_Read_Resolver_Result);
+	Resolve_Addr_Ident(&My_Connections[Idx].proc_stat,
+			   &My_Connections[Idx].addr,
+			   ident_sock, cb_Read_Resolver_Result);
 }
 
 /**
@@ -1524,7 +1557,7 @@ Account_Connection(void)
  * a 1:1 mapping today) and enlarge the "connection pool" accordingly.
  *
  * @param Sock	Socket handle.
- * @returns	Connecion index or NONE when the pool is too small.
+ * @returns	Connection index or NONE when the pool is too small.
  */
 static CONN_ID
 Socket2Index( int Sock )
@@ -2287,13 +2320,16 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
 	 * the resolver results, so we don't have to worry to override settings
 	 * from these commands here. */
 	if(Client_Type(c) == CLIENT_UNKNOWN) {
-		strlcpy(My_Connections[i].host, readbuf,
-			sizeof(My_Connections[i].host));
-		Client_SetHostname(c, readbuf);
-		if (Conf_NoticeBeforeRegistration)
-			(void)Conn_WriteStr(i,
+		if (readbuf[0]) {
+			/* We got a hostname */
+			strlcpy(My_Connections[i].host, readbuf,
+				sizeof(My_Connections[i].host));
+			Client_SetHostname(c, readbuf);
+			if (Conf_NoticeBeforeRegistration)
+				(void)Conn_WriteStr(i,
 					"NOTICE * :*** Found your hostname: %s",
 					My_Connections[i].host);
+		}
 #ifdef IDENTAUTH
 		++identptr;
 		if (*identptr) {
@@ -2341,10 +2377,8 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
 
 		Class_HandleServerBans(c);
 	}
-#ifdef DEBUG
 	else
 		LogDebug("Resolver: discarding result for already registered connection %d.", i);
-#endif
 } /* cb_Read_Resolver_Result */
 
 /**
@@ -2539,6 +2573,13 @@ cb_listen_ssl(int sock, short irrelevant)
 /**
  * IO callback for new outgoing SSL-enabled server connections.
  *
+ * IMPORTANT: The SSL session has been validated before, but all errors have
+ * been ignored so far! The reason for this is that the generic SSL code has no
+ * idea if the new session actually belongs to a server, as this only becomes
+ * clear when the remote peer sends its PASS command (and we have to handle
+ * invalid client certificates!). Therefore, it is important to check the
+ * status of the SSL session first before continuing the server handshake here!
+ *
  * @param sock		Socket descriptor.
  * @param unused	(ignored IO specification)
  */
@@ -2546,6 +2587,7 @@ static void
 cb_connserver_login_ssl(int sock, short unused)
 {
 	CONN_ID idx = Socket2Index(sock);
+	int serveridx;
 
 	(void) unused;
 
@@ -2564,9 +2606,26 @@ cb_connserver_login_ssl(int sock, short unused)
 			return;
 	}
 
-	Log( LOG_INFO, "SSL connection %d with \"%s:%d\" established.", idx,
-	    My_Connections[idx].host, Conf_Server[Conf_GetServer( idx )].port );
+	serveridx = Conf_GetServer(idx);
+	assert(serveridx >= 0);
 
+	/* The SSL handshake is done, but validation results were ignored so
+	 * far, so let's see where we are: */
+	LogDebug("SSL handshake on socket %d done.", idx);
+	if (!Conn_OPTION_ISSET(&My_Connections[idx], CONN_SSL_PEERCERT_OK)) {
+		if (Conf_Server[serveridx].SSLVerify) {
+			Log(LOG_ERR,
+				"Peer certificate check failed for \"%s\" on connection %d!",
+				My_Connections[idx].host, idx);
+			Conn_Close(idx, "Valid certificate required",
+				   NULL, false);
+			return;
+		}
+		Log(LOG_WARNING,
+			"Peer certificate check failed for \"%s\" on connection %d, but \"SSLVerify\" is disabled. Continuing ...",
+			My_Connections[idx].host, idx);
+	}
+	LogDebug("Server certificate accepted, continuing server login ...");
 	server_login(idx);
 }
 
@@ -2688,7 +2747,6 @@ Conn_SetCertFp(UNUSED CONN_ID Idx, UNUSED const char *fingerprint)
 
 #endif /* SSL_SUPPORT */
 
-#ifdef DEBUG
 
 /**
  * Dump internal state of the "connection module".
@@ -2698,11 +2756,11 @@ Conn_DebugDump(void)
 {
 	int i;
 
-	Log(LOG_DEBUG, "Connection status:");
+	LogDebug("Connection status:");
 	for (i = 0; i < Pool_Size; i++) {
 		if (My_Connections[i].sock == NONE)
 			continue;
-		Log(LOG_DEBUG,
+		LogDebug(
 		    " - %d: host=%s, lastdata=%ld, lastping=%ld, delaytime=%ld, flag=%d, options=%d, bps=%d, client=%s",
 		    My_Connections[i].sock, My_Connections[i].host,
 		    My_Connections[i].lastdata, My_Connections[i].lastping,
@@ -2712,6 +2770,5 @@ Conn_DebugDump(void)
 	}
 } /* Conn_DumpClients */
 
-#endif /* DEBUG */
 
 /* -eof- */

+ 2 - 3
src/ngircd/conn.h

@@ -40,7 +40,8 @@
 #define CONN_SSL		32	/* this connection is SSL encrypted */
 #define CONN_SSL_WANT_WRITE	64	/* SSL/TLS library needs to write protocol data */
 #define CONN_SSL_WANT_READ	128	/* SSL/TLS library needs to read protocol data */
-#define CONN_SSL_FLAGS_ALL	(CONN_SSL_CONNECT|CONN_SSL|CONN_SSL_WANT_WRITE|CONN_SSL_WANT_READ)
+#define CONN_SSL_PEERCERT_OK	256	/* peer presented a valid certificate (used to check inbound server auth */
+#define CONN_SSL_FLAGS_ALL	(CONN_SSL_CONNECT|CONN_SSL|CONN_SSL_WANT_WRITE|CONN_SSL_WANT_READ|CONN_SSL_PEERCERT_OK)
 #endif
 typedef int CONN_ID;
 
@@ -166,9 +167,7 @@ GLOBAL long Conn_GetAuthPing PARAMS((CONN_ID Idx));
 GLOBAL void Conn_SetAuthPing PARAMS((CONN_ID Idx, long ID));
 #endif
 
-#ifdef DEBUG
 GLOBAL void Conn_DebugDump PARAMS((void));
-#endif
 
 #endif
 

+ 7 - 4
src/ngircd/defines.h

@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@
 #define LINE_LEN 1024
 
 /** Max. length of a log message. */
-#define MAX_LOG_MSG_LEN 256
+#define MAX_LOG_MSG_LEN 1024
 
 /** Max. length of file name. */
 #define FNAME_LEN 256
@@ -64,6 +64,9 @@
 /** Size of buffer for PAM service name. */
 #define MAX_PAM_SERVICE_NAME_LEN 64
 
+/** Maximum number of file descriptors to request. */
+#define MAX_FD_LIMIT 100000
+
 
 /* Hard-coded (default) options */
 
@@ -123,7 +126,7 @@
 /** Max. host name length (including NULL). */
 #define CLIENT_HOST_LEN 64
 
-/** Max. mask lenght (including NULL). */
+/** Max. mask length (including NULL). */
 #define MASK_LEN (2 * CLIENT_HOST_LEN)
 
 /** Max. length of all client modes (including NULL). */
@@ -203,7 +206,7 @@
 
 /* Defaults and limits for IRC commands */
 
-/** Max. number of elemets allowed in channel invite and ban lists. */
+/** Max. number of elements allowed in channel invite and ban lists. */
 #define MAX_HNDL_CHANNEL_LISTS 50
 
 /** Max. number of channel modes with arguments per MODE command. */

+ 11 - 0
src/ngircd/hash.c

@@ -108,16 +108,27 @@ jenkins_hash(UINT8 *k, UINT32 length, UINT32 initval)
 
 	{
 		case 12: c+=((UINT32)k[11])<<24;
+		/* fall through */
 		case 11: c+=((UINT32)k[10]<<16);
+		/* fall through */
 		case 10: c+=((UINT32)k[9]<<8);
+		/* fall through */
 		case 9 : c+=k[8];
+		/* fall through */
 		case 8 : b+=((UINT32)k[7]<<24);
+		/* fall through */
 		case 7 : b+=((UINT32)k[6]<<16);
+		/* fall through */
 		case 6 : b+=((UINT32)k[5]<<8);
+		/* fall through */
 		case 5 : b+=k[4];
+		/* fall through */
 		case 4 : a+=((UINT32)k[3]<<24);
+		/* fall through */
 		case 3 : a+=((UINT32)k[2]<<16);
+		/* fall through */
 		case 2 : a+=((UINT32)k[1]<<8);
+		/* fall through */
 		case 1 : a+=k[0];
 			 break;
 		case 0 : return c;

+ 1 - 1
src/ngircd/io.c

@@ -148,7 +148,7 @@ static void io_docallback PARAMS((int fd, short what));
 static void
 io_debug(const char *s, int fd, int what)
 {
-	Log(LOG_DEBUG, "%s: %d, %d\n", s, fd, what);
+	LogDebug("%s: %d, %d\n", s, fd, what);
 }
 #else
 static inline void

+ 28 - 29
src/ngircd/irc-channel.c

@@ -176,7 +176,7 @@ join_set_channelmodes(CHANNEL *chan, CLIENT *target, const char *flags)
  * and MODE commands.
  *
  * @param To		Forward JOIN (and MODE) command to this peer server
- * @param Prefix	Client used to prefix the genrated commands
+ * @param Prefix	Client used to prefix the generated commands
  * @param Data		Parameters of JOIN command to forward, probably
  *			containing channel modes separated by ASCII 7.
  */
@@ -209,7 +209,7 @@ cb_join_forward(CLIENT *To, CLIENT *Prefix, void *Data)
  * This function calls cb_join_forward(), which differentiates between
  * protocol implementations (e.g. RFC 2812, RFC 1459).
  *
- * @param Client	Client used to prefix the genrated commands
+ * @param Client	Client used to prefix the generated commands
  * @param target	Forward JOIN (and MODE) command to this peer server
  * @param chan		Channel structure
  * @param channame	Channel name
@@ -248,46 +248,38 @@ join_forward(CLIENT *Client, CLIENT *target, CHANNEL *chan,
 } /* join_forward */
 
 /**
- * Acknowledge user JOIN request and send "channel info" numerics.
+ * Send channel TOPIC and NAMES list to a newly (N)JOIN'ed client.
  *
- * @param Client	Client used to prefix the genrated commands
- * @param target	Forward commands/numerics to this user
- * @param chan		Channel structure
- * @param channame	Channel name
+ * @param Client	Client used to prefix the generated commands
+ * @param Chan		Channel structure
  */
-static bool
-join_send_topic(CLIENT *Client, CLIENT *target, CHANNEL *chan,
-					const char *channame)
+GLOBAL bool
+IRC_Send_Channel_Info(CLIENT *Client, CHANNEL *Chan)
 {
 	const char *topic;
 
-	if (Client_Type(Client) != CLIENT_USER)
-		return true;
-	/* acknowledge join */
-	if (!IRC_WriteStrClientPrefix(Client, target, "JOIN :%s", channame))
-		return false;
-
-	/* Send topic to client, if any */
-	topic = Channel_Topic(chan);
+	/* Send the topic (if any) to the new client: */
+	topic = Channel_Topic(Chan);
 	assert(topic != NULL);
 	if (*topic) {
 		if (!IRC_WriteStrClient(Client, RPL_TOPIC_MSG,
-			Client_ID(Client), channame, topic))
+			Client_ID(Client), Channel_Name(Chan), topic))
 				return false;
 #ifndef STRICT_RFC
 		if (!IRC_WriteStrClient(Client, RPL_TOPICSETBY_MSG,
-			Client_ID(Client), channame,
-			Channel_TopicWho(chan),
-			Channel_TopicTime(chan)))
+			Client_ID(Client), Channel_Name(Chan),
+			Channel_TopicWho(Chan),
+			Channel_TopicTime(Chan)))
 				return false;
 #endif
 	}
-	/* send list of channel members to client */
-	if (!IRC_Send_NAMES(Client, chan))
+
+	/* Send list of channel members to the new client: */
+	if (!IRC_Send_NAMES(Client, Chan))
 		return false;
-	return IRC_WriteStrClient(Client, RPL_ENDOFNAMES_MSG, Client_ID(Client),
-				  Channel_Name(chan));
-} /* join_send_topic */
+	return IRC_WriteStrClient(Client, RPL_ENDOFNAMES_MSG,
+				  Client_ID(Client), Channel_Name(Chan));
+}
 
 /**
  * Handler for the IRC "JOIN" command.
@@ -408,8 +400,15 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
 
 		join_forward(Client, target, chan, channame);
 
-		if (!join_send_topic(Client, target, chan, channame))
-			break; /* write error */
+		if (Client_Type(Client) == CLIENT_USER) {
+			/* Acknowledge join ... */
+			if (!IRC_WriteStrClientPrefix(Client, target,
+						      "JOIN :%s", channame))
+				break; /* write error */
+			/* ... and greet new user: */
+			if (!IRC_Send_Channel_Info(Client, chan))
+				break; /* write error */
+		}
 
 	join_next:
 		/* next channel? */

+ 3 - 1
src/ngircd/irc-channel.h

@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2022 by Alexander Barton (alex@barton.de)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -25,6 +25,8 @@ GLOBAL bool IRC_LIST PARAMS((CLIENT *Client, REQUEST *Req ));
 
 GLOBAL bool IRC_CHANINFO PARAMS((CLIENT *Client, REQUEST *Req ));
 
+GLOBAL bool IRC_Send_Channel_Info PARAMS((CLIENT *Client, CHANNEL *Chan));
+
 #endif
 
 /* -eof- */

+ 8 - 5
src/ngircd/irc-info.c

@@ -138,7 +138,7 @@ who_flags_qualifier(CLIENT *Client, const char *chan_user_modes,
 static bool
 IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
 {
-	bool is_visible, is_member, is_ircop;
+	bool is_visible, is_member, is_ircop, is_oper;
 	CL2CHAN *cl2chan;
 	char flags[10];
 	CLIENT *c;
@@ -148,9 +148,10 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
 	assert( Chan != NULL );
 
 	is_member = Channel_IsMemberOf(Chan, Client);
+	is_oper = Client_HasMode(Client, 'o');
 
 	/* Secret channel? */
-	if (!is_member && Channel_HasMode(Chan, 's'))
+	if (!is_member && !is_oper && Channel_HasMode(Chan, 's'))
 		return IRC_WriteStrClient(Client, RPL_ENDOFWHO_MSG,
 					  Client_ID(Client), Channel_Name(Chan));
 
@@ -163,7 +164,7 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
 			continue;
 
 		is_visible = !Client_HasMode(c, 'i');
-		if (is_member || is_visible) {
+		if (is_member || is_visible || is_oper) {
 			memset(flags, 0, sizeof(flags));
 
 			if (Client_HasMode(c, 'a'))
@@ -909,7 +910,7 @@ IRC_STATS( CLIENT *Client, REQUEST *Req )
 		if (!Op_Check(from, Req))
 			return Op_NoPrivileges(from, Req);
 		more_links = true;
-
+		/* fall through */
 	case 'l':	/* Link status (servers and own link) */
 		time_now = time(NULL);
 		for (con = Conn_First(); con != NONE; con = Conn_Next(con)) {
@@ -1264,6 +1265,8 @@ IRC_WHOIS( CLIENT *Client, REQUEST *Req )
 
 			if (Client_Type(c) != CLIENT_USER)
 				continue;
+			if (Client_HasMode(c, 'i'))
+				continue;
 			if (!MatchCaseInsensitive(query, Client_ID(c)))
 				continue;
 			if (!IRC_WHOIS_SendReply(Client, from, c))
@@ -1372,7 +1375,7 @@ IRC_WHOWAS( CLIENT *Client, REQUEST *Req )
 /**
  * Send LUSERS reply to a client.
  *
- * @param Client The receipient of the information.
+ * @param Client The recipient of the information.
  * @return CONNECTED or DISCONNECTED.
  */
 GLOBAL bool

+ 2 - 5
src/ngircd/irc-login.c

@@ -774,7 +774,7 @@ IRC_PING(CLIENT *Client, REQUEST *Req)
 		return IRC_WriteErrClient(Client, ERR_NOSUCHSERVER_MSG,
 					Client_ID(Client), Req->prefix);
 
-	Log(LOG_DEBUG, "Connection %d: got PING, sending PONG ...",
+	LogDebug("Connection %d: got PING, sending PONG ...",
 	    Client_Conn(Client));
 
 #ifdef STRICT_RFC
@@ -877,9 +877,7 @@ IRC_PONG(CLIENT *Client, REQUEST *Req)
 		    (long)(time(NULL) - Conn_GetSignon(conn)),
 		    time(NULL) - Conn_GetSignon(conn) == 1 ? "" : "s",
 		    Client_UserCount(), Channel_CountVisible(NULL));
-	}
-#ifdef DEBUG
-	else {
+	} else {
 		if (Conn_LastPing(conn) > 1)
 			LogDebug("Connection %d: received PONG. Lag: %ld seconds.",
 				 conn, (long)(time(NULL) - Conn_LastPing(conn)));
@@ -887,7 +885,6 @@ IRC_PONG(CLIENT *Client, REQUEST *Req)
 			LogDebug("Got unexpected PONG on connection %d. Ignored.",
 				 conn);
 	}
-#endif
 
 	/* We got a PONG, so signal that none is pending on this connection. */
 	Conn_UpdatePing(conn, 1);

+ 3 - 1
src/ngircd/irc-metadata.c

@@ -72,7 +72,9 @@ IRC_METADATA(CLIENT *Client, REQUEST *Req)
 	}
 
 	if (strcasecmp(Req->argv[1], "cloakhost") == 0) {
-		Client_UpdateCloakedHostname(target, prefix, Req->argv[2]);
+		/* Set or remove a "cloaked hostname". */
+		Client_UpdateCloakedHostname(target, prefix,
+					     *Req->argv[2] ? Req->argv[2] : NULL);
 		if (Client_Conn(target) > NONE && Client_HasMode(target, 'x'))
 			IRC_WriteStrClientPrefix(target, prefix,
 					RPL_HOSTHIDDEN_MSG, Client_ID(target),

+ 83 - 52
src/ngircd/irc-mode.c

@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2023 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -281,7 +281,7 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
 			break;
 		default:
 			if (Client_Type(Client) != CLIENT_SERVER) {
-				Log(LOG_DEBUG,
+				LogDebug(
 				    "Unknown mode \"%c%c\" from \"%s\"!?",
 				    set ? '+' : '-', *mode_ptr,
 				    Client_ID(Origin));
@@ -292,7 +292,7 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
 							*mode_ptr);
 				x[0] = '\0';
 			} else {
-				Log(LOG_DEBUG,
+				LogDebug(
 				    "Handling unknown mode \"%c%c\" from \"%s\" for \"%s\" ...",
 				    set ? '+' : '-', *mode_ptr,
 				    Client_ID(Origin), Client_ID(Target));
@@ -575,6 +575,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 					Client_ID(Origin), Channel_Name(Channel));
 				goto chan_exit;
 			}
+			/* fall through */
 		case 'i': /* Invite only */
 		case 'V': /* Invite disallow */
 		case 'M': /* Only identified nicks can write */
@@ -609,33 +610,43 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 						Channel_Name(Channel));
 				break;
 			}
-			if (arg_arg > mode_arg) {
-				if (is_oper || is_machine || is_owner ||
-				    is_admin || is_op || is_halfop) {
-					Channel_ModeDel(Channel, 'k');
-					Channel_SetKey(Channel,
-						       Req->argv[arg_arg]);
-					strlcpy(argadd, Channel_Key(Channel),
-						sizeof(argadd));
-					x[0] = *mode_ptr;
-				} else {
+			if (arg_arg <= mode_arg) {
+				if (is_machine)
+					Log(LOG_ERR,
+					    "Got MODE +k without key for \"%s\" from \"%s\"! Ignored.",
+					    Channel_Name(Channel), Client_ID(Origin));
+				else
 					connected = IRC_WriteErrClient(Origin,
-						ERR_CHANOPRIVSNEEDED_MSG,
+						ERR_NEEDMOREPARAMS_MSG,
+						Client_ID(Origin), Req->command);
+				goto chan_exit;
+			}
+			if (!Req->argv[arg_arg][0] || strchr(Req->argv[arg_arg], ' ')) {
+				if (is_machine)
+					Log(LOG_ERR,
+					    "Got invalid key on MODE +k for \"%s\" from \"%s\"! Ignored.",
+					    Channel_Name(Channel), Client_ID(Origin));
+				else
+					connected = IRC_WriteErrClient(Origin,
+					       ERR_INVALIDMODEPARAM_MSG,
 						Client_ID(Origin),
-						Channel_Name(Channel));
-				}
-				Req->argv[arg_arg][0] = '\0';
-				arg_arg++;
+						Channel_Name(Channel), 'k');
+				goto chan_exit;
+			}
+			if (is_oper || is_machine || is_owner ||
+			    is_admin || is_op || is_halfop) {
+				Channel_ModeDel(Channel, 'k');
+				Channel_SetKey(Channel, Req->argv[arg_arg]);
+				strlcpy(argadd, Channel_Key(Channel), sizeof(argadd));
+				x[0] = *mode_ptr;
 			} else {
-#ifdef STRICT_RFC
-				/* Only send error message in "strict" mode,
-				 * this is how ircd2.11 and others behave ... */
 				connected = IRC_WriteErrClient(Origin,
-					ERR_NEEDMOREPARAMS_MSG,
-					Client_ID(Origin), Req->command);
-#endif
-				goto chan_exit;
+					ERR_CHANOPRIVSNEEDED_MSG,
+					Client_ID(Origin),
+					Channel_Name(Channel));
 			}
+			Req->argv[arg_arg][0] = '\0';
+			arg_arg++;
 			break;
 		case 'l': /* Member limit */
 			if (Mode_Limit_Reached(Client, mode_arg_count++))
@@ -651,35 +662,44 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 						Channel_Name(Channel));
 				break;
 			}
-			if (arg_arg > mode_arg) {
-				if (is_oper || is_machine || is_owner ||
-				    is_admin || is_op || is_halfop) {
-					l = atol(Req->argv[arg_arg]);
-					if (l > 0 && l < 0xFFFF) {
-						Channel_ModeDel(Channel, 'l');
-						Channel_SetMaxUsers(Channel, l);
-						snprintf(argadd, sizeof(argadd),
-							 "%ld", l);
-						x[0] = *mode_ptr;
-					}
-				} else {
+			if (arg_arg <= mode_arg) {
+				if (is_machine)
+					Log(LOG_ERR,
+					    "Got MODE +l without limit for \"%s\" from \"%s\"! Ignored.",
+					    Channel_Name(Channel), Client_ID(Origin));
+				else
 					connected = IRC_WriteErrClient(Origin,
-						ERR_CHANOPRIVSNEEDED_MSG,
+						ERR_NEEDMOREPARAMS_MSG,
+						Client_ID(Origin), Req->command);
+				goto chan_exit;
+			}
+			l = atol(Req->argv[arg_arg]);
+			if (l <= 0 || l >= 0xFFFF) {
+				if (is_machine)
+					Log(LOG_ERR,
+					    "Got MODE +l with invalid limit for \"%s\" from \"%s\"! Ignored.",
+					    Channel_Name(Channel), Client_ID(Origin));
+				else
+					connected = IRC_WriteErrClient(Origin,
+						ERR_INVALIDMODEPARAM_MSG,
 						Client_ID(Origin),
-						Channel_Name(Channel));
-				}
-				Req->argv[arg_arg][0] = '\0';
-				arg_arg++;
+						Channel_Name(Channel), 'l');
+				goto chan_exit;
+			}
+			if (is_oper || is_machine || is_owner ||
+			    is_admin || is_op || is_halfop) {
+				Channel_ModeDel(Channel, 'l');
+				Channel_SetMaxUsers(Channel, l);
+				snprintf(argadd, sizeof(argadd), "%ld", l);
+				x[0] = *mode_ptr;
 			} else {
-#ifdef STRICT_RFC
-				/* Only send error message in "strict" mode,
-				 * this is how ircd2.11 and others behave ... */
 				connected = IRC_WriteErrClient(Origin,
-					ERR_NEEDMOREPARAMS_MSG,
-					Client_ID(Origin), Req->command);
-#endif
-				goto chan_exit;
+					ERR_CHANOPRIVSNEEDED_MSG,
+					Client_ID(Origin),
+					Channel_Name(Channel));
 			}
+			Req->argv[arg_arg][0] = '\0';
+			arg_arg++;
 			break;
 		case 'O': /* IRC operators only */
 			if (set) {
@@ -721,6 +741,14 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 			break;
 		/* --- Channel user modes --- */
 		case 'q': /* Owner */
+			if(!is_oper && !is_machine && !is_owner) {
+				connected = IRC_WriteErrClient(Origin,
+					ERR_CHANOPPRIVTOOLOW_MSG,
+					Client_ID(Origin),
+					Channel_Name(Channel));
+				goto chan_exit;
+			}
+			/* fall through */
 		case 'a': /* Channel admin */
 			if(!is_oper && !is_machine && !is_owner && !is_admin) {
 				connected = IRC_WriteErrClient(Origin,
@@ -729,6 +757,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 					Channel_Name(Channel));
 				goto chan_exit;
 			}
+			/* fall through */
 		case 'o': /* Channel operator */
 			if(!is_oper && !is_machine && !is_owner &&
 			   !is_admin && !is_op) {
@@ -738,6 +767,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 					Channel_Name(Channel));
 				goto chan_exit;
 			}
+			/* fall through */
 		case 'h': /* Half Op */
 			if(!is_oper && !is_machine && !is_owner &&
 			   !is_admin && !is_op) {
@@ -747,6 +777,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 					Channel_Name(Channel));
 				goto chan_exit;
 			}
+			/* fall through */
 		case 'v': /* Voice */
 			if (arg_arg > mode_arg) {
 				if (is_oper || is_machine || is_owner ||
@@ -823,7 +854,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 			break;
 		default:
 			if (Client_Type(Client) != CLIENT_SERVER) {
-				Log(LOG_DEBUG,
+				LogDebug(
 				    "Unknown mode \"%c%c\" from \"%s\" on %s!?",
 				    set ? '+' : '-', *mode_ptr,
 				    Client_ID(Origin), Channel_Name(Channel));
@@ -833,7 +864,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 					Channel_Name(Channel));
 				x[0] = '\0';
 			} else {
-				Log(LOG_DEBUG,
+				LogDebug(
 				    "Handling unknown mode \"%c%c\" from \"%s\" on %s ...",
 				    set ? '+' : '-', *mode_ptr,
 				    Client_ID(Origin), Channel_Name(Channel));
@@ -904,7 +935,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 		if (Client_Type(Client) == CLIENT_SERVER) {
 			/* MODE requests for local channels from other servers
 			 * are definitely invalid! */
-			if (Channel_IsLocal(Channel)) {
+			if (Channel_IsLocal(Channel) && Client != Client_ThisServer()) {
 				Log(LOG_ALERT, "Got remote MODE command for local channel!? Ignored.");
 				return CONNECTED;
 			}

+ 3 - 3
src/ngircd/irc-op.c

@@ -222,9 +222,9 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
 
 	if (Client_Conn(target) > NONE) {
 		/* The target user is local, so we have to send the status code */
-		if (!IRC_WriteStrClientPrefix(from, target, RPL_INVITING_MSG,
-					       Client_ID(from), Req->argv[0],
-					       colon_if_necessary, Req->argv[1]))
+		if (!IRC_WriteStrClient(from, RPL_INVITING_MSG,
+					Client_ID(from), Req->argv[0],
+					colon_if_necessary, Req->argv[1]))
 			return DISCONNECTED;
 
 		if (Client_HasMode(target, 'a') &&

+ 1 - 1
src/ngircd/irc-oper.c

@@ -399,7 +399,7 @@ IRC_xLINE(CLIENT *Client, REQUEST *Req)
 					  Client_ID(Client), Req->command);
 
 	if (!Conf_AllowRemoteOper && Client_Type(Client) == CLIENT_SERVER) {
-		/* Explicitely forbid remote servers to modify "x-lines" when
+		/* Explicitly forbid remote servers to modify "x-lines" when
 		 * the "AllowRemoteOper" configuration option isn't set, even
 		 * when the command seems to originate from the remote server
 		 * itself: this prevents GLINE's to become set during server

+ 22 - 2
src/ngircd/irc-server.c

@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -32,6 +32,7 @@
 #include "numeric.h"
 #include "ngircd.h"
 #include "irc.h"
+#include "irc-channel.h"
 #include "irc-info.h"
 #include "irc-write.h"
 #include "op.h"
@@ -87,6 +88,19 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
 			return DISCONNECTED;
 		}
 
+#ifdef SSL_SUPPORT
+		/* Does this server require an SSL connection? */
+		if (Conf_Server[i].SSLConnect &&
+		    !(Conn_Options(Client_Conn(Client)) & CONN_SSL)) {
+			Log(LOG_ERR,
+			    "Connection %d: Server \"%s\" requires a secure connection!",
+			    Client_Conn(Client), Req->argv[0]);
+			Conn_Close(Client_Conn(Client), NULL,
+				   "Secure connection required", true);
+			return DISCONNECTED;
+		}
+#endif
+
 		/* Check server password */
 		if (strcmp(Conn_Password(Client_Conn(Client)),
 		    Conf_Server[i].pwd_in) != 0) {
@@ -298,7 +312,7 @@ IRC_NJOIN( CLIENT *Client, REQUEST *Req )
 			    "Failed to join client \"%s\" to channel \"%s\" (NJOIN): killing it!",
 			    ptr, channame);
 			IRC_KillClient(NULL, NULL, ptr, "Internal NJOIN error!");
-			Log(LOG_DEBUG, "... done.");
+			LogDebug("... done.");
 			goto skip_njoin;
 		}
 
@@ -320,6 +334,12 @@ IRC_NJOIN( CLIENT *Client, REQUEST *Req )
 		IRC_WriteStrChannelPrefix(Client, chan, c, false,
 					  "JOIN :%s", channame);
 
+		/* If the client is connected to this server, it was remotely
+		 * joined to the channel by another server/service: So send
+		 * TOPIC and NAMES messages like on a regular JOIN command! */
+		if(Client_Conn(c) != NONE)
+			IRC_Send_Channel_Info(c, chan);
+
 		/* Announce "channel user modes" to the channel, if any */
 		strlcpy(modes, Channel_UserModes(chan, c), sizeof(modes));
 		if (modes[0])

+ 1 - 1
src/ngircd/irc-write.c

@@ -406,7 +406,7 @@ IRC_WriteStrServersPrefixFlag_CB(CLIENT *ExceptOf, CLIENT *Prefix, char Flag,
 /**
  * Send a message to all "related" clients.
  *
- * Related clients are the one that share one ore more channels with the client
+ * Related clients are the one that share one or more channels with the client
  * sending this message.
  *
  * The message is only sent once per remote server.

+ 10 - 3
src/ngircd/irc.c

@@ -131,7 +131,7 @@ IRC_ERROR(CLIENT *Client, REQUEST *Req)
  * in this case, and the prefix in Req is NULL.
  *
  * @param Client The client from which this command has been received or
- * Client_ThisServer() when generated interanlly.
+ * Client_ThisServer() when generated internally.
  * @param Req Request structure with prefix and all parameters.
  * @return CONNECTED or DISCONNECTED.
  */
@@ -358,7 +358,7 @@ IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reaso
 	/* Do we know such a client in the network? */
 	c = Client_Search(Nick);
 	if (!c) {
-		LogDebug("Client with nick \"%s\" is unknown, not forwaring.", Nick);
+		LogDebug("Client with nick \"%s\" is unknown, not forwarding.", Nick);
 		return CONNECTED;
 	}
 
@@ -514,7 +514,7 @@ Option_String(UNUSED CONN_ID Idx)
 /**
  * Send a message to target(s).
  *
- * This function is used by IRC_{PRIVMSG|NOTICE|SQUERY} to actualy
+ * This function is used by IRC_{PRIVMSG|NOTICE|SQUERY} to actually
  * send the message(s).
  *
  * @param Client The client from which this command has been received.
@@ -572,6 +572,13 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
 #endif
 		message = Req->argv[1];
 
+	if (message[0] == '\0') {
+		if (!SendErrors)
+			return CONNECTED;
+		return IRC_WriteErrClient(Client, ERR_NOTEXTTOSEND_MSG,
+					  Client_ID(Client));
+	}
+
 	/* handle msgtarget = msgto *("," msgto) */
 	currentTarget = strtok_r(currentTarget, ",", &strtok_last);
 	ngt_UpperStr(Req->command);

+ 0 - 0
src/ngircd/lists.c


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません