diff options
| author | Mistivia <i@mistivia.com> | 2025-11-02 15:29:28 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-11-02 15:29:28 +0800 |
| commit | 9f42c2d5f911cb4e215d7873221e642ce7df4d61 (patch) | |
| tree | 6dac90a889a7402a9556d3d1bcc5cb53cdb9f123 /deprecated-ngircd | |
| parent | fb2d9de539b660a261af19b1cbcceb7ee7980cb1 (diff) | |
deprecate webircdateway and ngircd
Diffstat (limited to 'deprecated-ngircd')
137 files changed, 20640 insertions, 0 deletions
diff --git a/deprecated-ngircd/.clang_complete b/deprecated-ngircd/.clang_complete new file mode 100644 index 0000000..c518686 --- /dev/null +++ b/deprecated-ngircd/.clang_complete @@ -0,0 +1,4 @@ +-I./src +-I./src/ipaddr +-I./src/portab +-I./src/tool diff --git a/deprecated-ngircd/.dockerignore b/deprecated-ngircd/.dockerignore new file mode 120000 index 0000000..3e4e48b --- /dev/null +++ b/deprecated-ngircd/.dockerignore @@ -0,0 +1 @@ +.gitignore
\ No newline at end of file diff --git a/deprecated-ngircd/.editorconfig b/deprecated-ngircd/.editorconfig new file mode 100644 index 0000000..829ac5e --- /dev/null +++ b/deprecated-ngircd/.editorconfig @@ -0,0 +1,20 @@ +# 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. + +# .editorconfig: Editor settings, see <http://editorconfig.org>. + +root = true + +[*] +indent_style = tab +indent_size = 8 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/deprecated-ngircd/.github/workflows/ci.yml b/deprecated-ngircd/.github/workflows/ci.yml new file mode 100644 index 0000000..ae2c99e --- /dev/null +++ b/deprecated-ngircd/.github/workflows/ci.yml @@ -0,0 +1,81 @@ +name: ngIRCd CI + +on: + push: + branches: + - master + paths-ignore: + - 'COPYING' + - 'ChangeLog' + - 'NEWS' + - 'contrib/**' + - 'doc/**' + - 'man/**' + - '**.md' + - '**.txt' + pull_request: + branches: + - master + paths-ignore: + - 'COPYING' + - 'ChangeLog' + - 'NEWS' + - 'contrib/**' + - 'doc/**' + - 'man/**' + - '**.md' + - '**.txt' + +jobs: + build_and_distcheck: + name: build+test + strategy: + matrix: + os: + - ubuntu + - macos + toolchain: + - gcc + - llvm + include: + - os: ubuntu + toolchain: gcc + install_cmd: | + sudo apt update + sudo apt install build-essential expect libident-dev libpam0g-dev libssl-dev libwrap0-dev pkg-config telnet zlib1g-dev gcc + configure_cmd: | + ./configure CC=gcc --enable-ipv6 --with-iconv --with-ident --with-openssl --with-pam --with-tcp-wrappers --with-zlib + - os: ubuntu + toolchain: llvm + install_cmd: | + sudo apt update + sudo apt install build-essential expect libident-dev libpam0g-dev libssl-dev libwrap0-dev pkg-config telnet zlib1g-dev clang + configure_cmd: | + ./configure CC=clang --enable-ipv6 --with-iconv --with-ident --with-openssl --with-pam --with-tcp-wrappers --with-zlib + - os: macos + toolchain: gcc + install_cmd: | + brew update + brew install autoconf automake expect openssl@3 pkg-config telnet zlib gcc + configure_cmd: | + ./configure CC=gcc --enable-ipv6 --with-iconv --with-openssl --with-zlib + - os: macos + toolchain: llvm + install_cmd: | + brew update + brew install autoconf automake expect openssl@3 pkg-config telnet zlib llvm + configure_cmd: | + ./configure CC=clang --enable-ipv6 --with-iconv --with-openssl --with-zlib + runs-on: ${{ matrix.os }}-latest + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: ${{ matrix.install_cmd }} + - name: Generate build system files + run: ./autogen.sh + - name: Configure the build system + run: ${{ matrix.configure_cmd }} + - name: Build everything + run: make all + - name: Create distribution archive and run tests + run: make distcheck diff --git a/deprecated-ngircd/.gitignore b/deprecated-ngircd/.gitignore new file mode 100644 index 0000000..186c00c --- /dev/null +++ b/deprecated-ngircd/.gitignore @@ -0,0 +1,58 @@ +config.ini +rootfs/ +*.tar.gz +ngircd +.*.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 diff --git a/deprecated-ngircd/.mailmap b/deprecated-ngircd/.mailmap new file mode 100644 index 0000000..860a237 --- /dev/null +++ b/deprecated-ngircd/.mailmap @@ -0,0 +1,22 @@ +# mailmap file for git-[short]log and git-blame +# use "git shortlog -se" to see the list of all authors. + +Alexander Barton <alex@barton.de> <anonymous> +Alexander Barton <alex@barton.de> <alex@kfreebsd.barton.de> + +Ali Shemiran <ashemira@ucsd.edu> + +Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de> <debian.axhn@manchmal.in-ulm.de> + +Dana Dahlstrom <dana+ngIRCd@cs.ucsd.edu> <dana@cs.ucsd.edu> +Dana Dahlstrom <dana+ngIRCd@cs.ucsd.edu> <dana+70@cs.ucsd.edu> + +DNS <dns@rbose.org> + +Götz Hoffart <goetz@hoffart.de> + +LucentW <lucent@zebes.info> <LucentW@users.noreply.github.com> + +Michi <michi+ngircd@dataswamp.org> + +Sam James <sam@cmpct.info> <11667869+thesamesam@users.noreply.github.com> diff --git a/deprecated-ngircd/AUTHORS.md b/deprecated-ngircd/AUTHORS.md new file mode 100644 index 0000000..dad1f9a --- /dev/null +++ b/deprecated-ngircd/AUTHORS.md @@ -0,0 +1,82 @@ +# [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> +- Val 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 diff --git a/deprecated-ngircd/COPYING b/deprecated-ngircd/COPYING new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/deprecated-ngircd/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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. + + This program 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, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/deprecated-ngircd/ChangeLog b/deprecated-ngircd/ChangeLog new file mode 100644 index 0000000..0744e25 --- /dev/null +++ b/deprecated-ngircd/ChangeLog @@ -0,0 +1,2408 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (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 (2024-04-26) + + - Update ChangeLog, NEWS, AUTHORS.md & doc/Platforms.txt for ngIRCd 27. + - Clarify in the sample configuration file and the ngircd.conf(5) manual + page that the "CAFile" option is unset by default. + - Fix channel symbol returned in the RPL_NAMREPLY(353) numeric of NAMES + commands for secret (mode +s) channels: this should be "@", not "=". + Thanks Val Lorentz <progval+git@progval.net> for the patch! + Closes #313. + - Add an example filter file for "Fail2Ban": contrib/ngircd-fail2ban.conf. + - Don't abort startup when setgid/setuid() fails with EINVAL: Both setgid(2) + as well as setuid(2) can fail with EINVAL in addition to EPERM, their + manual pages state "EINVAL: The user/group ID specified in uid/gid is not + valid in this user namespace ". So not only treat EPERM as an "acceptable + error" and continue with logging the error, but do the same for EINVAL. + This was triggered by the Void Linux xbps-uunshare(1) tool used for + building "XBPS source packages" and reported by luca in #ngircd. Thanks! + - Test suite: Don't use "pgrep -u" when LOGNAME and USER are not set + Thanks for reporting this on IRC, luca! + + 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). + - No longer set "AI_ADDRCONFIG" when resolving host names, even when it + exists: with this option set, on an IPv6-only host, we prevent 127.0.0.1 + to get translated properly, even when the loopback interface has this + address configured! And as the test suite uses 127.0.0.1, it was broken + on IPv6-only hosts. + The drawback is that the resolver possibly returns more addresses now, + even of an unsupported/not connected address family; but this shouldn't + do much harm in practice, as ngIRCd iterates over all returned addresses + while trying to establish an outgoing connection. + Closes #281. + - Revert "Show allowed channel types in ISUPPORT(005) numeric only", which + was introduced in 26~rc1: This lead to some IRC clients assuming "oh, no + channel prefix characters at all, so no channels at all, so no PRIVMSG can + go to any channel" when "AllowedChannelTypes" was set to the empty string + ("") -- which is not the case when there are pre-defined channel set up or + other servers still having channels! + So "allowed channel types" != "supported channel types", and we always have + to list all supported ones in the ISUPPORT(005) numeric! + Closes #285. + - Test suite: Wait 2 seconds after reloading the daemon, which is required + because on reload, all listening ports are closed, configuration updated, + and then opened again. This lead to subsequent tests running while the + daemon isn't listening on any ports, and that's why some tests could fail. + Closes #280. + - platformtest.sh: Try to mangle CLang name more intelligently. + - Documentation: Fixed URLs of Atheme IRC services, updated all mentions + from CVS to Git, and updated Platforms.txt -- Oh, and it is 2021 now! ;-) + +ngIRCd 26 (2020-06-20) + + ngIRCd 26~rc2 (2020-06-11) + - Add AppStream metadata file (contrib/de.barton.ngircd.metainfo.xml). + - Don't send invalid CHANINFO commands when a channel has mode +k set but no + key is known to the server. This can happen with a misconfigured predefined + channel, for example, and looked like this: "CHANINFO #test +Pk 0 :" -- + note the unset key represented by the two spaces. Fix this by sending a + "*" in this case and update the CHANINFO documentation, too. + - ngircd.spec: Fix names of README.md and INSTALL.md, add ".md" extension. + - Update description texts in the README.md file, the RPM and Debian package + files and the manual page: bring them in line with the updated homepage. + - Server-Server protocol: Fix use-after-free when unregistering a directly + connected server sending a SQUIT for itself. + - Server-Server protocol: Detect bogus SERVER commands lacking a prefix. + Thanks Hilko Bengen (hillu) for finding & reporting this as well for the + patch & pull request (even if fixed differently). + Closes #275. + - Fix the PING-PONG logic: In ngIRCd 26~rc1 this was completely broken (while + trying to fix timeouts during server handshakes in bigger networks): the + daemon never disconnected any stale peers but kept sending out PINGs over + and over again ... + - Test suite: Add missing files needed to test SSL support to "EXTRA_DIST", + so that they are included in distribution archives: in rc1, "make check" + fails when using sources from an archive and enabling SSL support. + Thanks to Hilko Bengen <bengen@hilluzination.de> for the patch! + + ngIRCd 26~rc1 (2020-05-10) + - Tweak & update doc/HowToRelease.txt, .mailmap and AUTHORS files. + - Allow up to 512 characters per line in MOTD and help text files (but keep + in mind that lines can't get that long, because they have to be prefixed + before being sent to the client). But this allows for more fancy MOTDs :-) + Closes #271. + - Show the actually allowed channel types in the ISUPPORT(005) numeric which + are configured by the "AllowedChannelTypes" configuration variable. + Closes #273. + - Handle commands in the read buffer before reading more data and don't wait + for the network in this case: If there are more bytes in the read buffer + already than a single valid IRC command can get long (513 bytes), wait for + this/those command(s) to be handled first and don't try to read even more + data from the network (which most probably would overflow the read buffer + of this connection soon). + - Update Travis-CI configuration, "sudo" is deprecated. + - Log G-/K-Line changes only when not initiated by a server: this prevents + the log from becoming spammed during "net bursts". + - Update test suite to include SSL tests, including checking for reloading + certificates during runtime. + - Makefile.am: Replace "make" with "${MAKE}". This fixes warnings like this: + "warning: jobserver unavailable: using -j1. Add `+' to parent make rule." + Thanks to Sam James (sam_c) <sam@cmpct.info>! + Closes #270. + - Add support for GnuTLS certificate reload, which is quite handy when using + Let's Encrypt, for example. Until now this was only supported when linked + with OpenSSL. Thanks a lot, Hilko Bengen <bengen@hilluzination.de>! + - Remove deprecated legacy configuration options and related functions that + have been marked for removal for quite some time: + - PredefChannelsOnly (v22) + - NoticeAuth (v24) + - NoXXX (v19) + - Old '[GLOBAL]' section handling (v19) + Thanks to Michi <michi+ngircd@dataswamp.org> for the patch! + - Fix recursion bug on write errors: Depending on the stack size, too many + clients on the same channel quitting at the same time would trigger a crash + due to too many recursive calls to Conn_Close(). Thanks to Michi + <michi+ngircd@dataswamp.org> for the patch! + - Fix builds using GCC option -fno-common, which is the default starting with + GCC 10. Thanks to Michi <michi+ngircd@dataswamp.org> for the patch! + Closes #266. + - Convert INSTALL and README files to Markdown. + - Allow setting arbitrary channel modes in the configuration file by handling + them like in MODE commands, and allow multiple "Modes =" lines per [Channel] + section. Thanks to Michi <michi+ngircd@dataswamp.org>! + Closes #55. + - Add "FNC" (forced nick changes) to ISUPPORT(005) numeric. Most probably + this doesn't make any difference to any client, but it seems correct. + See <http://www.irc.org/tech_docs/005.html> for details. + - Reuse old SSL key if loading a new one failed. + - Remove outdated OpenBSD/NetBSD systrace.policy. + - Enhance handling of command line errors, and return with exit code 0 ("no + error") when "--help" or "--version" is used (which resulted in exit code 1, + "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 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. + - contrib/ngindent.sh: Add more GNU indent options for better results, and + add the ".sh" suffix to bring this script in line with the others in the + contrib/ folder. + - Add ./contrib/nglog.sh: This script parses the log output of ngircd(8), + and colorizes the messages according to their log level. Example usage: + ngircd -f $PWD/doc/sample-ngircd.conf -np | ./contrib/nglog.sh + - Log received signals with their names using strsignal(3), when available. + - Make test suite compatible with Haiku OS. + - Fix host mask cloaking bug, don't cloak multiple times: Previously, each + server would cloak every user's host mask. The problem is that if a network + has more than one server, then a user's host mask would get cloaked twice. + This patch ensures that a server only cloaks the host mask if it has not yet + been cloaked (the period indicates it's still an IP address). Thanks to + JRMU <jrmu@lecturify.com> for the patch! + Closes #228. + - Enlarge buffers of info texts to 128 bytes. This includes: + - "Real name" of a client (4th filed of the USER command). + - Server info text ("Info" configuration option). + - Admin info texts and email address ("AdminInfo1", "AdminInfo2" and + "AdminEmail" configuration options). + - Network name ("Network" configuration option). + The limit was 64 bytes before ... + Closes #258. + - Streamline handling of invalid and unset server name: Don't exit during + runtime (REHASH command, HUP signal), because the server name can't be + changed in this case anyway and the new invalid name will be ignored. + - Fix and extend documentation: Fix some typos, fix syntax of LINKS and LIST + commands, whitespace and spelling fixes, update dependencies and add some + more information about IRCv3 support. + Thanks to Thanks Windree, Étienne Mollier <etienne.mollier@mailoo.org> and + Christoph Biedl <debian.axhn@manchmal.in-ulm.de>. + Closes #264. + - Slightly reorder startup steps, and enhance logging: + - Show name of configuration file at the beginning of start up. + - Add a message when ngIRCd is ready, including its host name. + - Show name of configuration file on REHASH (SIGHUP), too. + - Change level of "done message" to NOTICE, like "starting" & "ready". + - Initialize IO functions before channels, connections, clients, ... + - configure.ng: OpenSSL can depends on lz or latomic so use pkg-config to + find those dependencies and fallback to existing mechanism. + Closes #256. + - ngircd.conf.5: Fix wording as suggested by lintian. + +ngIRCd 25 (2019-01-23) + + - Fix documentation of MotdPhrase length, which actually is 126 characters: + update sample configuration file as well as the man page. Thanks to + shankari <shankari@eecs.berkeley.edu>. + Closes #254. + - Implement new configuration option "MaxPenaltyTime", which configures the + maximum penalty time increase in seconds, per penalty event. Set to -1 for + no limit (the default), 0 to disable penalties altogether. ngIRCd doesn't + use penalty increases higher than 2 seconds during normal operation, so + values higher than 1 rarely make sense. + Disabling (or reducing) penalties can greatly speed up "make check" runs + for example, see below, but are mostly a debugging feature and normally + not meant to be used on production systems! + Some example timings running "make check" from my macOS workstation: + - MaxPenaltyTime not set: 4:41,79s + - "MaxPenaltyTime = 1": 3:14,71s + - "MaxPenaltyTime = 0": 25,46s + Closes #249 and #251. + - Fix compilation without deprecated OpenSSL APIs. Thanks to Rosen Penev + <rosenp@gmail.com> for the patch! + Closes #252. + - Update Xcode project for latest Xcode version (10.0) + - Fix some compiler warnings of Apple Xcode/Clang + - Allow a 5th parameter in WEBIRC. Thanks to "ItsOnlyBinary". + Closes #247. + - Update some more documentation files and source code comments. + - Platforms.txt: Add and update systems. + + ngIRCd 25~rc1 (2018-08-11) + - Update config.guess (2018-03-08) and config.sub (2018-03-08) files. + - Correctly retry to establish an outgoing connections when forking of the + resolver sub-process failed (for example because of lack of free memory). + Until now, such a connection was never retried once this error was hit. + Thanks to Robert Obermeier for reporting this bug! + Closes #243. + - Fix a "use after free" bug which can be triggered on a newly established + connection when the daemon handles an ERROR command received from the peer + during client login. Thanks a lot to Joseph Bisch <joseph.bisch@gmail.com> + for discovering and reporting this issue! + - Only send TOPIC updates to a channel when the topic actually changed: + This prevents the channel from becoming flooded by unnecessary TOPIC update + messages, that can happen when IRC services try to enforce a certain topic + but which is already set (at least on the local server), for example. + Therefore still forward it to all servers, but don't inform local clients + (still update setter and timestamp information, though). + - Update Xcode project for latest Xcode version (9.2). This includes adding + missing and deleting obsolete file references. + - Handle user mode "C" ("Only users that share a channel are allowed to send + messages") like user mode "b" ("block private messages and notices"): allow + messages from servers, services, and IRC Operators, too. Change proposed by + "wowaname" back in 2015 in #ngircd, thanks! + - Fix some compiler warnings. + - Add contrib/ngircd.logcheck: Some sample logcheck(8) rules. + - Allow IRC Ops and remote servers to KILL service clients: such clients + behave like regular users, therefore IRC operators and servers should be + able to KILL them: for example to resolve nick collisions. + Closes #242. + - Don't forward KILLs to other servers if they've been blocked locally: + This prevents clients from killing IRC services, for example. + Closes #238 and #239. + - Fix a cross-compiler issue related to the Get_Error() function. + Closes #240 and #241. + - Update ./doc/Services.txt, enhance configuration examples. + +ngIRCd 24 (2017-01-20) + + - Make sure that ./contrib/platformtest.sh aborts when ./autogen.sh fails. + - Update config.guess (2016-10-02) and config.sub (2016-11-04) files. + - Build Debian packages with OpenSSL instead of GnuTLS: OpenSSL allows + to reload used certificates on runtime for example (which is very + useful when using Let's Encrypt), and therefore is preferred. And + explicitly specify the "source format". + - Fix handling of connection pool allocation and enlargement: up to now, + the daemon only enlarged its connection pool when accepting new incoming + client or server connections, not when establishing new outgoing server + links, which could lead to problems when hitting the configured limit, + see "MaxConnections". Thanks to Lukas Braun (k00mi) for reporting this! + Closes #231. + + ngIRCd 24~rc1 (2017-01-07) + - Enhance systemd service file, and install it in Debian package. + - Update configuration of Debian package. + - Log privilege violations and failed OPER request with log level "error" + and send it to the "&SERVER" channel, too. + - Immediately shut down connection when receiving an "ERROR" command, + don't wait for the peer to close the connection. This allows the daemon + to forward the received "ERROR" message in the network, instead of the + very generic "client closed connection" message. + - Fix sending of entry duration (no negative values!) when synchronizing + "x-lines" (G-LINES). + - List expiration (G-LINES): use same log level as when setting, and log + this event to the &SERVER channel, too. + - Explicitly forbid remote servers to modify "x-lines" (G-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 handshake in this case (what wouldn't be + possible during regular runtime when a remote IRC Op sends the command) + and what can't be undone by IRC Ops later on (because of the missing + "AllowRemoteOper" option) ... + - Make scripts and init-files in ./contrib executable. + - Fix building ngIRCd with OpenSSL 1.1. Thanks to Christoph Biedl + <ngircd.anoy@manchmal.in-ulm.de> for the patch! + - Fix code indentation warnings of gcc 6.2. + - Update config.guess (2016-04-02) and config.sub (2016-03-30) files. + - Fix warnings of the "shellcheck" linter in autogen.sh, contrib/ngindent + and contrib/platformtest.sh. + - Update Xcode project for latest Xcode version (8.0), and fix "duplicate + symbols" error messages when building (linking) the binary. + - Add "Documentation" variables to systemd configuration files. + - Make sure that SYSCONFDIR is always set, which can be handy when + using source code linters when ./configure hasn't been run already. + - Add the new "PAMServiceName" configuration option to specify the name + used as PAM service name. This setting allows to run multiple ngIRCd + instances with different PAM configurations for each instance. + Thanks to Christian Aistleitner <christian@quelltextlich.at> for the + patch, closes #226. + - Add an ".editorconfig" file to the project. + - Travis-CI: use "container-based infrastructure". + - Limit the number of message targets, and suppress duplicates: This + prevents an user from flooding the server using commands like this: + "PRIVMSG nick1,nick1,nick1,...". + Duplicate targets are suppressed silently (channels and clients). + In addition, the maximum number of targets per PRIVMSG, NOTICE, ... + command are limited to MAX_HNDL_TARGETS (25). If there are more, the + daemon sends the new 407 (ERR_TOOMANYTARGETS_MSG) numeric, containing + the first target that hasn't been handled any more. Closes #187. + - Test suite: Add new test for server-server logins. + - 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 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, + doc/Modes.txt, doc/Commands.txt, doc/PAM.txt. + - Fix NJOIN not propagating "half ops" status: ngIRCd tested for the wrong + prefix of "half ops" when processing NJOIN commands and therefore never + classified a remote user as "half op". + Thanks to wowaname for pointing this out on #ngircd! + +ngIRCd 23 (2015-11-16) + + - Explicitly cast time_t to long when printing it out: this prevents + wrong sized data types on platforms where time_t doesn't equal a + long any more, for example on OpenBSD (which would result in garbled + output on those platforms). + - contrib/Debian/changelog: Fix email address. + - Documentation: Spelling fixes; update doc/Platforms.txt. + + ngIRCd 23~rc1 (2015-09-06) + - Add ".clang_complete" file, which is used by the "linter-clang" package + of the Atom editor, for example. + - Make server-to-server protocol more robust: ngIRCd now catches more + errors on the server-to-server (S2S) protocol that could crash the + daemon before. This hasn't been a real problem because the IRC S2S + protocol is "trusted" by design, but the behavior is much better now. + Thanks to wowaname on #ngircd for pointing this out! + - Make platformtest.sh, autogen.sh, and ngircd.init more portable. + - Enables "reproducible builds" for ngIRCd: Use the optional BIRTHTIME + constant while building ngIRCd, which contains a time stamp for the + "Birth Date" information, in seconds since the epoch. + See <https://wiki.debian.org/ReproducibleBuilds>. + - Update "contrib/ngircd.service" file for systemd. + - INSTALL: Add deprecation notice for "PredefChannelsOnly" variable. + - Use "NOTICE *" before registration instead of "NOTICE AUTH". "AUTH" is + a valid nickname so sending notices to it is probably not a good idea. + Use "*" as the target instead as done with numerics when the nick is not + available. This mimics the behavior in Charybdis, IRCD-Hybrid, InspIRCd + 2.2, Plexus 4, etc. Closes #217. + The "NoticeAuth" configuration variable (ngircd.conf) has been renamed + to "NoticeBeforeRegistration" accordingly, but the old name is still + supported for compatibility reasons. + - Implement new channel mode "N" (regular users can't change their nick + name while on this channel). Closes #214. + - README, AUTHORS: Update mailing list and issue tracker URLs. + - Remove doc/GIT.txt (it is outdated), update doc/Contributing.txt: + ngIRCd uses GitHub, and Git itself is quite common today. So don't + include an own Git "mini HowTo" any longer. + - Specify session context for OpenSSL clients. This enables some OpenSSL + clients, including Pidgin and stunnel 5.06, to reuse a session. + Patch by Tom Ryder <tom@sanctum.geek.nz>, thanks! Closes #182. + - Keep track of who placed bans, invites, and excepts. + Idea and implementation by LucentW, Thanks! Closes #203. + - Make setgroups(3) function optional: For example, Interix is missing + this function, which prevented ngIRCd to build on this platform. When + setgroups(3) isn't available, a warning message is issued on startup. + - Implement numeric RPL_LISTSTART(321). lightIRC and other clients + expecting RPL_LISTSTART should now behave correctly. + Idea and implementation by LucentW, Thanks! Closes #207. + - Update ngircd.conf.5: "CloakUserToNick" hides user _and_ real name. + This closes #208. + - Fix case insensitive pattern matching: Up to now, only the input + string became lowercased and was then compared to the pattern -- which + failed when the pattern itself wasn't all lowercase! + - Streamline the effect of "MorePrivacy" option: Update documentation + in ngircd.conf(5); don't hide channels for IRC Ops on LIST and don't + hide IP addresses/hostnames on WHOIS when "MorePrivacy" is in effect. + This closes #198. + - IRC operators now can kick anyone when "OperCanMode" is set. + Idea and implementation by LucentW, Thanks! Closes #202. + - Implement user mode "I": Hide channels on WHOIS: this mode prevents + ngIRCd from showing channels on WHOIS (IRC Operators can always see + the channel list). + Idea and implementation by LucentW, Thanks! Closes #197. + - INVITE command: Implement ERR_USERNOTONSERV(504) numeric and make sure + that the target user is on the same server when inviting other users + to local ("&") channels. + Idea by Cahata, thanks! Closes #183. + - INVITE command: Enforce 1 second penalty time, which prevents flooding + of the target client. + This closes #186. Reported by Cahata, thanks! + - MODE command: Always report channel creation time. Up to now when + receiving a MODE command, ngIRCd only reported the channel creation + time to clients that were members of the channel. This patch reports + the channel creation time to all clients, regardless if they are joined + to that channel or not. At least ircd-seven behaves like this. + This closes #188. Reported by Cahata, thanks! + - Update Xcode project for latest Xcode version (6.3). + +ngIRCd 22.1 (2015-04-06) + + - Update doc/Platforms.txt and doc/FAQ.txt. + - Fix spelling of RPL_WHOISBOT message text. + - Don't send nick name as default PART reason: No other IRC daemon seems + to do this (today?). Closes #185. + Reported by Cahata in #ngircd, thanks! + - Fix "WHO #<chan>" showing invisible users and hiding all visible, the + logic was reversed! This bug has been introduced by commit c74115f2, + "Simplify mode checking on channels and users within a channel", ngIRCd + releases 21, 21.1, and 22 are affected :-( Problem reported by Cahata + in #ngircd, Thanks! + - Fix typo in src/testsuite/README + - Auth PING: Fix our information text for manual sending of "PONG". Up to + now, ngIRCd doesn't send a valid IRC command at all, oops! + - Auth PING: Fix internal time stamp conversion and don't send a prefix in + our PING command. The prefix confuses WeeChat, at least, which doesn't + send an appropriate PONG in the case ... + Debugging and patch by "wowaname" on #ngircd, thanks! + - Fix syntax of ERR_LISTFULL_MSG(478) numeric. Pointed out by "wowaname" + in #ngircd, thanks! + - Enhance debug messages while sending CHANINFO commands. + - Reset "last try" timer when enabling a passive server. This results in + a new connection attempt as soon as possible. + - Change log message for "Can't resolve address" and for IP address + forgeries. + - doc/HowToRelease.txt: Add note about the bug tracker. + - Update "CipherList" to not enable SSLv3 by default. Idea, initial patch, + and testing by Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de>. + - Change ngIRCd test suite not to use DNS lookups: Different operating + systems do behave quite differently when doing DNS lookups, for example + "127.0.0.1" sometimes resolves to "localhost" and sometimes to + "localhost.localdomain" (for example OpenBSD). And other OS resolve + "localhost" to the real host name (for example Cygwin). So not using + DNS at all makes the test site much more portable. + +ngIRCd 22 (2014-10-11) + + - Match all list patterns case-insensitive: this affects the invite-, + ban-, and except lists, as well as G-Lines an K-Lines. + Problem pointed out by "wowaname" on #ngircd, thanks! + + ngIRCd 22~rc1 (2014-09-29) + - Sync "except lists" between servers: Up to now, ban, invite, and G-Line + lists have been synced between servers while linking -- but obviously + nobody noticed that except list have been missing ever since. Until now. + Thanks to "j4jackj", who reported this issue in #ngircd. + - Allow longer user names (up to 63 characters) for authentication. + - Correctly check that a server has a valid hostname and port, thanks to + David Binderman <dcb314@hotmail.com> who reported this bug. + - Fix the function which generates complete "IRC masks" from user input, + don't destroy the source buffer and use all provided parts (nick, user, + host name). This fixes GLINEs/KLINEs from not working in some situations. + - Increase MAX_SERVERS from 16 to 64: There are installations out there + that would like to configure more than 16 links per server, so increase + this limit. Best would be to get rid of MAX_SERVERS altogether and make + if fully dynamic, but start with this quick and dirty hack ... + - Debian: Don't adjust path names that are correct by default and correctly + set and use "docdir". + - Update config.guess and config.sub to recent versions. + - Test suite/platformtest.sh: Detect when tests have been skipped. + - doc/Bopm.txt: Update "connregex" and "kline" for current ngIRCd. + - Allow "DefaultUserModes" to set all possible modes, including modes only + settable by IRC Operators. + - Spoofed prefixes: Really kill connection on non-server links. + - Implement user mode "F": "relaxed flood protection". Clients with mode + "F" set are allowed to rapidly send data to the daemon. This mode is only + settable by IRC Operators and can cause problems in the network -- so be + careful and only set it on "trusted" clients! + User mode "F" is used by Bahamut for this purpose, for example. + - Handle "throttling" in a single function: ngIRCd implements "command + throttling" and "bps throttling" (bytes per second). The states are + detected in different functions, Conn_Handler() and Read_Request(), but + handle the actual "throttling" in a common function: this enables us to + guarantee consistent behavior and to disable throttling for special + connections in only one place + - Use server password when PAM is compiled in but disabled. + - Streamline punctuation of log messages. + - Return ISUPPORT(005) numerics on "VERSION". This is how ircd-seven, + Charybdis, Hybrid, and InspIRCd behave, for example. + - configure: Only link "contrib/Debian" if it exists, which isn't the case + on "VPATH builds", for example. + - Show the account name in WHOIS. This uses the same numeric as Charybdis + and ircu families: WHOISLOGGEDIN(330). + - Pattern matching: Remove "range matching" in our pattern matching code + using the "[...]" syntax, because [ and ] are valid characters in nick + names and one has to quote them currently using the "\" character, which + is quite unexpected for users. + - platformtest.sh: New option "-x", don't regenerate build system and + allow using separate source and build trees. + - Test suite: explicitly enable glibc memory checking. + - Make "MODE -k" handling more robust and compatible, send "fake '*' key" + in all replies. + - Update configure.ng: ngIRCd requires GNU autoconf 2.61 for generating its + build system, so update the build system accordingly and implement all + changes that autoupdate(1) suggests: Update AC_PREREQ and AC_INIT, use + AC_LINK_IFELSE, AC_RUN_IFELSE, and AC_COMPILE_IFELSE, and remove + AC_TYPE_SIGNAL (we don't use RETSIGTYPE). + - portabtest: Actually test the functions snprintf(), strlcpy(), strlcat(), + and vsnprintf() for correctness, not only existence (which was quite + useless, because if they weren't available, the program could not have + been linked at all ...). + - Implement new configuration option "Network": it is used to set the + (completely optional) "network name", to which this instance of the + daemon belongs. When set, this name is used in the ISUPPORT(005) numeric + which is sent to all clients connecting to the server after logging in. + - Update doc/Platforms.txt. + - Various code cleanups, remove unused code, streamline error handling. + Remove all imp.h and exp.h header files, support non-standard vsnprintf() + return codes, and fix some K&R C portability issues. Streamline + DEBUG_ARRAY, DEBUG_BUFFER, DEBUG_IO, DEBUG_ZIP definitions. + - Increase penalty time to 10 seconds when handling OPER commands with an + invalid password. + +ngIRCd 21.1 (2014-03-25) + + - Don't ignore but use the server password when PAM is compiled in but + disabled. Thanks to Roy Sindre Norangshol <roy.sindre@norangshol.no>! + - doc/Platforms.txt: Update from master branch. + - Really kill connections that send "spoofed prefixes" on non-server links. + This fixes commit 6cbe1308 which only killed the connection when the + spoofed prefix itself belonged to a non-server client. + - CHARCONV command: Fix handling conversion errors, don't overwrite already + converted text! + - doc/Services.txt: Update information for Anope 2.x. + - Correctly use cloaked IRC masks on "INVITE nickname": The cloaked IRC mask + of a user is his visible mask, so the daemon has to use it for generating + the "one time" entries for the invite list of the given channel, and not + the "real" mask which will never match while the target client is "+x", and + even worse, will disclose the real mask on "MODE #channel +I" commands :-/ + Bug reported by Cahata on #ngircd, thanks! + - configure: Only link "contrib/Debian" if it exists. This isn't the case on + "VPATH builds", for example. + - Use $(MKDIR_P) instead of $(mkinstalldirs) in Makefile's and test for + "mkdir -p" using AC_PROG_MKDIR_P in "configure". + - Fix configure script and "make check" for TCP Wrappers (problems spotted on + OpenBSD): add missing #include's and static variables, and add libwrap at + the end of the configure run because if libwrap becomes added earlier, + other tests may fail. + - configure: add support for the LDFLAGS_END and LIBS_END variables to add + linker flags and libraries at the end of the configure run (CFLAGS_END has + been implemented already). + - platformtest.sh and Makefile.am: Don't use "test -e", it isn't portable. + - Update Copyright notices for 2014 :-) + - Fix permanent {G|K}LINES (with a timeout of 0 seconds). + - WEBIRC: Don't set the hostname received by the WEBIRC command when DNS + lookups are disabled, but use the IP address instead. + Reported by Toni Spets <toni.spets@iki.fi>, thanks! + - Check for working getaddrinfo() function: At least AIX 4.3.3 and 5.1 have a + broken implementation of getaddrinfo() which doesn't handle "0" as numeric + service correctly. This patch adds a configure check for this case and + changes all calling functions to only use getaddrinfo() if it "works". + See <http://www.stacken.kth.se/lists/heimdal-discuss/2004-05/msg00059.html> + - Only use the unsetenv() function when it is available (AIX 4.3 doesn't + support it, for example). + - Make sure that the source code is still compatible with the "ansi2knr" tool + and builds using non-ANSI K&R C compilers. Tested with Apple C on A/UX. + - Fix building ngIRCd without support for ZLIB compression. Reported by + "der_baer" on #ngircd, thanks! + +ngIRCd 21 (2013-10-30) + + - ./contrib/Debian/ngircd.init: Make sure no stale PID file is left over + when (re-)starting ngIRCd. + - Change ./contrib/platformtest.sh and update ./doc/Platforms.txt to + allow user names up to 8 characters. + - Call arc4random_stir() in forked subprocesses, when available. This + is required by FreeBSD <10 and current NetBSD at least to correctly + initialize the "arc4" random number generator on these platforms. + - Update our own Debian package configuration and fix the default path + of the "HelpFile" of the "full" package variants. + + ngIRCd 21~rc2 (2013-10-20) + - Report the correct configuration file name on configuration errors, + support longer configuration lines, and warn when lines are truncated. + - Use arc4random() function to generate "random" numbers, when available. + - platformtest.sh: Detect clang compiler, and clean up GIT source tree + before building (when possible). + - Update (date of) manual pages. + - Update "Upgrade Information" in INSTALL file, add more systems to + doc/Platforms.txt, and fix spelling in NEWS and ChangeLog files =:) + - Fix remaining compiler warnings on OpenBSD. + + ngIRCd 21~rc1 (2013-10-05) + - Actually KILL clients on GLINE/KLINE. (Closes bug #156) + - Adjust log messages for invalid and spoofed prefixes, which cleans up + logging of commands related to already KILL'ed clients. And don't + forward KILL commands for (already) unknown clients any more to prevent + unnecessary duplicates. + - Add support to show all user links using the "STATS L" (uppercase) + command (restricted to IRC Operators). + - Fixed blocking of server reconnects in some error configurations. + - Don't ignore SSL-related errors during startup any more: abort startup + when SSL is requested by the configuration but can't be initialized and + don't continue only listening on plain text communication ports. + (Closes bug #163) + - Implement configurable SSL cipher list selection for GnuTLS and OpenSSL + using the new configuration option "CipherList". In addition, this + changes the defaults to more secure values: "HIGH:!aNULL:@STRENGTH" for + OpenSSL, and "SECURE128" for GnuTLS. + - Fix "TRACE": Correctly return ERR_NEEDMOREPARAMS(461) (which basically + is "syntax error") when there are too many parameters. + - Clean up lots of permission and parameter checks in functions handling + IRC commands; and more consistently add penalty times on errors. + - Fix error numeric of WHOIS when no nick name has been provided: + as per RFC it should be ERR_NONICKNAMEGIVEN(431). + - Only log "IDENT ... no result" messages when an IDENT looked took place + and didn't return any data, not when IDENT has been disabled. + - Show connection flag "s" (SSL) in RPL_TRACE{LINK|SERVER} messages: now + you can check if a server-to-server link is SSL-encrypted or not using + the IRC "TRACE" command. + - Correctly discard supplementary groups on server startup. + - Save client IP address text for "WebIRC" users and correctly display + it on WHOIS, for example. (Closes bug #159) + - Implement the new configuration option "DefaultUserModes" which lists + user modes that become automatically set on new local clients right + after login. Please note that only modes can be set that the client + could set on itself, so you can't set "a" (away) or "o" (IRC Op), + for example! User modes "i" (invisible) or "x" (cloaked) etc. are + "interesting", though. (Closes bug #160) + - Add support for the new METADATA "account" property, which allows + services to automatically identify users after netsplits and across + service restarts. + - Enforce "penalty times" on error conditions more consistently and in + more places. Now most error codes sent back from the IRC server to the + client should result in a 2 second "penalty". + - Implement a new configuration option "AllowedChannelTypes" that lists + all allowed channel types (channel prefixes) for newly created channels + on the local server. By default, all supported channel types are allowed. + If set to the empty string, local clients can't create new channels at + all, which equals the old "PredefChannelsOnly = yes" setting. + This change deprecates the "PredefChannelsOnly" variable, too, but it is + still supported and translated to the appropriate "AllowedChannelTypes" + setting. When the old "PredefChannelsOnly" variable is processed, a + warning message is logged. (Closes bug #152) + - Add support for "client certificate fingerprinting". When a client + passes an SSL certificate to the server, the "fingerprint" will be + forwarded in the network which enables IRC services to identify the + user using this certificate and not using passwords. + - IRC Operator names, as defined in ngircd.conf, are logged now when + handling successful OPER commands. + - Some error conditions while handling IRC commands, like "permission + denied" or "need more parameters", result in more penalty times. + - The numeric replies of some commands became split too early which + resulted in more numeric reply lines than necessary. + - Implement a new configuration option "IncludeDir" in the "[Options]" + section that can be used to specify a directory which can contain + further configuration files and configuration file snippets matching + the pattern "*.conf". These files are read in after the main server + configuration file ("ngircd.conf" by default) has been read in and + parsed. The default is "$SYSCONFDIR/ngircd.conf.d", so that it is + possible to adjust the configuration only by placing additional files + into this directory. (Closes bug #157) + - Fix use-after-free in the Lists_CheckReason() function, which is used + to check if a client is a member of a particular ban/invite/... list. + - Xcode: fix detection of host OS, vendor, and CPU type, and update + project settings for Xcode 5. + - OS X PackageMaker: use relative path names in project files and package + with correct file permissions (requires root privileges on "make"). + - Add Travis-CI configuration file (".travis.yml") to project. + - Look for possible cloaked Masks in Lists. Users with +x user mode can + be banned with their cloaked hostname now. + - Don't read SSL client data before DNS resolver is finished which could + have resulted in discarding the resolved client hostname and IDENT + reply afterwards, because in some situations (timing dependent) the + NICK and USER commands could have already been read in from the client, + stored in the buffer, and been processed. + Thanks to Julian Brost for reporting the issue and testing, and to + Federico G. Schwindt <fgsch@lodoss.net> for helping to debug it! + - Increase password length limit to 64 characters. (Closes bug #154) + - doc/Services.txt: Update Anope status and URL. + - Clean up Xcode project file, remove outdated files, add missing ones. + - Update Doxygen configuration file. + - configure: search for iconv_open as well as libiconv_open, because + on some installations iconv_open() is actually libiconv_open(). + iconv_open() is the glibc version while libiconv_open() is the + libiconv version, now both variants are supported. (Closes bug #151) + - ngIRCd now accepts user names including "@" characters, saves the + unmodified name for authentication but stores only the part in front + of the "@" character as "IRC user name". And the latter is how + ircd2.11, Bahamut, and irc-seven behave as well. (Closes bug #155) + - Lots of IRC "information functions" like ADMIN, INFO, ... now accept + server masks and names of connected users (in addition to server names) + for specifying the target server of the command. (Closes bug #153) + - Implement a new configuration option "IdleTimeout" in the "[Limits]" + section of the configuration file which can be used to set a timeout + in seconds after which the whole daemon will shutdown when no more + connections are left active after handling at least one client. + The default is 0, "never". + This can be useful for testing or when ngIRCd is started using "socket + activation" with systemd(8), for example. + - Implement support for systemd(8) "socket activation". + - contrib/README: add description for more files. + - Enable WHOIS to display information about IRC Services using the new + numeric 310(RPL_WHOISSERVICE) This numeric is used for this purpose by + InspIRCd, for example -- but as usual, other numerics are in use, too, + like 613 in UltimateIRCd ... + Please note that neither the Operator (+o) not the "bot status" (+B) + of an IRC service is displayed in the output. + - Exit message: use singular & plural :-) + - autogen.sh: Check for autoconf/automake wrapper scripts + - Add missing punctuation marks in log messages, adjust some severity + levels, and make SSL-related messages more readable. + - AUTHORS file: Update list of contributors. + - Update systemd(8) example configuration files in ./contrib/ directory: + the "ngircd.service" file now uses the "forking" service type which + enhances the log messages shown by "systemctl status ngircd.service", + and the new "ngircd.socket" file configures a systemd socket that + configures a socket for ngIRCd and launches the daemon on demand. + - Enhance help system and the HELP command: now a "help text file" can be + set using the new configuration option "HelpFile" ("global" section), + which is read in and parsed on server startup and configuration reload, + and then is used to output individual help texts to specific topics. + Please see the file ./doc/Commands.txt for details. + +ngIRCd 20.3 (2013-08-23) + + - Security: Fix a denial of service bug (server crash) which could happen + when the configuration option "NoticeAuth" is enabled (which is NOT the + default) and ngIRCd failed to send the "notice auth" messages to new + clients connecting to the server (CVE-2013-5580). + +ngIRCd 20.2 (2013-02-15) + + - Security: Fix a denial of service bug in the function handling KICK + commands that could be used by arbitrary users to crash the daemon + (CVE-2013-1747). + - WHO command: Use the currently "displayed hostname" (which can be cloaked!) + for hostname matching, not the real one. In other words: don't display all + the cloaked users on a specific real hostname! + - configure: The header file "netinet/in_systm.h" already is optional in + ngIRCd, so don't require it in the configure script. Now ngIRCd can be + built on Minix 3 again :-) + - Return better "Connection not registered as server link" errors: Now ngIRCd + returns a more specific error message for numeric ERR_NOTREGISTERED(451) + when a regular user tries to use a command that isn't allowed for users but + for servers. + - Don't report ERR_NEEDMOREPARAMS(461) when a MDOE command with more modes + than nicknames is handled, as well as for channel limit and key changes + without specifying the limit or key parameters. + This is how a lot (all?) other IRC servers behave, including ircd2.11, + InspIRCd, and ircd-seven. And because of clients (tested with Textual and + mIRC) sending bogus MODE commands like "MODE -ooo nick", end-users got the + expected result as well as correct but misleading error messages ... + - Correctly detect when SSL subsystem must be initialized and take + outgoing connections (server links!) into account, too. + - autogen.sh: Enforce serial test harness on GNU automake >=1.13. The + new parallel test harness which is enabled by default starting with + automake 1.13 isn't compatible with our test suite. + And don't use "egrep -o", instead use "sed", because it isn't portable + and not available on OpenBSD, for example. + +ngIRCd 20.1 (2013-01-02) + + - Allow ERROR command on server and service links only, ignore them and + add a penalty time on all other link types. + - Enforced mode setting by IRC Operators: Only check the channel user + modes of the initiator if he is joined to the channel and not an IRC + operator enforcing modes (which requires the configuration option + "OperCanUseMode" to be enabled), because trying to check channel user + modes of a non-member results in an assertion when running with debug + code or could crash the daemon otherwise. This closes bug #147, thanks + to James Kirwill <james.kirwill@bk.ru> for tracking this down! + - Fix build system to cope with spaces in path names. + - Code cleanups, mostly to fix build warnings on Cygwin. + +ngIRCd 20 (2012-12-17) + + - Allow user names ("INDENT") up to 20 characters when ngIRCd has not + been configured for "strict RFC mode". This is useful if you are using + external (PAM) authentication mechanisms that require longer user names. + Patch suggested by Brett Smith <brett@w3.org>, see + <http://arthur.barton.de/pipermail/ngircd-ml/2012-October/000579.html>. + + ngIRCd 20~rc2 (2012-12-02) + - Rework cloaked hostname handling and implement the "METADATA cloakhost" + subcommand: Now ngIRCd uses two fields internally, one to store the + "real" hostname and one to save the "cloaked" hostname. This allows + "foreign servers" (aka "IRC services") to alter the real and cloaked + hostnames of clients without problems, even when the user itself issues + additional "MODE +x" and "MODE -x" commands. + - RPL_UMODEIS: send correct target name, even on server links. + - Update platformtest.sh to follow autoconf changes and only generate + the "configure" script when it is missing. + - Fix the test suite to correctly execute test scripts even when stdout + is redirected. + - Fix some compiler warnings on NetBSD and OpenBSD. + + ngIRCd 20~rc1 (2012-11-11) + - Update doc/Services.txt: describe the upcoming version of Anope 1.9.8, + then including a protocol module for ngIRCd. And remove our own patches + in ./contrib/Anope because they aren't supported any more ... + - Implement new "METADATA" command which can be used by remote servers + and IRC services to update client metadata like the client info text + ("real name"), user name, and hostname, and use this command to + configure an cloaked hostname (user mode "+x") on remote servers: + This prevents "double cloaking" of hostnames and even cloaked + hostnames are in sync on all servers supporting "METADATA" now. + - Fix error message when trying to join non-predefined channels and the + "PredefChannelsOnly" configuration option is set. + - Implement new IRC "SVSNICK" command to allow remote servers (and IRC + services) to change nicknames of already registered users. The SVSNICK + command itself doesn't change the nickname, but it becomes forwarded + to the server to which the user is connected to. And then this server + initiates the real nickname changing using regular NICK commands. + This allows to run mixed networks with old servers not supporting the + SVSNICK command, because SVSNICK commands for nicknames on such servers + are silently ignored and don't cause a desynchronization of the network. + - Make server reconnect time a little bit more random, so that two + servers trying to connect to each other asynchronously don't try this + in exactly the same time periods and kick each other off ... + - Don't accept connections for servers already being linked: there was a + time frame that could result in one connection overwriting the other, + e. g. the incoming connection overwriting the status of the outgoing + one. And this could lead to all kind of weirdness (even crashes!) later + on: now such incoming connections are dropped. + - New configuration option "MaxListSize" to configure the maximum number + of channels returned by a LIST command. The default is 100, as before. + - Implement user mode "b", "block messages": when a user has set mode "b", + all private messages and notices to this user are blocked if they don't + originate from a registered user, an IRC Op, server or service. The + originator gets an error numeric sent back in this case, + ERR_NONONREG_MSG (486), which is used by UnrealIRCd, too. (Closes #144) + - WHOIS: Not only show RPL_WHOISHOST_MSG to local IRC operators, but show + it to all IRC operators in the network. And don't show it to anybody if + the "more privacy" configuration option is enabled. (Closes #134) + - Test suite: make expect scripts more verbose displaying dots for each + reply of the server that it is waiting for. + - WHOIS: Implement numeric RPL_WHOISMODES_MSG (379) and show user modes in + the reply of the WHOIS command for the user himself or, if MorePrivacy + isn't set, for request initiated by an IRC operator. (Closes #129) + - Implement channel mode "V" (invite disallow): If the new channel mode + "V" is set, the INVITE command becomes invalid and all clients get the + new ERR_NOINVITE_MSG (518) reply. (Closes #143) + - KICK-protect IRC services. + - Implement channel mode "Q" and user mode "q": Both modes protect users + from channel kicks: only IRC operators and servers can kick users having + mode "q" or in channels with mode "Q". (Closes #141) + - Debian: require "telnet" or "telnet-ssl" for building and enable + CHARCONV in ngircd-full[-dbg] variants. + - Send RPL_REHASHING (382) numeric if a REHASH command was accepted. + - Fix spelling and variable names in some log messages. + - Allow users to "cloak" their hostname only when the configuration + variable "CloakHostModeX" (introduced in 19.2) is set. Otherwise, only + IRC operators, other servers, and services are allowed to set the user + mode "+x": this prevents regular users from changing their hostmask to + the name of the IRC server itself, which confused quite a few people ;-) + (Closes #133) + - New configuration option "OperChanPAutoOp": If disabled, IRC operators + don't become channel operators in persistent channels when joining. + Enabled by default, which has been the behavior of ngIRCd up to this + patch. (Closes #135) + - Allow IRC operators to see secret (+s) channels in LIST command as long + as the "MorePrivacy" configuration option isn't enabled in the + configuration file. (Closes #136) + - Enhance build system: Support new (>=1.12) and old (<=1.11) GNU automake + versions, update checks for required and optional features, enable + colored test output of automake (if available), rename configure.in to + more modern configure.ac, include .mailmap and all build-system files in + distribution archives and no longer require a GIT tree to detect the + correct version string. + - Update documentation: add doc/Contributing.txt and include version + numbers in doc/Modes.txt. + - Free all listen ports on initialization: now listen ports can be + reconfigured on runtime using a configuration reload. + - Initialize SSL when needed only, and disable SSL on errors. + - Implement new (optional) IRC+ "CHARCONV" command to set a client + character set that the server translates all messages to/from UTF-8. + This feature requires the "libiconv" library and must be enabled using + the new "--with-iconv" option of the ./configure script. See + doc/Protocol.txt for details. (Closes #109) + - Allow limited punctuation in usernames, for better PAM integration. + - Correctly re-initialize signal handlers on RESTART commands. + - Show a warning on startup if the configuration file is not a full path: + ngIRCd is a long-running process and changes its working directory to + "/" to not block mounted filesystems and the like when running as daemon + ("not in the foreground"); therefore the path to the configuration file + must be relative to "/" (or the chroot() directory), which basically is + "not relative", to ensure that "kill -HUP" and the "REHASH" command work + as expected later on. (Closes #127) + - Make the "&SERVER" channel definable in a [Channel] configuration block, + which enables server operators to overwrite the built-in topic and + channel modes. (Closes #131) + - Don't limit list size of "WHO #channel" commands, because it makes no + sense to not return all the users in that channel, so I removed the + check. But if there are more than MAX_RPL_WHO(25) replies, the client + requesting the list will be "penalized" one second more, then 2 in + total. (Closes #125) + - Make ngIRCd buildable using the kqueue() IO interface on FreeBSD 4.x. + - Fix the "NoticeAuth" configuration option when using SSL connections and + enhance the message to show the hostname and IDENT reply of the client. + - Introduce numeric RPL_HOSTHIDDEN_MSG (396): This numeric is sent to the + client each time it changes its displayed hostname using "MODE +/-x", + and if "CloakHost" is set right after the MOTD has been sent. + - Fix USERHOST not displaying the correctly cloaked hostname. + - Implement user mode "B" ("Bot flag"): it is settable and unsettable by + every (non-restricted) client. This is how Unreal and InspIRCd do + behave, and so do we :-) + - Dynamically allocate memory for connection passwords: This a) saves + memory for clients not using passwords at all and b) allows for + "arbitrarily" long passwords. + - Implement channel mode "M": Only the server, identified users and IRC + operators are able to talk in such a channel. + - Block nicknames that are reserved for services and are defined using the + configuration variable "ServiceMask" in "Server" blocks; And this + variable now can handle more than one mask separated by commas. + - Now "make uninstall" removes the installed "ngircd.conf" file, if it is + still equal to our "sample-ngircd.conf" file and therefore hasn't been + modified by the user. If it has been modified, it isn't removed and a + notice is displayed to the user. And "make install" now displays a + message when no ngircd.conf file exists and the "sample-ngircd.conf" + file will be installed as a starting point. + - Add contrib/ngircd.service, a systemd service file for ngircd. + - Implemented XOP channel user modes: "Half Op" ("+h", prefix "%") can set + the channel modes +imntvIbek and kick all +v and normal users; "Admin" + ("+a", prefix "&") can set channel modes +imntvIbekoRsz and kick all +o, + +h, +v and normal users; and "Owner" ("+q", prefix "~") can set channel + modes +imntvIbekoRsz and kick all +a, +o, +h, +v and normal users. + - Implement hashed cloaked hostnames for both the "CloakHost" and + "CloakHostModeX" configuration options: now the admin can use the new + '%x' placeholder to insert a hashed version of the clients hostname, + and the new configuration option "CloakHostSalt" defines the salt for + the hash function. When "CloakHostSalt" is not set (the default), a + random salt will be generated after each server restart. (Closes #133) + +ngIRCd 19.2 (2012-06-19) + + - doc/Capabilities.txt: document "multi-prefix" capability + + ngIRCd 19.2~rc1 (2012-06-13) + - New configuration option "CloakHostModeX" to configure the hostname + that gets used for IRC clients which have user mode "+x" enabled. + Up to now, the name of the IRC server itself has been used for this, + which still is the default when "CloakHostModeX" isn't set. + - Correctly handle asynchronously re-established server links: a race + condition could let the daemon loose track of an already re-established + incoming server link while preparing its own outgoing connection. + Peers that both try to connect each other could have been affected. + - Log a debug message when SIGUSR2 is handled in debug mode. + - Only allow alphanumeric characters in user-supplied user names of + USER command and IDENT replies. + - Change wording of "TLS initialized" message to make it more consistent. + - Don't leak file descriptors on error path when creating "PID files". + - Add missing mode "r" to CHANMODES in 005 "ISUPPORT" numeric. + - Update doc/Modes.txt and doc/Platforms.txt documents. + - contrib/platformtest.sh: correctly detect Open64 C compiler and handle + "CC=xxx MAKE=yyy ./platformtest.sh" calling convention. + - Add instructions for setting up Atheme IRC services. + - Implement support for IRC capability handling, the new "CAP" command, + and capability "multi-prefix" which allows both the NAME and WHO command + handlers to return more than one "class prefix" to the client. + - Update Xcode project files: reference missing documentation files. + - Fix: Don't ignore "permission denied" errors when enabling chroot. + - FAQ: enhance description of chroot setup. + +ngIRCd 19.1 (2012-03-19) + + - Fix gcc warning (v4.6.3), initialize "list" variable to NULL. + - Fix typos: "recieved" -> "received", "Please not" -> "Please note", + and fix lintian(1) warning ""hyphen-used-as-minus-sign", too. + - Really include _all_ patches to build the Anope module into the + distribution archive ... ooops! + - getpid.sh: Fix test case error for Debian using sbuild(1). + - Don't log "ngIRCd hello message" two times when starting up. + +ngIRCd 19 (2012-02-29) + + - Update build system: bump config.guess and config.sub files used by + GNU autoconf/automake to recent versions. + - Fix configuration file parser: don't accept "[SSL]" blocks in the + configuration file when no SSL support is built in ngIRCd. + - Fix building ngIRCd with old gcc versions (e. g. 2.7.2). + - Correctly re-open syslog logging after reading of configuration + file: Syslog logging has been initialized before reading the + configuration, so ngIRCd always used the default facility and ignored + the "SyslogFacility" configuration option ... + Thanks to Patrik Schindler for reporting this issue! + + ngIRCd 19~rc1 (2012-02-12) + - Enhance command limits for server links: the limit now is dependent + on the number of users connected in the network and higher while + servers are joining the network to make the login of servers faster. + - Log more information about server synchronization. + - Update preliminary ngIRCd protocol module for Anope 1.9.6, which now + is the only supported version. + - New numeric RPL_WHOISHOST_MSG(378), which returns the DNS host name + (if available) and the IP address of a client in the WHOIS reply. + Only the user itself and local IRC operators get this numeric. + - Implement channel exception list (mode 'e'). This allows a channel + operator to define exception masks that allow users to join the + channel even when a "ban" would match and prevent them from joining: + the exception list (e) overrides the ban list (b). + - PRIVMSG and NOTICE: Handle nick!user@host masks case-insensitive. + - Implement user mode 'C': If the target user of a PRIVMSG or NOTICE + command has the user mode 'C' set, it is required that both sender + and receiver are on the same channel. This prevents private flooding + by completely unknown clients. + - New RPL_WHOISREGNICK_MSG(307) numeric in WHOIS command replies: it + indicates if a nickname is registered (if user mode 'R' set). + - Limit channel invite, ban, and exception lists to 50 entries and fix + duplicate check and error messages when adding already listed entries + or deleting no (longer) existing ones. + - Fix both ERR_SUMMONDISABLED(445) and ERR_USERSDISABLED(446) replies. + - MODE command: correctly return ERR_UNKNOWNMODE(472) numeric for + unknown channel modes, instead of ERR_UMODEUNKNOWNFLAG(501). + - ISUPPORT(005) numeric: add "O", "R", and "z" modes to "CHANMODES", + add "EXCEPTS=e" and "INVEX=I", add "MAXLIST=beI:50". + - Limit the number of list items in the reply of LIST (100), WHO (25), + WHOIS (10), and WHOWAS (25) commands. + - LIST command: compare pattern case insensitive. + - Limit the MODE command to handle a maximum number of 5 channel modes + that require an argument (+Ibkl) per call and report this number + in the ISUPPORT(005) numeric: "MODES=5". + - Fix handling of channel mode sequence with/without arguments. + For example, don't generate wrong error messages when handling + "MODE #chan +IIIIItn *!aa@b *!bb@c *!cc@d *!dd@e *!ee@f". + - When sending data on a connection, only try to get the type of + the client if there still is one assigned. This could trigger an + assertion and end the daemon in some error paths. + - Don't try to close already closed/invalid sockets to forked child + processes. This could potentially crash the daemon in some cases + with IDENT lookups enabled. + - WHOIS command: make sure that the reply ends with RPL_ENDOFWHOIS, + don't answer queries for IRC servers, make sure mask matching is + case-insensitive, and that RPL_ENDOFWHOIS numeric is sent with the + unmodified mask (like it has been received from the client). + - LINKS command: support <mask> parameter to limit the reply. + - Add 1 second penalty for every further target on PRIVMSG/NOTICE + commands: this reduces the possibility of flooding channels with + commands like "PRIVMSG/NOTICE #a,#n,#c,... :message" a little bit. + Problem noticed by Cahata, thanks! + - Display correct error message when "Server{UID|GID}" variable in the + configuration file is invalid (not a number and no existing user). + - Update Copyright notices for 2012 :-) + - JOIN command: don't stop handling of channel lists when a single + channel cannot be joined (because of bad name, wrong key or channel + limit reached), but report an error and continue. And don't check + the channel limit and don't report with "too many channels" when + trying to join a channel that the client already is a member of. + - ISON command: reply with the correct upper-/lowercase nicknames. + - New configuration option "PAMIsOptional": when set, clients not + sending a password are still allowed to connect: they won't become + "identified" and keep the "~" character prepended to their supplied + user name. See "man 5 ngircd.conf" for details. + - Fixed handling of WHO commands. This fixes two bugs: "WHO <nick>" + returned nothing at all if the user was "+i" (reported by Cahata, + thanks) and "WHO <nick|nickmask>" returned channel names instead + of "*" when the user was member of a (visible) channel. + - Fixed some spelling errors in documentation and code comments + (Thanks to Christoph Biedl). + - contrib/Debian/control: Update and complete "Build-Depends" and + update our Debian package descriptions with "official" ones. + - Fixed typo in two error messages. + - LUSERS reply: only count channels that are visible to the requesting + client, so the existence of secret channels is no longer revealed by + using LUSERS. Reported by Cahata, thanks! + - Unknown user and channel modes no longer stop the mode parser, but + are simply ignored. Therefore modes after the unknown one are now + handled. This is how ircd2.10/ircd2.11/ircd-seven behave, at least. + Reported by Cahata, thanks! + - README: Update list of implemented commands. + - Log better error messages when rejecting clients. + - Implement IRC commands "GLINE" and "KLINE" to ban users. G-Lines are + synchronized between server on peering, K-Lines are local only. + If you use "*!<user>@<host>" or "*!*@<host>" masks, these connections + are blocked even before the user is fully logged in (before PASS, + NICK, and USER commands have been processed) and before the child + processes for authentication are forked, so resource usage is smaller. + - Xcode: update project file for Xcode 4.2 and define HAVE_GAI_STRERROR + for Mac OS X Xcode builds. + - ./configure: Fix logic and quoting of poll() detection code: only use + poll() when poll.h exists as well. + - Suppress 'Can't create pre-defined channel: invalid name: ""' message. + - whois-test: handle local host name = "localhost.localdomain" using the + pattern "localhost*" for valid local host names. + - sample-ngircd.conf: show correct default for "PAM" variable: The + default of "PAM" is "yes" when ngIRCd has been configured to use it, + so show the correct default value in the sample configuration file. + (Closes #119) + - Update GPL 2 license text to current version. + - Only close "unrelated" sockets in forked child processes: This fixes + the problem that ngIRCd can't do any IDENT lookups because of the + socket has already been closed in the child process. + The bug has been introduced starting with ngIRCd 17 ... :-( + (commit ID 6ebb31ab35e) + - Added doc/Modes.txt: document modes supported by ngIRCd. + - Implement user mode "R": indicates that the nickname of this user + is "registered". This mode isn't handled by ngIRCd itself, but must + be set and unset by IRC services like Anope. + - Implement channel mode "R": only registered users (having the user + mode "R" set) are allowed to join this channel. + - Test suite: bind to loopback (127.0.0.1) interface only. + - New 2nd message "Nickname too long" for error code 432. + - Xcode: Mac OS X config.h: support 10.5 as well as 10.6/10.7 SDK. + - Xcode: exclude more Xcode 4 specific directories in ".gitignore". + - Disconnect directly linked servers sending QUIT. Without this, + the server becomes removed from the network and the client list, + but the connection isn't shut down at all ... + - contrib/ngindent: detect "gindent" as GNU indent. + - Handle unknown user and channel modes: these modes are saved and + forwarded to other servers, but ignored otherwise. + - Handle channel user modes 'a', 'h', and 'q' from remote servers. + These channel user modes aren't used for anything at the moment, + but ngIRCd knows that these three modes are "channel user modes" + and not "channel modes", that is that these modes take an "nickname" + argument. Like unknown user and channel modes, these modes are saved + and forwarded to other servers, but ignored otherwise. + - Correctly inform clients when other servers change their user modes. + This is required for some services to work correctly. + - Test suite: make getpid.sh work even when run as root. + - Spoofed prefixes: close connection on non-server links only. + On server-links, spoofed prefixes can happen because of the + asynchronous nature of the IRC protocol. So don't break server- + links, only log a message and ignore the command. (Closes #113) + +ngIRCd 18 (2011-07-10) + + - Update timestamp of ngircd(8) manual page. + - Add preliminary ngIRCd protocol module for Anope 1.9 to contrib/Anope/. + - Don't register WHOWAS information when "MorePrivacy" option is in effect. + + ngIRCd 18~rc2 (2011-06-29) + - Update documentation, fix some wording, and use a spellchecker :-) + - ngircd.conf.5: strip "SSL" prefix from variables in [SSL] section. + - ngircd.8: document debugging options. + - GnuTLS: use 1024 bits as minimum size of the DH prime. This enables + ngIRCd to accept incoming connections from other servers and clients + that "only" use at least 1024 bits again, like ngIRCd 17 did (and no + longer requires 2048 bits for incoming connections). + + ngIRCd 18~rc1 (2011-06-27) + - PAM warning message: make clear which "Password" config option is ignored. + - New configuration option "MorePrivacy" to "censor" some user information. + When enabled, signon time and idle time is left out. Part and quit + messages are made to look the same. WHOWAS requests are silently dropped. + All of this is useful if one wish to conceal users that access the ngircd + servers from TOR or I2P. + - New configuration option "ScrubCTCP" to scrub incoming CTCP commands. If + activated, the server silently drops incoming CTCP requests from both + other servers and from users. The server that scrubs CTCP will not forward + the CTCP requests to other servers in the network either, which can spell + trouble if not every oper knows about the CTCP-scrubbing. Scrubbing CTCP + commands also means that it is not possible to send files between users. + There is one exception to the CTCP scrubbing performed: ACTION ("/me + commands") requests are not scrubbed. + - Display configuration errors more prominent on "--configtest". + - Restructure ngIRCd configuration file: introduce new [Limits], [Options], + and [SSL] sections. The intention of this restructuring is to make the + [Global] section much cleaner, so that it only contains variables that + most installations must adjust to the local requirements. All the optional + variables are moved to [Limits], for configurable limits and timers of + ngIRCd, and [Options], for optional features. All SSL-related variables + are moved to [SSL] and the "SSL"-prefix is stripped. The old variables in + the [Global] section are deprecated now, but are still recognized. + => Don't forget to check your configuration, use "ngircd --configtest"! + - New documentation "how to contribute": doc/Contributing.txt. + - Slightly fix error handling when connecting to remote servers. + - GnuTLS: bump DH-bitsize to 2048: this solves the problem that some clients + refuse to connect to severs that only offer 1024. For interoperability it + would be best to just use 4096 bits, but that takes minutes, even on + current hardware ... + - contrib/platformtest.sh: fix gcc version detection. + - Avoid needlessly scary 'buffer overflow' messages: When the write buffer + space grows too large, ngIRCd has to disconnect the client to avoid + wasting too much memory, which is logged with a scary 'write buffer + overflow' message. Change this to a more descriptive wording. + - Require server prefixes for most commands on RFC2812 links. RFC1459 links + (often used by services, for example) are not affected. + - Mac OS X: update installer functionality, texts, and add our logo :-) + - New configuration option "RequireAuthPing": PING-PONG on login. When + enabled, this configuration option lets ngIRCd send a PING with an numeric + "token" to clients logging in; and it will not become registered in the + network until the client responds with the correct PONG. + - New configuration option "NoticeAuth": send NOTICE AUTH on connect. When + active, ngircd will send "NOTICE AUTH" messages on client connect time + like e.g. snircd (QuakeNet) does. + - Generate WALLOPS message on SQUIT from IRC operators; so SQUIT now behaves + like CONNECT and DISCONNECT commands, when called by an IRC operator. + - Allow servers to send more commands in the first 10 seconds ("burst"). This + helps to speed up server login and network synchronization. + - Add support for up to 3 targets in WHOIS queries, also allow up to one + wildcard query from local hosts. Follows ircd 2.10 implementation rather + than RFC 2812. At most 10 entries are returned per wildcard expansion. + - ngircd.conf(5) manual page: describe types of configuration variables + (booleans, text strings, integer numbers) and add type information to each + variable description. + - Don't use "the.net" in sample-ngircd.conf, use "example.net". + - Terminate incoming connections on HTTP commands "GET" and "POST". + - New configuration option "CloakHost": when set, this host name is used for + every client instead of the real DNS host name (or IP address). + - New configuration option "CloakUserToNick": when enabled, ngIRCd sets + every clients' user name to their nickname and hides the user name + supplied by the IRC client. + - doc/Protocol.txt: Update description of the CHANINFO and WEBIRC commands. + - Doxygen'ify (document) much more source files; code cleanup ... + - Make write buffers bigger, but flush early. Before this change, a client + got disconnected if the buffer flushing at 4k failed, now regular clients + can store up to 32k and servers up 64k even if flushing is not possible at + the moment. This enhances reliability on slow links. + - Don't access possibly free'd CLIENT structure. Ooops. + - Allow "Port = 0" in [Server] blocks. Port number 0 marks remote servers + that try to connect to this daemon, but where this daemon never tries to + establish a connection on its own: only incoming connections are allowed. + - Configuration: fix 'Value of "..." is not a number!' for negative values. + - Enable WHOIS command to return information about services. + - Implement channel mode 'O': "IRC operators only". This channel mode is + used on DALnet (bahamut), for example. + - Remove support for ZeroConf/Bonjour/Rendezvous service registration + including the "[No]ZeroConf" configuration option. + - TOPIC command: test for channel admin rights correctly: this enables other + servers, services and IRC operators to change channel topics, even when + the client is not joined to this channel. + - Deprecate NoXX-Options in ngircd.conf and move new variants into our new + [Options] section: 'NoDNS=no' => 'DNS=yes', 'NoIdent=no' => 'Ident=yes', + 'NoPAM=no' => 'PAM=yes', and 'NoZeroConf=no' => 'ZeroConf=yes' (and + vice-versa). The defaults are adjusted accordingly and the old variables + in [Global] are still accepted, so there is no functional change. + - Fix confusing "adding to invite list" debug messages: adding entries to + ban list produced 'invite list' debug output ... + - Don't throttle services and servers being registered. + - Xcode: correctly sort files :-) + - Don't assert() when searching a client for an invalid server token (this is + only relevant when a trusted server on a server-server link sends invalid + commands). + +ngIRCd 17.1 (2010-12-19) + + - --configtest: remember if MOTD is configured by file or phrase + - Enhance log messages when establishing server links a little bit + - Reset ID of outgoing server link on DNS error correctly + - Don't log critical (or worse) messages to stderr + - Manual page ngircd(8): add SIGNALS section + - Manual pages: update and simplify AUTHORS section + - Remove "error file" when compiled with debug code enabled + - README: Updated list of implemented commands + - add doc/README-Interix.txt and doc/Bopm.txt to distribution tarball + - Merge branch 'numeric-329' + - add doc/PAM.txt to distribution tarball + - New numeric 329: get channel creation time on "MODE #chan" commands + - Save channel creation time; new function Channel_CreationTime() + +ngIRCd 17 (2010-11-07) + + - doc: change path names in sample-ngircd.conf depending on sysconfdir + - Fix up generation and distribution of sample-ngircd.conf + - contrib/ngircd-redhat.init: updated email address of Naoya Nakazawa + - contrib/platformtest.sh: make command name quoting consistent + + ngIRCd 17~rc3 (2010-10-27) + - Xcode builds: detect version number correctly, updated project file + to use the Mac OS X 10.5.x SDK, disable pam_fail_delay() because it + is only available starting with Mac OS X 10.6, and generate a default + PAM configuration for the Mac OS X Installer.app package of ngIRCd. + - Debian: updated standards version to 3.9.1, added libpam0g-dev to the + dependencies, and install a default /etc/pam.d/ngircd allowing all logins. + - Make contrib/platformtest.sh more portable. + - Fix connect attempts to further IP addresses of outgoing server links. + + ngIRCd 17~rc2 (2010-10-25) + - ZeroConf: include header files missing since commit a988bbc86a. + - Generate ngIRCd version number from GIT tag. + - Make source code compatible with ansi2knr again. This allows to compile + ngIRCd using a pre-ANSI K&R C compiler again. + - ./configure: check if C compiler can compile ISO Standard C. + - ./configure: check support for C prototypes again. + - Don't use PARAMS() macro for function implementations. + - Added m68k/apple/aux3.0.1 (gcc 2.7.2) to doc/Platforms.txt. + - Only try to set FD_CLOEXEC if this flag is defined. + - Only use "__attribute__ ((unused))" if GCC >=2.8 is used. + - doc/Makefile.am: don't set docdir, automake handles it already. + + ngIRCd 17~rc1 (2010-10-11) + - New configuration option "NoZeroConf" to disable service registration at + runtime even if ngIRCd is compiled with support for ZeroConf (e.g. using + Howl, Avahi or on Mac OS X). + - New configuration option "SyslogFacility" to define the syslog "facility" + (the "target"), to which ngIRCd should send its log messages. + Possible values are system dependent, but most probably "auth", "daemon", + "user" and "local1" through "local7" are possible values; see syslog(3). + Default is "local5" for historical reasons. + - Dump the "internal server state" (configured servers, established + connections and known clients) to the console or syslog when receiving + the SIGUSR2 signal and debug mode is enabled. + - Enable the daemon to disable and enable "debug mode" on runtime using + signal SIGUSR1, when debug code is compiled in, not only on startup + using the command line parameters. + - Signal handler: added new 'delayed' signal handlers, including fallback + to deprecated sysv API. And removed global NGIRCd_SignalRehash variable. + - IO: add io_cloexec() to set close-on-exec flag. + - ng_ipaddr.h: include required assert.h header. + - Conn_SyncServerStruct(): test all connections; and work case insensitive + - configure script: correctly indent IPv6 yes/no summary output. + - Don't reset My_Connections[Idx].lastping when reading data, so the + client lag debug-output is working again. + - Implement user mode "x": host name cloaking (closes: #102). + - Make configure switch "--docdir" work (closes: #108). + - Reformat and update FAQ.txt a little bit. + - INSTALL: mention SSL, IPv6, and changed handling of MotdFile. + - Change MOTD file handling: ngIRCd now caches the contents of the MOTD + file, so the daemon now requires a HUP signal or REHASH command to + re-read the MOTD file when its content changed. + - Startup: open /dev/null before chroot'ing the daemon. + - Allow IRC ops to change channel modes even without OperServerMode set. + - Allow IRC operators to use MODE command on any channel (closes: #100). + - Added mailmap file for git-[short]log and git-blame. + - Authenticated users should be registered without the "~" mark. + - Set NoPAM=yes in configuration files used for the testsuite. + - New configuration option "NoPAM" to disable PAM. + - Implement asynchronous user authentication using PAM, please see the + file doc/PAM.txt for details. + - Resolver: Implement signal handler and catch TERM signals. + - Don't set a penalty time when doing DNS lookups. + - Add some documentation for using BOPM with ngIRCd, see doc/Bopm.txt. + - Implement user mode "c": receive connect/disconnect NOTICEs. Note that + this new mode requires the user to be an IRC operator. + - ngircd.init: require "$network" and "$remote_fs" when stopping ngircd. + - Show SSL status in WHOIS output, numeric 275. + - Include correct header files when testing for arpa/inet.h (Closes: #105). + - Don't access already freed memory in IRC_KILL(). + - Fix "beeing" typo ... + - SSL/TLS: fix bogus "socket closed" error message. + +ngIRCd 16 (2010-05-02) + + - doc/SSL: remove line continuation marker + + ngIRCd 16~rc2 (2010-04-25) + - Updated some more copyright notices, it's 2010 already :-) + - Only compile in Get_Error() if really needed + - Fix gcc warning "ignoring return value of ..." + - Include netinet/in_systm.h alongside netinet/ip.h + - Include netinet/{in.h, in_systm.h} when checking for netinet/ip.h + - Only include <netinet/in_systm.h> if it exists + - Updated doc/Platforms.txt + - Enhance connection statistics counters: display total number of served + connections on daemon shutdown and when a new client connects using + the new numeric RPL_STATSCONN (250). + + ngIRCd 16~rc1 (2010-03-25) + - Various fixes to the build system and code cleanups. + - contrib/platformtest.sh: Only show latest commit. + - Updated doc/Platforms.txt, added new README-Interix.txt documenting + how to tun ngIRCd on Microsoft Services for UNIX (MS SFU, MS SUA). + - Updated links to the ngIRCd homepage (bug tracker, mailing list). + - Added missing modes to USERMODES #define + - Show our name (IRCD=ngIRCd) in ISUPPORT (005) numeric + - Quote received messages of ERROR commands in log output. + - ngircd.conf manual page: document missing "Password" variable. + - Implement WEBIRC command used by some Web-IRC frontends. The password + required to secure this command must be configured using the new + "WebircPassword" variable in the ngircd.conf file. + - Don't use port 6668 as example for both "Ports" and "SSLPorts". + - Remove limit on max number of configured irc operators. + - Only link "nsl" library when really needed. + - A new channel mode "secure connections only" (+z) has been implemented: + Only clients using a SSL encrypted connection to the server are allowed + to join such a channel. + But please note three things: a) already joined clients are not checked + when setting this mode, b) IRC operators are always allowed to join + every channel, and c) remote clients using a server not supporting this + mode are not checked either and therefore always allowed to join. + +ngIRCd 15 (2009-11-07) + + - "ngircd --configtest": print SSL configuration options even when unset. + + ngIRCd 15~rc1 (2009-10-15) + - Do not add default listening port (6667) if SSL ports were specified, so + ngIRCd can be configured to only accept SSL-encrypted connections now. + - Enable IRC operators to use the IRC command SQUIT (instead of the already + implemented but non-standard DISCONNECT command). + - New configuration option "AllowRemoteOper" (disabled by default) that + enables remote IRC operators to use the IRC commands SQUIT and CONNECT + on the local server. + - Mac OS X: fix test for packagemaker(1) tool in Makefile and use gcc 4.0 + for Mac OS X 10.4 compatibility in the Xcode project file. + - Fix --with-{openssl|gnutls} to accept path names. + - Fix LSB header of Debian init script. + - Updated doc/Platforms.txt and include new script contrib/platformtest.sh + to ease generating platform reports. + - Fix connection information for already registered connections. + - Enforce upper limit on maximum number of handled commands. This implements + a throttling scheme: an IRC client can send up to 3 commands or 256 bytes + per second before a one second pause is enforced. + - Fix connection counter. + - Fix a few error handling glitches for SSL/TLS connections. + - Minor fixes to manual pages and documentation. + +ngIRCd 14.1 (2009-05-05) + + - Security: fix remotely triggerable crash in SSL/TLS code. + - BSD start script contrib/ngircd.sh has been renamed to ngircd-bsd.sh. + - New start/stop script for RedHat-based distributions: + contrib/ngircd-redhat.init, thanks to Naoya Nakazawa <naoya@sanow.net>. + - Doxygen: update source code repository link to GIT. + - Debian: build ngircd-full-dbg package. + - Allow ping timeout quit messages to show the timeout value. + - Fix error handling on compressed links. + - Fix server list announcement. + - Do not remove host names from info text. + +ngIRCd 14 (2009-04-20) + + - Display IPv6 addresses as "[<addr>]" when accepting connections. + + ngIRCd 14~rc1 (2009-03-29) + - Updated Debian/Linux init script (see contrib/Debian/ngircd.init). + - Allow creation of persistent modeless channels. + - The INFO command reports the compile time now (if available). + - Spell check and enhance ngIRCd manual pages. + - Channel mode changes: break on syntax errors in MODE command. + - Support individual channel keys for pre-defined channels: introduce + new configuration variable "KeyFile" in [Channel] sections in ngircd.conf, + here a file can be configured for each pre-defined channel which contains + individual channel keys for different users. + - Remove limit on maximum number of predefined channels in ngircd.conf. + - Updated ngircd.spec file for building RPM packages. + - Add new and missing files to Mac OS X Xcode project, and update project. + - Reject masks with wildcard after last dot. + - TLS/SSL: remove useless error message when ssl connection is closed. + - Fix memory leak when a encrypted and compressed server link goes down. + (closes bug #95, reported by Christoph, fiesh@fiesh.homeip.net) + - Fix handling of channels containing dots. + (closes bug #93, reported by Gonosz Csiga) + +ngIRCd 13 (2008-12-25) + + - Updated documentation, especially doc/Services.txt and doc/SSL.txt. + - Make the test suite work on OpenSolaris. + + ngIRCd 13~rc1 (2008-11-21): + - New version number scheme :-) + - Initial support for IRC services, using a RFC1459 style interface, + tested with IRCServices (http://www.ircservices.za.net/) version 5.1.13. + For this to work, ngIRCd now supports server-server links conforming + to RFC 1459. New ngircd.conf(5) option: ServiceMask. + - Support for SSL-encrypted server-server and client-server links using + OpenSSL (configure: --with-openssl) or GNUTLS (configure: --with-gnutls). + New ngircd.conf(5) options: SSLPorts, SSLKeyFile, SSLKeyFilePassword, + SSLCertFile, SSLDHFile, and SSLConnect. + - Server local channels have been implemented, prefix "&", that are only + visible to users of the same server and are not visible in the network. + In addition ngIRCd creates a "special" channel &SERVER on startup and logs + all the messages to it that a user with mode +s receives. + - New make target "osxpkg" to build a Mac OS X installer package. + - Debug mode: enable support for GNU libc memory tracing (see mtrace(3)). + - SysV init script: use LSB logging functions, if available. + - Added some more FAQ entries (regarding logging and IRC operators). + - Allow IRC operators to overwrite channel limits. + - Support for enhanced PRIVMSG and NOTICE message targets. + - More tests have been added to the test-suite ("make check"), and two + servers are started for testing server-server linking. + - Added a timestamp to log messages to the console. + - New configuration option "NoIdent" to disable IDENT lookups even if the + daemon is compiled with IDENT support. + +ngIRCd 0.12.1 (2008-07-09) + + - Allow mixed line terminations (CR+LF/CR/LF) in non-RFC-compliant mode + - Don't allow stray \r or \n in command parameters + - --configtest: return non-zero exit code if there are errors + - Update ngIRCd manual pages + - Add option aliases -V (for --version) and -h (for --help). + - Fix 'no-ipv6' compile error. + - Make Listen parameter a comma-separated list of addresses. This also + obsoletes ListenIPv4 and ListenIPv6 options. If Listen is unset, it + is treated as Listen="::,0.0.0.0". + Note: ListenIPv4 and ListenIPv6 options are still recognized, + but ngircd will print a warning if they are used in the config file. + +ngIRCd 0.12.0 (2008-05-13) + + - Fix Bug: 85: "WHO #SecretChannel" that user is not a member of now returns + proper RPL_ENDOFWHO_MSG instead of nothing. (Ali Shemiran) + - Fix compile on FreeBSD 5.4 and AIX. + - If bind() fails, also print IP address and not just the port number. + + ngIRCd 0.12.0-pre2 (2008-04-29) + - IPv6: Add config options to disable ipv4/ipv6 support. + - Don't include doc/CVS.txt in distribution archive, use doc/GIT.txt now! + - Documentation: get rid of some more references to CVS, switch to GIT. + - Get rid of cvs-version.* and CVSDATE definition. + - Report ERR_NOTONCHANNEL when trying to part a channel one is not member of. + - Testsuite: remove erroneous ConfUID setting in config file. + + ngIRCd 0.12.0-pre1 (2008-04-20) + - Include Mac OS X Xcode project in distribution archives. + - Do not exit on SIGHUP or /REHASH if the config file cannot opened. + - Add IPv6 support. + - Install a LaunchDaemon script to start/stop ngIRCd on Mac OS X. + - Implemented IRC commands INFO, SUMMON (dummy), and USERS (dummy) and + enhanced test suite to check these commands. (Dana Dahlstrom) + - RPL_WHOREPLY messages generated by IRC_WHO didn't include flags (*,@,+). + (Dana Dahlstrom) + - IRC_WHO now supports search patterns and will test this against user + nickname/server name/host name, etc. as required by RFC 2812, Section 3.6.1. + (reported by Dana Dahlstrom) + - Add test cases for "WHO" command. (Dana Dahlstrom) + - Implement RFC 2812 handling of "0" argument to 'JOIN': must be treated + as if the user had sent PART commands for all channels the user is a + member of. (Dana Dahlstrom) + - Allow NOTICEs to be sent to a channel. (Fabian Schlager) + +ngIRCd 0.11.1 (2008-02-26) + + - Fix sending of JOIN commands between servers when remote server appended + mode flags. (Rolf Eike Beer) [from HEAD] + - Send "G" instead of "H" flag in WHO replies. (reported by Dana Dahlstrom) + - Under some circumstances ngIRCd issued channel MODE message with a + trailing space. (Dana Dahlstrom) [from HEAD] + +ngIRCd 0.11.0 (2008-01-15) + + ngIRCd 0.11.0-pre2 (2008-01-07) + - SECURITY: IRC_PART could reference invalid memory, causing + ngircd to crash [from HEAD]. (CVE-2008-0285) + + ngIRCd 0.11.0-pre1 (2008-01-02) + - Use dotted-decimal IP address if host name is >= 64. + - Add support for /STAT u (server uptime) command. + - New [Server] configuration Option "Bind" allows to specify + the source IP address to use when connecting to remote server. + - New configuration option "MaxNickLength" to specify the allowed maximum + length of user nicknames. Note: must be unique in an IRC network! + - Enhanced the IRC+ protocol to support an enhanced "server handshake" and + enable server to recognize numeric 005 (ISUPPORT) and 376 (ENDOFMOTD). + See doc/Protocol.txt for details. + - Re-added doc/SSL.txt to distribution -- got lost somewhere!? + - Fixes the wrong logging output when nested servers are introduced + to the network as well as the wrong output of the LINKS command. + - Update Mac OS X Xcode project file for Xcode 3. + - Adjust test suite to be usable on HP/UX 11.11 :-) + - Fix code to compile using K&R C compiler and ansi2kr again. + - New config option NoDNS: Disables DNS lookups when clients connect. + - Fixed propagation of channel mode 'P' on server links. + - Numeric 317: implemented "signon time" (displayed in WHOIS result). + - Fixed code that prevented GCC 2.95 to compile ngIRCd. + - Adjust path names in manual pages according to "./configure" settings. + - Added new server configuration option "Passive" for "Server" blocks to + disable automatic outgoing connections (similar to -p option to ngircd, + but only for the specified server). (Tassilo Schweyer) + - Don't connect to a server if a connection to another server within the + same group is already in progress. + - Added support for the WALLOPS command. Usage is restricted to IRC + operators. + +ngIRCd 0.10.4 (2008-01-07) + + - SECURITY: IRC_PART could reference invalid memory, causing + ngircd to crash [from HEAD]. (CVE-2008-0285) + +ngIRCd 0.10.3 (2007-08-01) + + - SECURITY: Fixed a severe bug in handling JOIN commands, which could + cause the server to crash. Thanks to Sebastian Vesper, <net@veoson.net>. + (CVE-2007-6062) + +ngIRCd 0.10.2 (2007-06-08) + + ngIRCd 0.10.2-pre2 (2007-05-19) + - Server links are allowed to use larger write buffers now (up to 50 KB). + + ngIRCd 0.10.2-pre1 (2007-05-05) + - Fix compressed server links (broken since 0.10.0). + - Predefined Channel configuration now allows specification of channel key + (mode k) and maximum user count (mode l). + - When using epoll() IO interface, compile in the select() interface as + well and fall back to it when epoll() isn't available on runtime. + - New configure option "--without-select" to disable select() IO API + (even when using epoll(), see above). + - Added support for IO APIs "poll()" and "/dev/poll". + - Reorganized internal handling of invite and ban lists. + +ngIRCd 0.10.1 (2006-12-17) + + - Fixed validation of server names containing digits. + - Update the "info text" of the local server after re-reading configuration. + - Changed Numerics 265 and 266 to follow ircd 2.11.x "standards". + - Allow PASS syntax defined in RFC 1459 for server links, too. + - Enhanced ISUPPORT message (005 numeric). + - New configuration option "PredefChannelsOnly": if set, clients can only + join predefined channels. + - Code cleanups: use "LogDebug(...)" instead of "Log(LOG_DEBUG, ...)", use + "strcspn()", unsigned vs. signed, use "const", fix whitespaces, ... + +ngIRCd 0.10.0 (2006-10-01) + + - Fixed file handle leak when daemon is not able to send MOTD to a client. + + ngIRCd 0.10.0-pre2 (2006-09-09) + - Fixed build problems with GCC option -fstack-protector. + - Minor documentation updates. + + ngIRCd 0.10.0-pre1 (2006-08-02) + - Validate "ServerName" (see RFC 2812, section 2.3.1). + - Enhanced DIE to accept a single parameter ("comment text") which is sent + to all locally connected clients before the server goes down. + - The ngIRCd handles time shifts backwards more gracefully now (the + timeout handling doesn't disconnect clients by mistake any more). + - Internal: Restructured connection handling (the connection ID is equal + to the file descriptor of the connection). + - Internal: Simplified resolver code. + - JOIN now supports more than one channel key at a time. + - Implemented numeric "333": Time and user name who set a channel topic. + - Enhanced the handler for PING and PONG commands: fix forwarding and enable + back-passing of a client supplied additional argument of PING. + - Changed handling of timeouts for unregistered connections: don't reset + the counter if data is received and disconnect clients earlier. + - Removed unnecessary #define of "LOCAL", now use plain C "static" instead. + - Channel topics are no longer limited to 127 characters: now the only limit + is the maximum length of an IRC command, i. e. 512 bytes (in practice, this + limits the topic to about 490 characters due to protocol overhead). + - Reverse DNS lookup code now checks the result by doing an additional + lookup to prevent spoofing. + - Added new IO layer which (optionally) supports epoll() and kqueue() in + addition to the select() interface. + +ngIRCd 0.9.2 (2005-10-15) + + - Fixed a bug that could cause the daemon to crash when outgoing server + connections can't be established. + - Fixed a bug that caused the daemon to leak file descriptors when no + resolver subprocesses could be created. + - Fixed server NOTICEs to users with "s" mode ("server messages"). + - Fixed a format string bug in "connection statistics" messages to clients. + +ngIRCd 0.9.1 (2005-08-03) + + - The KILL command killed much more than desired (including server links!) + when the target user is connected to a remote server. Bug introduced in + ngIRCd 0.9.0 ... Reported by <qssl@fastmail.fm>, Thanks! + - Changed some constants to be "signed" (instead of unsigned) to solve + problems with old (pre-ANSI) compilers. + +ngIRCd 0.9.0 (2005-07-24) + + ngIRCd 0.9.0-pre1 (2005-07-09) + - Fixed maximum length of user names, now allow up to 9 characters. + - Cut off oversized IRC messages that should be sent to the network instead + of shutting down the (wrong) connection. + - Don't generate error messages for unknown commands received before the + client is registered with the server (like the original ircd). + - Never run with root privileges but always switch the user ID. + - Make "netsplit" messages RFC compliant. + - Fix handling of QUIT Messages: send only one message, even if the client + is member of multiple channels. + - Don't exit server if closing of a socket fails; instead ignore it and + pray that this will be "the right thing" ... + - Implemented the IRC function "WHOWAS". + - Don't enable assert() calls when not ./configure'd with --enable-debug. + - Fixed ./configure test for TCP Wrappers: now it runs on Mac OS X as well. + - Enhanced configure script: now you can pass an (optional) search path + to all --with-XXX parameters, e. g. "--with-ident=/opt/ident". + - Removed typedefs for the native C data types. + Use stdbool.h / inttypes.h if available. + - New configuration option "OperServerMode" to enable a workaround needed + when running an network with ircd2 servers and "OperCanUseMode" enabled + to prevent the ircd2 daemon to drop mode changes of IRC operators. + Patch by Florian Westphal, <westphal@foo.fh-furtwangen.de>. + - Implemented support for "secret channels" (channel mode "s"). + - New configuration option "Mask" for [Operator] sections to limit OPER + commands to users with a specific IRC mask. Patch from Florian Westphal. + - Write "error file" (/tmp/ngircd-XXX.err) only if compiled with debug + code ("--enable-debug") and running as daemon process. + - Don't create version information string each time a client connects + but instead on server startup. By Florian Westphal. + - New configuration variable "PidFile", section "[Global]": if defined, + the server writes its process ID (PID) to this file. Default: off. + Idea of Florian Westphal, <westphal@foo.fh-furtwangen.de>. + - Code cleanups from Florian Westphal, <westphal@foo.fh-furtwangen.de>. + - Raised the maximum length of passwords to 20 characters. + - Fixed a memory leak when resizing the connection pool and realloc() + failed. Now we don't fall back to malloc(), which should be sane anyway. + Patch from Florian Westphal, <westphal@foo.fh-furtwangen.de>. + - Added support for the Howl (http://www.porchdogsoft.com/products/howl/) + Rendezvous API, in addition to the API of Apple (Mac OS X). The available + API will be autodetected when you call "./configure --with-rendezvous". + - Made ngIRCd compile on HP/UX 10.20 with native HP pre-ANSI C compiler and + most probably other older C compilers on other systems. + - When the daemon should switch to another user ID (ServerID is defined in + the configuration file) and is not running in a chroot environment, it + changes its working directory to the home directory of this user. This + should enable the system to write proper core files when not running with + root privileges ... + +ngIRCd 0.8.3 (2005-02-03) + + - Fixed a bug that could case a root exploit when the daemon is compiled + to do IDENT lookups and is logging to syslog. Bug discovered by CoKi, + <coki@nosystem.com.ar>, thanks a lot! + (CVE-2005-0226; http://www.nosystem.com.ar/advisories/advisory-11.txt) + +ngIRCd 0.8.2 (2005-01-26) + + - Added doc/SSL.txt to distribution. + - Fixed a buffer overflow that could cause the daemon to crash. Bug found + by Florian Westphal, <westphal@foo.fh-furtwangen.de>. (CVE-2005-0199) + - Fixed a possible buffer underrun when reading the MOTD file. Thanks + to Florian Westphal, <westphal@foo.fh-furtwangen.de>. + - Fixed detection of IRC lines which are too long to send. Detected by + Florian Westphal, <westphal@foo.fh-furtwangen.de>. + - Fixed return values of our own implementation of strlcpy(). The code has + been taken from rsync and they fixed it, but we didn't until today :-/ + It has only been used when the system didn't implement strlcpy by itself, + not on "modern" systems. Florian Westphal, <westphal@foo.fh-furtwangen.de>. + +ngIRCd 0.8.1 (2004-12-25) + + - Autoconf: Updated config.guess and config.sub + - Added some more debug code ... + - Fixed wrong variable names in output of "ngircd --configtest". + - Debian: Fixed the name of the "default file" in the init script for + ngircd-full packages. And do the test if the binary is executable after + reading this file. + - Enhanced the "test suite": please have a look at src/testsuite/README! + +ngIRCd 0.8.0 (2004-06-26) + + - Fixed wrong buffer size calculation for results of the resolver. + + ngircd 0.8.0-pre2 (2004-05-16) + - Enhanced logging to console when running in "no-detached mode": added + PID and log messages of resolver sub-processes. + - Fixed host name lookups when using IDENT user lookups. + - "make clean" and "make maintainer-clean" remove more files now. + + ngIRCd 0.8.0-pre1 (2004-05-07) + - Two new configuration options: "ChrootDir" and "MotdPhrase", thanks to + Benjamin Pineau <ben@zouh.org>. Now you can force the daemon to change + its root and working directory to something "safe". MotdPhrase is used + to define an "MOTD string" instead of a whole file, useful if the + "real" MOTD file would be outside the "jail". + - INVITE- and BAN-lists become synchronized between IRC+ servers when + establishing new connections, if the peer supports this as well. + - Reorganized autogen.sh and configure scripts. + - Fixed a wrong assert() which could cause the daemon to exit spuriously + when closing down connections. + - Better logging of decompression errors returned by zlib. + - Servers other than the destination server didn't clean up the invite + list of an "invite-only" channel properly when an INVITE'd user joined. + - Changed the reply of the MODE command to match the syntax of the + original ircd exactly: the unnecessary but missing ":" before the last + parameter has been added. + - Fixed TRACE: don't output "Serv" lines for ourself; display more info. + - Results of the resolver (host names and IDENT names) are discarded after + the client is successfully registered with the server. + - Better logging while establishing and shutting down connections. + - The type of service (TOS) of all sockets is set to "interactive" now. + - Added short command line option "-t" as alternative to "--configtest". + - Added optional support for "IDENT" lookups on incoming connections. You + have to enable this function with the ./configure switch "--with-ident". + The default is not to do IDENT lookups. + +ngIRCd 0.7.7 (2004-02-05) + + - The info text ("real name") of users is set to "-" if none has been + specified using the USER command (e. g. "USER user * * :"). Reason: + the original ircd doesn't like empty ones and would KILL such users. + - Fixed (optional) TCP Wrapper test which was broken and could result in + false results. Thanks to Fuminori Tanizaki <tany@mcnet.ad.jp>! + - Removed "USE_" prefixes of configuration #defines. + +ngIRCd 0.7.6 (2003-12-05) + + - Fixed abort() ("server crash") when INVITE'ing users to nonexistent + channels. Bug found by <hiddenx@wp.pl>. + - Extended version numbering of CVS versions (added date). + - Enhanced/fixed doc/Protocol.txt; + +ngIRCd 0.7.5 (2003-11-07) + + - Fixed ban behavior: users which are banned from a channel can't no + longer send PRIVMSG's to this channel (fixes Bug #47). + - Fixed and enhanced the "penalty handling" of the server: commands that + require more resources block the client for a short time. + - Changed the internal time resolution to one second. + - New configuration variable "MaxConnectionsIP" to limit the number of + simultaneous connections from a single IP that the server will accept. + This configuration options lowers the risk of denial of service attacks + (DoS), the default is 5 connections per client IP. + - Fixed build problems under Mac OS X 10.3. + - Use "-pipe" when compiling with gcc, speeds things up a little :-) + - Added new configuration variable "Listen" to bind all listening + sockets of the server to a single IP address. + - Suppress misleading error message of diff during make run. + - Enhanced test-suite and made it work on GNU/Hurd. + - Fixed minor typo in debug output :-) + +ngIRCd 0.7.1 (2003-07-18) + + - Included files to build Debian packages (located in "debian/"). + - Updated config.guess and config.sub to newer upstream versions. + - NJOIN propagates user channel modes correctly again ... Upsa. + - Made Makefile more compatible with "make -j<n>". + - Added support for GNU/Hurd. + - Fixed a compiler warning related to an unnecessary assert(). + - Enhanced VERSION command when using debug versions. + +ngIRCd 0.7.0 (2003-05-01) + + - "ServerName" is checked better now: a dot (".") is required. + - The KILL command verifies and logs more parameters. + + ngIRCd 0.7.0-pre2 (2003-04-27) + - CVS build system fixes (made autogen.sh more portable). + - Fixed compilation and test-suite on Solaris (tested with 2.6). + - New documentation file "doc/Platforms.txt" describing the status of + ngIRCd on the various tested platforms. + - Test for broken GCC on Mac OS X and disable "-pedantic" in this case. + - Disable "-ansi" on Cygwin: system headers are incompatible. + - The server tried to connect to other servers only once when DNS or + socket failures occurred. + - Fixed --configtest: There is no variable "ServerPwd", it's "Password". + + ngIRCd 0.7.0-pre1 (2003-04-22) + - New signal handler (more secure, actions are executed outside). + - GCC: the compiler is now called with more warning options enabled. + - Replaced a lot of str[n]cpy(), str[n]cat() and sprintf() calls with the + more secure functions strlcpy(), strlcat() and snprintf(). On systems + that don't support strlcpy() and strlcat(), these functions are included + in the libngportab now (with prototypes in portab.h). + - If the server can't close a socket, it panics now. This is an error that + can't occur during normal operation so there is something broken. + - The order of log messages during disconnects is more "natural" now ;-) + - Cleaned up handling of server configuration structures: modifying and + removing servers during runtime works more reliable now. + - Compression code from "conn.[ch]" is now found in new "conn-zip.[ch]" + - Moved some connection functions from "conn.[ch]" to "conn-func.[ch]". + - New command CONNECT to enable and add server links. The syntax is not + RFC-compatible: use "CONNECT <name> <port>" to enable and connect an + configured server and "CONNECT <name> <port> <host> <mypwd> <peerpwd>" + to add a new server (ngIRCd tries to connect new servers only once!). + - Added DISCONNECT command ("DISCONNECT <name>") to disable servers. + - Restructured the documentation: Now the main language is English. The + German documentation has been removed (until there is a maintainer). + - Enhanced killing of users caused by a nickname collision. + - Better error detection for status code ("numerics") forwarding. + - Moved tool functions to own library: "libngtool". + - New command TRACE (you can trace only servers at the moment). + - New command HELP that lists all understood commands. + - There should no longer remain "unknown connections" (see e.g. LUSERS) + if an outgoing server link can't be established. + - Added AC_PREREQ(2.50) to configure.in for better autoconf compatibility. + - Conn_Close() now handles recursive calls for the same link correctly. + - ngIRCd can register itself with Rendezvous: to enable support pass the + new switch "--with-rendezvous" to configure. + - Added support for TCP Wrappers library: pass "--with-tcp-wrappers" to + configure to enable it. + - Changed some configure options to use "--with"/"--without" as prefix + instead of "--enable"/"--disable": "--without-syslog", "--without-zlib", + "--with-tcp-wrappers", and "--with-rendezvous". + - Better error reporting to clients on connect. + - Enhanced manual pages ngircd(8) and ngircd.conf(5). + - Documentation is now installed in $(datadir)/doc/ngircd. + - Enhanced handling of NJOIN in case of nick collisions. + +ngIRCd 0.6.1 (2003-01-21) + + - Fixed KILL: you can't crash the server by killing yourself any more, + ngIRCd no longer sends a QUIT to other servers after the KILL, and you + can kill only valid users now. + - The server no longer forwards commands to ordinary users, instead it + answers with the correct error message ("no such server") now. + - WHOIS commands weren't always forwarded as requested. + - The server sets a correct default AWAY message now when propagating + between servers (bug introduced in 0.6.0). + - Fixed up and enhanced CHANINFO command: channel keys and user limits + are synchronized between servers now, too. + - MODE returns the key and user limit for channel members correctly now. + - Non-members of a channel could crash the server when trying to change + its modes or modes of its members. + - The server didn't validate weather a target user is a valid channel + member when changing his channel user modes which could crash ngIRCd. + + +Older changes (sorry, only available in German language): + +ngIRCd 0.6.0, 24.12.2002 + + ngIRCd 0.6.0-pre2, 23.12.2002 + - neuer Numeric 005 ("Features") beim Connect. + - LUSERS erweitert: nun wird die maximale Anzahl der lokalen und globalen + Clients, die dem Server bzw. im Netzwerk seit dem letzten (Re-)Start + dem Server gleichzeitig bekannt waren, angezeigt. + + ngIRCd 0.6.0-pre1, 18.12.2002 + - beim Schliessen einer Verbindung zeigt der Server nun vor dem ERROR + noch eine Statistik ueber die empfangene und gesendete Datenmenge an. + - der Server wartet bei einer eingehenden Verbindung nun laenger auf den + Resolver (4 Sekunden), wenn das Ergebnis eintrifft setzt er aber den + Login sofort fort (bisher wurde immer mind. 1 Sekunde gewartet). + - Connection-Strukturen werden nun "pool-weise" verwaltet; der Pool wird + bei Bedarf bis zu einem konfigurierten Limit vergroessert. + - Mit der neuen Konfigurationsvariable "MaxConnections" (Sektion "Global") + kann die maximale Anzahl gleichzeitiger Verbindungen begrenzt werden. + Der Default ist -1, "unlimitiert". + - der Server erkennt nun, ob bereits eine eingehende Verbindung von einem + Peer-Server besteht und versucht dann nicht mehr, selber eine eigene + ausgehende Verbindung zu diesem auufzubauen. Dadurch kann nun auf beiden + Servern in der Konfiguration ein Port fuer den Connect konfiguriert + werden (beide Server versuchen sich dann gegenseitig zu connectieren). + - Test-Suite und Dokumentation an A/UX angepasst. + - unter HP-UX definiert das configure-Script nun _XOPEN_SOURCE_EXTENDED. + - Server identifizieren sich nun mit asynchronen Passwoertern, d.h. das + Passwort, welches A an B schickt, kann ein anderes sein als das, welches + B als Antwort an A sendet. In der Konfig.-Datei, Abschnitt "Server", + wurde "Password" dazu durch "MyPassword" und "PeerPassword" ersetzt. + - Der Server kann nun zur Laufzeit die Konfiguration neu einlesen: dies + macht er nach dem Befehl REHASH oder wenn ein HUP-Signal empfangen wird. + - Channel-Mode "P" ("persistent") kann nur noch von IRC-Operatoren gesetzt + werden. Grund: User koennen den Server sonst leicht "Channel-Flooden". + - MOTD kann nun an andere Server geforwarded werden. + - IRC-Befehl "TIME" implementiert. + - Server-Server-Links koennen nun komprimiert werden, dazu wird die zlib + (www.zlib.org) benoetigt. Unterstuetzt die Gegenseite die Komprimierung + nicht, wird automatisch unkomprimiert kommuniziert. Das Verfahren ist + kompatibel mit dem Original-ircd 2.10.3, d.h. beide Server koennen + miteinander ueber komprimiert Links kommunizieren. + - Handling der Schreibpuffer umgestellt: Server sollte schneller arbeiten. + - Prefix-Fehler werden besser protokolliert (mit verursachendem Befehl). + - SQUIT wird nicht mehr doppelt an andere Server weitergeleitet. + - Der Server versucht nun vor dem Schliessen einer Verbindung Daten, die + noch im Schreibpuffer stehen, zu senden. + - Source in weiteres Modul "irc-info" aufgespalten. + - Konfigurationsvariablen werden besser validiert: Laengen, Zahlen, ... + - neuen Befehl STATS begonnen: bisher unterstuetzt wird "l" und "m". + - bei ISON und USERHOST fehlte im Ergebnis-String der korrekte Absender. + - IRC Operatoren koennen nun mit KILL User toeten. Achtung: ein Grund muss + zwingend als zweiter Parameter angegeben werden! + - neue Konfigurations-Variable "MaxJoins": Hiermit kann die maximale Zahl + der Channels, in denen ein User Mitglied sein kann, begrent werden. + - neuer, deutlich flexiblerer Parser fuer den MODE Befehl. + - neue Channel-Modes l (User-Limit) und k (Channel-Key) implementiert. + +ngIRCd 0.5.4, 24.11.2002 + + - Fehler-Handling von connect() gefixed: der Server kann sich nun auch + unter A/UX wieder zu anderen verbinden. + - in den Konfigurationsvariablen ServerUID und ServerGID kann nun nicht + nur die numerische ID, sondern auch der Name des Users bzw. der Gruppe + verwendet werden. Beim Start des Daemons wird nun beides angezeigt. + - Besseres Logging von Prefix-Fehlern. + - angenommene Sockets werden nun korrekt auf "non-blocking" konfiguriert, + beim Senden und Empfangen werden Blockierungen besser abgefangen. + - RPL_UMODEIS hat Code 221, nicht 211 ... *argl* + - select() in Try_Write() hat falschen (keinen!) Timeout verwendet; + die "Zeit-Aufloesung" des Servers sind zudem nun 2 Sekunden (TIME_RES). + Insgesamt sollte die Reaktionszeit des Server nun besser sein. + +ngIRCd 0.5.3, 08.11.2002 + + - NOTICE liefert nun wirklich nie mehr einen Fehler, auch dann nicht, + wenn der sendende Client noch gar nicht registriert ist. + - ein "schneller Server-Reconnect" wird nur noch dann versucht, wenn die + Verbindung zuvor ordentlich (="lange genug") in Ordnung war; somit also + nicht meht, wenn der Peer-Server gleich beim Connect ein ERROR liefert. + Das vermeidet "Connect-Orgien". + - einige Datentypen aufgeraumt: z.B. sind viele INT32s nun LONGs. Das ist + auf Platformen mit 8-Byte-Integern kompatibler. + - RPL_YOURHOST_MSG ist nun ircII- und RFC-kompatibel ;-) + - Segfault unter hoher Netzaktivitaet behoben: in Conn_Close() wird die + Connection-Struktur nun frueher als "ungueltig" markiert. + +ngIRCd 0.5.2, 04.10.2002 + + - Buffer Overflow in Read_Resolver_Result() behoben. + - Format-String-Bugs, die zum Abbruch des Servers fuehrten, behoben. + - Maximale Laenge eines IRC-Prefix wurde falsch berechnet. + +ngIRCd 0.5.1, 03.10.2002 + + - in RPL_YOURHOST_MSG wurde ein fehlerhafter Versionsstring geliefert. + - Test-Suite: start-server.sh, stop-server.sh und stress-server.sh koennen + nun "manuell" von der Kommandozeile gestartet werden, stress-server.sh + startet per Default nur noch 5 Sessions, eine andere Zahl kann auf der + Kommandozeile uebergeben werden (Syntax: "stress-server.sh <count>"). + - In bestimmten Faellen hat der Server versucht auf einen bereits wieder + geschlossenen Socket Daten zu schreiben; das fuehrte zu einem Abbruch des + Servers durch ein assert(). Nun wird geprueft, ob der Socket noch ok ist. + - im "contrib"-Verzeichnis befindet sich nun eine RPM-Spec-Datei, aus den + .tar.gz's koennen nun mit "rpm -ta <archiv>" RPM's erzeugt werden. Danke + an Sean Reifschneider <jafo@tummy.com>! + - Syntax von RPL_MYINFO_MSG korrigiert: liefert nun vier Parameter. + +ngIRCd 0.5.0, 20.09.2002 + + - Dokumentation aktualisiert. + - Fehler bei Validierung von "AdminInfo2" behoben. + - Test der Flags fuer "ps" in der Testsuite verbessert, ist nun zu mehr + Plattformen kompatibler. + + ngIRCd 0.5.0-pre2, 17.09.2002 + - Fix in IRC_WriteStrServersPrefix() war "badly broken" -- behoben. + + ngIRCd 0.5.0-pre1, 16.09.2002 + - Manual-Pages ngircd.8 und ngircd.conf.5 begonnen. + - Wird der Netzwerk-Sniffer aktiviert (--sniffer), so schaltet der + ngIRCd nun automatisch in den Debug-Modus. + - auf Systemen, die inet_aton() nicht kennen (wie z.B. A/UX), kann der + ngIRCd nun dennoch auch aktiv Server-Links aufbauen. + - h_errno wird auf Systemen, die das nicht kennen (wie z.B. HP-UX 10.20) + nicht mehr verwendet. Somit compiliert der ngIRCd nun auch dort :-) + - um auf dem Ziel-System nicht vorhandene Funktionen nachzubilden wird nun + die "libngportab" erzeugt; genutzt wird dies bisher fuer vsnprintf(). + Nun compiliert der ngIRCd auch unter Solaris 2.5.1. + - "persistente Channels" (Mode 'P') implementiert: diese koennen in der + Konfigurationsdatei definiert werden (Sektion "Channel", vgl. Beispiel- + Konfiguration "sample-ngircd.conf") und bleiben auch dann bestehen, + wenn kein User mehr im Channel ist. Zu Channel-Operatoren werden bisher + nur IRC-Operatoren, die den Channel betreten. Die persistenten Channels + werden durch das Flag "P" gelennzeichnet, welches normal durch Channel- + Op's gesetzt und geloescht werden kann. + - bei "--configtest" werden keine leere Abschnitte mehr ausgegeben. + - Source in weitere Module aufgespalten: lists, irc-op und resolve. + - #include's aufgeraeumt: Header includieren keine anderen mehr. + - KICK implementiert (bisher kann nur ein User aus einem Channel geckicked + werden, Listen, wir im RFC vorgesehen, werden bisher nicht unterstuetzt). + - INVITE, den Channel-Mode "i" sowie Invite-Lists ueber den MODE-Befehl + (setzen, erfragen und loeschen) implementiert. + - Source an ansi2knr fuer pre-ANSI-Compiler angepasst; ansi2knr in Source- + Tree aufgenommen und in Build-System integriert; der ngIRCd compiliert + nun z.B. unter A/UX mit dem nativen Compiler von Apple. + - TOPIC lieferte bei unbekanntem Channel einen falschen Fehlercode. + - LIST versteht nun Wildcards und kann an andere Server geforwarded werden. + - wurde ein KILL fuer nicht-lokale Clients empfangen, so wurden die + Verwaltungs-Strukturen nicht korrekt freigegeben. + - empfangene NJOIN's wurden "zerhackt" an andere Server weitergegeben. + - neue Konfigurationsoption "OperCanUseMode" (Sektion "Global"): + ist sie aktiv, koennen IRC-Operatoren immer Channel-Modes setzen. + - Dokumentation des neuen IRC+-Protokolls begonnen: doc/Protocol.txt + - Protokoll- und Server-ID bei PASS-Befehlen auf neues Format umgestellt; + bei empfangenen PASS-Befehlen werden diese zudem nun auch ausgewertet. + Die unterstuetzten Flags sind in doc/Protocol.txt beschrieben. + - mit dem neuen Befehl CHANINFO synchronisieren Server, die das IRC+- + Protokoll unterstuetzen, Channel-Modes und Topics. + - neue Option "--disable-ircplus" fuer das configure-Script, um das + IRC+-Protokoll abzuschalten (per Default ist es aktiviert). + - Ban-Lists (setzen, erfragen und loeschen) implementiert. + - wird der Server mit "-n"/"--nodaemon" gestartet, so werden keine Mel- + dungen mehr ueber Syslog ausgegeben, sondern nur noch auf der Konsole. + - "Test-Suite" begonnen (in "make check" integriert): Dabei wird ein + speziell konfigurierter Server auf Port 6789 gestartet, mit dem dann + einige Tests durchgefuehrt werden (u.a. "Stress-Test" mit 50 Clients). + - zu lange Operator-Namen in der Konfiguration wurden falsch gekuerzt. + - kleine Anpassung an AIX 3.2.5: nun laeuft der ngIRCd auch dort :-) + - ADMIN-Befehl implementiert. Die Daten hierzu werden in der Konfig-Datei + im [Global]-Abschnitt mit den Variablen "AdminInfo1", "AdminInfo2" und + "AdminEMail" konfiguriert. + +ngIRCd 0.4.3, 11.06.2002 + + - Bei PRIVMSG und NOTICE hat der ngIRCd nicht ueberpruft, ob das Ziel + ueberhaupt ein User ist. War es keiner, so fuehrte dies zu einem + Abbruch des Servers [es wurde assert() aufgerufen]. + +ngIRCd 0.4.2, 29.04.2002 + + - LUSERS verzaehlt sich bei eigenen Server-Links nicht mehr. + - QUIT wird nun auch von noch nicht registrierten Clients akzeptiert. + - IRC-Funktion LIST implementiert; bisher werden allerdings noch keine + Wildcards (bis auf "*") unterstuetzt. + +ngIRCd 0.4.1, 08.04.2002 + + - Bei Server-Links wird nicht mehr an Hand der Anzahl der Parameter + eines empfangenen SERVER-Befehls, sondern "intern" erkannt, ob es + sich um eine ein- oder ausgehende Verbindung handelt und somit das + eigene PASS-SERVER-Paar gesendet werden muss oder nicht. Da sich + verschiedene Versionen des Original-ircd's anders verhalten, schlug + die Anmeldung je nach Gehenseite evtl. fehl. + - Bei einem NICK-Befehl eines lokalen Client konnte der Server ab- + stuerzen, da ein Format-String einer Log-Meldung fehlerhaft war. + +ngIRCd 0.4.0, 01.04.2002 + + - IRC-Befehle nochmal auf weitere Source-Dateien aufgespalten. + - WHO implementiert (bisher ohne komplette Unterstuetzung von Masks). + - Der AWAY-Mode wurde nicht ueber mehrere Server-Links weitergegeben. + - stderr wird nun in eine Datei umgelenkt (/tmp/ngircd-<PID>.err). + Laeuft der Server nicht im Debug-Modus, so wird diese bei Programm- + ende geloescht. Sollte der Server abstuerzen, finden sich hier evtl. + zusaetzliche Informationen. + - In Nicknames wird das Zeichen "-" nun als zulaessig erkannt. + - die Beispiel-Konfigurationsdatei (doc/sample-ngircd.conf) wird als + ngircd.conf installiert, wenn noch keine "echte" Konfigurationsdatei + vorhanden ist. + - bei WHO, WHOIS und NAMES wird nun nur noch der Status "Operator" oder + "voiced" geliefert -- nicht mehr beides. + - Server-Gruppen implementiert: es wird immer nur zu einem Server in + einer Gruppe eine Verbindung aufgebaut, klappt es beim ersten Server + nicht, so wird der naechste probiert (Variable "Group" in der Kon- + figurationsdatei, Sektion [Server]). + - IRC_PING() ist, wenn nicht im "strict RFC"-Mode, toleranter und ak- + zeptiert beliebig viele Parameter (z.B. BitchX sendet soetwas). + - die "Portab-Header" werden nicht mehr benoetigt, die System-Erkennung + wird nun ausschliesslich vom configure-Script durchgefuehrt. System- + abhaengige Definitionen finden sich nun unter src/portrab/. + - Clients und Channels werden nicht mehr ueber ihren Namen, sondern + einen Hash-Wert gesucht: sollte deutlich schneller sein. + - neuer Kommandozeilen-Parameter "--configtest": die Konfiguration wird + gelesen und dann die verwendeten Werte angezeigt. + - Client-Mode "s" (Server Notices) implementiert. + - mit dem neuen Kommandozeilen-Parameter "--config"/"-f" kann eine + alternative Konfigurationsdatei angegeben werden. + - nach dem Start kann der ngIRCd, wenn er mit root-Rechten laeuft, + zu einer anderen User-ID und Group-ID wechseln. + - URL der Homepage wird u.a. bei "--version" mit angezeigt. + +ngIRCd 0.3.0, 02.03.2002 + + - bekommt der Server ein HUP-Signal, so startet er neu -- genau so, wie + er auf den IRC-Befehl RESTART reagiert. + - FAQ um Hinweise auf den Bugtracker erweitert. + - neuer Kommandozeilen-Schalter "--passive" (-p): wird er angegeben, so + verbindet sich der ngIRCd nicht mehr automatisch zu anderen Servern. + Zum Debuggen manchmal ganz praktisch :-) + - direkt nach dem Start schreibt der ngIRCd nun die aktiven Kommando- + zeilenschalter in's Logfile (Passive, Debug, Sniffer ...). + - das Signal-Flag SA_RESTART wird nur noch gesetzt, wenn es auf dem + jeweiligen System auch definiert ist. + - bei ausgehenden Verbindungen wird nun der Ziel-Port protokolliert. + - neue Befehle VERSION und KILL implementiert. + - make-Target "check" (und "distcheck") mit Sinn erfuellt :-) + (die Tests sind aber bisher nicht all zu tiefgehend ...) + - Durch einen Ueberlauf konnte die Idle-Time bei WHOIS negativ werden ... + - Anpassungen an A/UX: gehoert nun auch zu den unterstuetzten Platformen. + - WHOIS wird nicht mehr automatisch an den "Original-Server" weiterge- + leitet: war eh nicht RFC-konform und machte mit Clients Probleme. + - an User wird nun immer ein "komplettes" Prefix (mit Host-Mask) ver- + schickt, Server bekommen nach wie vor kurze: das "Original" hat bei + bestimmten Befehlen (PRIVMSG) ansonsten evtl. Probleme ... + - NAMES korrigiert und vollstaendig implementiert. + - SQUIT wird auf jeden Fall geforwarded, zudem besseres Logging. + - Ist ein Nick bei der User-Registrierung bereits belegt, nimmt der + Server nun korrekt weitere NICK-Befehle an und verwendet diese. + - PRIVMSG beachtet nun die Channel-Modes "n" und "m". + - AWAY implementiert. PRIVMSG, MODE, USERHOST und WHOIS angepasst. + - der ngIRCd unterstuetzt nun Channel-Topics (TOPIC-Befehl). + - ausgehende Server-Verbindungen werden nun asynchron connectiert und + blockieren nicht mehr den ganzen Server, wenn die Gegenseite nicht + erreicht werden kann (bis zum Timeout konnten Minuten vergehen!). + - Wert der Konfigurations-Variable "ConnectRetry" wird besser beachtet. + - Channel- und Nicknames werden nun ordentlich validiert. + +ngIRCd 0.2.1, 17.02.2002 + + - NICK korrigiert: es werden nun auch alle "betroffenen" User informiert. + - configure-Script erweitert, u.a. bessere Anpassung an BeOS: dort wird + nun die "libbe" zum ngIRCd gelinkt, somit funktioniert auch syslog. + - Fehlerhafte bzw. noch nicht verstandene Modes werden nun ausfuehrlicher + an den Client geliefert. + +ngIRCd 0.2.0, 15.02.2002 + + - Nicknames und Channel-Namen werden etwas besser auf Gueltigkeit ueber- + prueft; ist aber nach wie vor noch nicht ausreichend. + - NJOINS von Servern wurden nicht an andere Server weitergeleitet. + - Begonnen Channel-Modes und User-Channel-Modes zu implementieren: der + Server versteht an User-Modes o und v, beachtet letzteres allerdings + noch nirgends. Bekannte (aber nicht beachtete!) Channel-Modes sind + bisher a, m, n, p, q, s und t. Diese Modes werden von Usern ange- + nommen, von anderen Servern werden auch unbekannte Modes uebernommen. + - Benutzer von connectierenden Servern wurden nicht in den Channels ange- + kuendigt, es wurden nur die internen Strukturen angepasst. + - Nach dem Connect eines Users werden LUSERS-Informationen angezeigt. + +ngIRCd 0.1.0, 29.01.2002 + + - User-Modes bei User-Registrierungen von andere Servern (NICK-Befehl) + wurden falsch uebernommen. Zudem wurden die Modes falsch gekuerzt. + - Server-Verbindungen werden nun nach dem Start erst nach einer kurzen + Pause aufgebaut (zur Zeit drei Sekunden). + - Hilfetext korrigiert: --help und --version waren vertauscht, die + Option --sniffer wurde gar nicht erwaehnt. + - FAQ.txt in doc/ begonnen. + - der IRC-Sniffer wird nur noch aktiviert, wenn die Option auf der + Kommandozeile angegeben wurde (bei entsprechend compiliertem Server). + - Channels implementiert, bisher jedoch noch ohne Channel-Modes, d.h. + es gibt keine Channel-Ops, kein Topic, kein "topic lock" etc. pp. + Chatten in Channels ist aber natuerlich moeglich ;-) + - neue Befehle fuer Channles: JOIN, PART und NJOIN. + - durch die Channels einige Aenderungen an PRIVMSG, WHOIS, MODE etc. + - neu connectierenden Servern werden nun Channels mit NJOIN angekuendigt. + - Signal-Hander geaendert: die Fehlermeldung "interrupted system call" + sollte so nicht mehr auftreten. + - "spaeter" neu connectierende Server werden nun im Netz angekuendigt. + - SERVER-Meldungen an andere Server sind nun korrekt sortiert. + - Clients werden nun korrekt sowohl nur ueber den Nickname als auch die + komplette "Host Mask" erkannt. + +ngIRCd 0.0.3, 16.01.2002 + + - Server-Links vollstaendig implementiert: der ngIRCd kann nun auch + "Sub-Server" haben, also sowohl als Leaf-Node als auch Hub in einem + IRC-Netzwerk arbeiten. + - MODE und NICK melden nun die Aenderungen an andere Server, ebenso + die Befehle QUIT und SQUIT. + - WHOIS wird nun immer an den "Original-Server" weitergeleitet. + - Parses handhabt Leerzeichen zw. Parametern nun etwas "lockerer". + - Status-Codes an den Server selber werden ignorier. + - Log-Meldungen und Log-Level ueberarbeitet und korrigiert. + - Kommandozeilen-Parser: Debug- und No-Daemon-Modus, Hilfe. + - ngIRCd wandelt sich nun in einen Daemon (Hintergrundprozess) um. + - WHOIS korrigiert: Anfrage wurde u.U. an User geforwarded anstatt vom + Server beantwortet zu werden. + - neue Befehle: LUSERS, LINKS + - Client-Modes von Remote-Servern wurden nicht korrekt uerbernommen. + +ngIRCd 0.0.2, 06.01.2002 + + - Struktur der Konfigurationsdatei geaendert: sie ist nun "Samba like", + d.h. sie besteht aus Abschnitten (siehe "doc/sample-ngircd.conf"). + - Es koennen mehrere IRC-Server-Opertatoren konfiguriert werden. + - Zombies der Resolver-Prozesse werden nun ordentlich "getoetet". + - NICK kann nun die Gross- und Kleinschreibung eines Nicks aendern. + - ein Server-Passwort ist nun konfigurierbar. + - neue Befehle: ERROR, SERVER, NJOIN (nur als "Fake"), SQUIT. + - Asynchroner Resolver Hostname->IP implementiert. + - Server-Links teilweise implementiert: bisher kann der ngIRCd jedoch + nur "leafed server" sein, d.h. keine "Client-Server" haben. Einige + Befehle sind auch noch nicht (optimal) angepasst: PRIVMSG funktioniert + aber bereits, ebenso wie WHOIS (letzterer wird immer an den Server, + auf dem der User registriert ist, weitergegeben). + - "arpa/inet.h" wird nur noch includiert, wenn vorhanden. + - Fehler bei select() fuerhen nun zum Abbruch von ngIRCd, bisher landete + der Server zumeist in einer Endlosschleife. + - Logmeldungen und Level an vielen Stellen verbessert. + - lokalen Usernamen wird nun ein "~" vorangestellt, da bisher noch keine + Ident-Anfragen gemacht werden. + +ngIRCd 0.0.1, 31.12.2001 + + - erste oeffentliche Version von ngIRCd als "public preview" :-) diff --git a/deprecated-ngircd/Dockerfile b/deprecated-ngircd/Dockerfile new file mode 100644 index 0000000..df23b55 --- /dev/null +++ b/deprecated-ngircd/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY rootfs / +ENTRYPOINT ["/ngircd", "-n", "-f", "/config.ini"] diff --git a/deprecated-ngircd/INSTALL.md b/deprecated-ngircd/INSTALL.md new file mode 100644 index 0000000..16c7ea4 --- /dev/null +++ b/deprecated-ngircd/INSTALL.md @@ -0,0 +1,411 @@ +# [ngIRCd](https://ngircd.barton.de) - Installation + +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 are working on a fresh installation. + +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**: + All already deprecated legacy options (besides the newly deprecated *Key* and + *MaxUsers* settings, see below) were removed in ngIRCd 26, so make sure to + update your configuration before upgrading, if you haven't done so already + (you got a warning on daemon startup when using deprecated options): you can + check your configuration using `ngircd --configtest` -- which is a good idea + anyway ;-) + +- Setting modes for predefined channels in *[Channel]* sections has been + enhanced: now you can set *all* modes, like in IRC "MODE" commands, and have + this setting multiple times per *[Channel]* block. Modifying lists (ban list, + invite list, exception list) is supported, too. + + Both the *Key* and *MaxUsers* settings are now deprecated and should be + replaced by `Modes = +l <limit>` and `Modes = +k <key>` respectively. + +Differences to version 22.x + +- The *NoticeAuth* `ngircd.conf` configuration variable has been renamed to + *NoticeBeforeRegistration*. The old *NoticeAuth* variable still works but + is deprecated now. + +- The default value of the SSL *CipherList* variable has been changed to + "HIGH:!aNULL:@STRENGTH:!SSLv3" (OpenSSL) and "SECURE128:-VERS-SSL3.0" + (GnuTLS) to disable the old SSLv3 protocol by default. + + To enable connections of clients still requiring the weak SSLv3 protocol, + the *CipherList* must be set to its old value (not recommended!), which + was "HIGH:!aNULL:@STRENGTH" (OpenSSL) and "SECURE128" (GnuTLS), see below. + +Differences to version 20.x + +- Starting with ngIRCd 21, the ciphers used by SSL are configurable and + default to "HIGH:!aNULL:@STRENGTH" (OpenSSL) or "SECURE128" (GnuTLS). + Previous version were using the OpenSSL or GnuTLS defaults, "DEFAULT" + and "NORMAL" respectively. + +- When adding GLINE's or KLINE's to ngIRCd 21 (or newer), all clients matching + the new mask will be KILL'ed. This was not the case with earlier versions + that only added the mask but didn't kill already connected users. + +- The *PredefChannelsOnly* configuration variable has been superseded by the + new *AllowedChannelTypes* variable. It is still supported and translated to + the appropriate *AllowedChannelTypes* setting but is deprecated now. + +Differences to version 19.x + +- Starting with ngIRCd 20, users can "cloak" their hostname only when the + configuration variable *CloakHostModeX* (introduced in 19.2) is set. + Otherwise, only IRC operators, other servers, and services are allowed to + set mode +x. This prevents regular users from changing their hostmask to + the name of the IRC server itself, which confused quite a few people ;-) + +Differences to version 17.x + +- Support for ZeroConf/Bonjour/Rendezvous service registration has been + removed. The configuration option *NoZeroconf* is no longer available. + +- The structure of `ngircd.conf` has been cleaned up and three new configuration + sections have been introduced: *[Limits]*, *[Options]*, and *[SSL]*. + + Lots of configuration variables stored in the *[Global]* section are now + deprecated there and should be stored in one of these new sections (but + still work in *[Global]*): + + - *AllowRemoteOper* -> [Options] + - *ChrootDir* -> [Options] + - *ConnectIPv4* -> [Options] + - *ConnectIPv6* -> [Options] + - *ConnectRetry* -> [Limits] + - *MaxConnections* -> [Limits] + - *MaxConnectionsIP* -> [Limits] + - *MaxJoins* -> [Limits] + - *MaxNickLength* -> [Limits] + - *NoDNS* -> [Options], and renamed to *DNS* + - *NoIdent* -> [Options], and renamed to *Ident* + - *NoPAM* -> [Options], and renamed to *PAM* + - *OperCanUseMode* -> [Options] + - *OperServerMode* -> [Options] + - *PingTimeout* -> [Limits] + - *PongTimeout* -> [Limits] + - *PredefChannelsOnly* -> [Options] + - *SSLCertFile* -> [SSL], and renamed to *CertFile* + - *SSLDHFile* -> [SSL], and renamed to *DHFile* + - *SSLKeyFile* -> [SSL], and renamed to *KeyFile* + - *SSLKeyFilePassword* -> [SSL], and renamed to *KeyFilePassword* + - *SSLPorts* -> [SSL], and renamed to *Ports* + - *SyslogFacility* -> [Options] + - *WebircPassword* -> [Options] + + You should adjust your `ngircd.conf` and run `ngircd --configtest` to make + sure that your settings are correct and up to date! + +Differences to version 16.x + +- Changes to the *MotdFile* specified in `ngircd.conf` now require a ngIRCd + configuration reload to take effect (HUP signal, *REHASH* command). + +Differences to version 0.9.x + +- The option of the configure script to enable support for Zeroconf/Bonjour/ + Rendezvous/WhateverItIsNamedToday has been renamed: + + - `--with-rendezvous` -> `--with-zeroconf` + +Differences to version 0.8.x + +- The maximum length of passwords has been raised to 20 characters (instead + of 8 characters). If your passwords are longer than 8 characters then they + are cut at an other position now. + +Differences to version 0.6.x + +- Some options of the configure script have been renamed: + + - `--disable-syslog` -> `--without-syslog` + - `--disable-zlib` -> `--without-zlib` + + Please call `./configure --help` to review the full list of options! + +Differences to version 0.5.x + +- Starting with version 0.6.0, other servers are identified using asynchronous + passwords: therefore the variable *Password* in *[Server]*-sections has been + replaced by *MyPassword* and *PeerPassword*. + +- New configuration variables, section *[Global]*: *MaxConnections*, *MaxJoins* + (see example configuration file `doc/sample-ngircd.conf`!). + +## Standard Installation + +*Note*: This sections describes installing ngIRCd *from sources*. If you use +packages available for your operating system distribution you should skip over +and continue with the *Configuration* section, see below. + +ngIRCd is developed for UNIX-based systems, which means that the installation +on modern UNIX-like systems that are supported by GNU autoconf and GNU +automake ("`configure` script") should be no problem. + +The normal installation procedure after getting (and expanding) the source +files (using a distribution archive or Git) is as following: + +1) Satisfy prerequisites +2) `./autogen.sh` [only necessary when using "raw" sources with Git] +3) `./configure` +4) `make` +5) `make install` + +(Please see details below!) + +Now the newly compiled executable "ngircd" is installed in its standard +location, `/usr/local/sbin/`. + +If no previous version of the configuration file exists (the standard name +is `/usr/local/etc/ngircd.conf)`, a sample configuration file containing all +possible options will be installed there. You'll find its template in the +`doc/` directory: `sample-ngircd.conf`. + +The next step is to configure and afterwards start the daemon. See the section +*Configuration* below. + +### Satisfy prerequisites + +When building from source, you'll need some other software to build ngIRCd: +for example a working C compiler, make tool, and a few libraries depending on +the feature set you want to enable at compile time (like IDENT, SSL, and PAM). + +And if you aren't using a distribution archive ("tar.gz" file), but cloned the +plain source archive, you need a few additional tools to generate the build +system itself: GNU automake and autoconf, as well as pkg-config. + +If you are using one of the "big" operating systems or Linux distributions, +you can use the following commands to install all the required packages to +build the sources including all optional features and to run the test suite: + +#### Red Hat / Fedora based distributions + +``` shell + yum install \ + autoconf automake expect gcc glibc-devel gnutls-devel \ + libident-devel make pam-devel pkg-config tcp_wrappers-devel \ + 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 + apt-get install \ + autoconf automake build-essential expect libgnutls28-dev \ + libident-dev libpam-dev pkg-config libwrap0-dev libz-dev telnet +``` + +#### ArchLinux based distributions + +``` shell + pacman -S --needed \ + autoconf automake expect gcc gnutls inetutils libident libwrap \ + 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` +script itself isn't already generated and available. This never happens in +official ("stable") releases in "tar.gz" archives, but when cloning the source +code repository using Git. + +**This step is therefore only interesting for developers!** + +The `autogen.sh` script produces the `Makefile.in`'s, which are necessary for +the configure script itself, and some more files for `make(1)`. + +To run `autogen.sh` you'll need GNU autoconf, GNU automake and pkg-config: at +least autoconf 2.61 and automake 1.10 are required, newer is better. But don't +use automake 1.12 or newer for creating distribution archives: it will work +but lack "de-ANSI-fication" support in the generated Makefile's! Stick with +automake 1.11.x for this purpose ... + +So *automake 1.11.x* and *autoconf 2.67+* is recommended. + +Again: "end users" do not need this step and neither need GNU autoconf nor GNU +automake at all! + +### `./configure` + +The `configure` script is used to detect local system dependencies. + +In the perfect case, `configure` should recognize all needed libraries, header +files and so on. If this shouldn't work, `./configure --help` shows all +possible options. + +In addition, you can pass some command line options to `configure` to enable +and/or disable some features of ngIRCd. All these options are shown using +`./configure --help`, too. + +Compiling a static binary will avoid you the hassle of feeding a chroot dir +(if you want use the chroot feature). Just do something like: + +``` shell + CFLAGS=-static ./configure [--your-options ...] +``` + +Then you can use a void directory as ChrootDir (like OpenSSH's `/var/empty`). + +### `make` + +The `make(1)` command uses the `Makefile`'s produced by `configure` and +compiles the ngIRCd daemon. + +### `make install` + +Use `make install` to install the server and a sample configuration file on +the local system. Normally, root privileges are necessary to complete this +step. If there is already an older configuration file present, it won't be +overwritten. + +These files and folders will be installed by default: + +- `/usr/local/sbin/ngircd`: executable server +- `/usr/local/etc/ngircd.conf`: sample configuration (if not already present) +- `/usr/local/share/doc/ngircd/`: documentation +- `/usr/local/share/man/`: manual pages + +### Additional features + +The following optional features can be compiled into the daemon by passing +options to the `configure` script. Most options can handle a `<path>` argument +which will be used to search for the required libraries and header files in +the given paths (`<path>/lib/...`, `<path>/include/...`) in addition to the +standard locations. + +- Syslog Logging (autodetected by default): + + `--with-syslog[=<path>]` / `--without-syslog` + + Enable (disable) support for logging to "syslog", which should be + available on most modern UNIX-like operating systems by default. + +- ZLib Compression (autodetected by default): + + `--with-zlib[=<path>]` / `--without-zlib` + + Enable (disable) support for compressed server-server links. + The Z compression library ("libz") is required for this option. + +- IO Backend (autodetected by default): + + - `--with-select[=<path>]` / `--without-select` + - `--with-poll[=<path>]` / `--without-poll` + - `--with-devpoll[=<path>]` / `--without-devpoll` + - `--with-epoll[=<path>]` / `--without-epoll` + - `--with-kqueue[=<path>]` / `--without-kqueue` + + ngIRCd can use different IO "backends": the "old school" `select(2)` and + `poll(2)` API which should be supported by most UNIX-like operating systems, + or the more efficient and flexible `epoll(7)` (Linux >=2.6), `kqueue(2)` + (BSD) and `/dev/poll` APIs. + + By default the IO backend is autodetected, but you can use `--without-xxx` + to disable a more enhanced API. + + When using the `epoll(7)` API, support for `select(2)` is compiled in as + well by default, to enable the binary to run on older Linux kernels (<2.6), + too. + +- IDENT-Support: + + `--with-ident[=<path>]` + + Include support for IDENT ("AUTH") lookups. The "ident" library is + required for this option. + +- TCP-Wrappers: + + `--with-tcp-wrappers[=<path>]` + + Include support for Wietse Venemas "TCP Wrappers" to limit client access + to the daemon, for example by using `/etc/hosts.{allow|deny}`. + The "libwrap" is required for this option. + +- PAM: + + `--with-pam[=<path>]` + + Enable support for PAM, the Pluggable Authentication Modules library. + See `doc/PAM.txt` for details. + +- SSL: + + - `--with-openssl[=<path>]` + - `--with-gnutls[=<path>]` + + Enable support for SSL/TLS using OpenSSL or GnuTLS libraries. + See `doc/SSL.md` for details. + +- IPv6 (autodetected by default): + + `--enable-ipv6` / `--disable-ipv6` + + Enable (disable) support for version 6 of the Internet Protocol, which should + be available on most modern UNIX-like operating systems by default. diff --git a/deprecated-ngircd/Makefile.am b/deprecated-ngircd/Makefile.am new file mode 100644 index 0000000..aa491a9 --- /dev/null +++ b/deprecated-ngircd/Makefile.am @@ -0,0 +1,48 @@ +# +# ngIRCd -- The Next Generation IRC Daemon +# 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 +# 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 = doc src man contrib + +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: + rm -rf autom4te.cache + rm -f Makefile.in Makefile aclocal.m4 configure configure.ac + rm -f ar-lib mkinstalldirs missing depcomp install-sh + rm -f config.log debian + +testsuite: + ${MAKE} -C src/testsuite check + +srcdoc: + ${MAKE} -C doc/src srcdoc + +rpm: distcheck + rpmbuild -ta ngircd-$(VERSION).tar.gz + +deb: + [ -f debian/rules ] || ln -s contrib/Debian debian + dpkg-buildpackage --build=binary + +.PHONY: deb rpm srcdoc testsuite + +# -eof- diff --git a/deprecated-ngircd/NEWS b/deprecated-ngircd/NEWS new file mode 100644 index 0000000..f0c852b --- /dev/null +++ b/deprecated-ngircd/NEWS @@ -0,0 +1,1104 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (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 (2024-04-26) + + - Add an example filter file for "Fail2Ban": contrib/ngircd-fail2ban.conf. + + 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. + +ngIRCd 26 (2020-06-20) + + ngIRCd 26~rc2 (2020-06-11) + - Add AppStream metadata file (contrib/de.barton.ngircd.metainfo.xml). + - Various bug fixes, see the ChangeLog. No new or changed functionality. + + ngIRCd 26~rc1 (2020-05-10) + - Allow up to 512 characters per line in MOTD and help text files (but keep + in mind that lines can't get that long, because they have to be prefixed + before being sent to the client). But this allows for more fancy MOTDs :-) + Closes #271. + - Show the actually allowed channel types in the ISUPPORT(005) numeric which + are configured by the "AllowedChannelTypes" configuration variable. + Closes #273. + - Handle commands in the read buffer before reading more data and don't wait + for the network in this case: If there are more bytes in the read buffer + already than a single valid IRC command can get long (513 bytes), wait for + this/those command(s) to be handled first and don't try to read even more + data from the network (which most probably would overflow the read buffer + of this connection soon). + - Log G-/K-Line changes only when not initiated by a server: this prevents + the log from becoming spammed during "net bursts". + - Update test suite to include SSL tests, including checking for reloading + certificates during runtime. + - Add support for GnuTLS certificate reload, which is quite handy when using + Let's Encrypt, for example. Until now this was only supported when linked + with OpenSSL. Thanks a lot, Hilko Bengen <bengen@hilluzination.de>! + - Allow setting arbitrary channel modes in the configuration file by handling + them like in MODE commands, and allow multiple "Modes =" lines per [Channel] + section. Thanks to Michi <michi+ngircd@dataswamp.org>! + Closes #55. + - Add "FNC" (forced nick changes) to ISUPPORT(005) numeric. Most probably + this doesn't make any difference to any client, but it seems correct. + See <http://www.irc.org/tech_docs/005.html> for details. + - Enhance handling of command line errors, and return with exit code 0 ("no + error") when "--help" or "--version" is used (which resulted in exit code 1, + "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 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: + ngircd -f $PWD/doc/sample-ngircd.conf -np | ./contrib/nglog.sh + - Enlarge buffers of info texts to 128 bytes. This includes: + - "Real name" of a client (4th filed of the USER command). + - Server info text ("Info" configuration option). + - Admin info texts and email address ("AdminInfo1", "AdminInfo2" and + "AdminEmail" configuration options). + - Network name ("Network" configuration option). + The limit was 64 bytes before ... + Closes #258. + - Streamline handling of invalid and unset server name: Don't exit during + runtime (REHASH command, HUP signal), because the server name can't be + changed in this case anyway and the new invalid name will be ignored. + - Slightly reorder startup steps, and enhance logging: + - Show name of configuration file at the beginning of start up. + - Add a message when ngIRCd is ready, including its host name. + - Show name of configuration file on REHASH (SIGHUP), too. + - Change level of "done message" to NOTICE, like "starting" & "ready". + - Initialize IO functions before channels, connections, clients, ... + - configure.ng: OpenSSL can depends on lz or latomic so use pkg-config to + find those dependencies and fallback to existing mechanism. + Closes #256. + +ngIRCd 25 (2019-01-23) + + - Implement new configuration option "MaxPenaltyTime", which configures the + maximum penalty time increase in seconds, per penalty event. Set to -1 for + no limit (the default), 0 to disable penalties altogether. ngIRCd doesn't + use penalty increases higher than 2 seconds during normal operation, so + values higher than 1 rarely make sense. + Disabling (or reducing) penalties can greatly speed up "make check" runs + for example, see below, but are mostly a debugging feature and normally + not meant to be used on production systems! + Some example timings running "make check" from my macOS workstation: + - MaxPenaltyTime not set: 4:41,79s + - "MaxPenaltyTime = 1": 3:14,71s + - "MaxPenaltyTime = 0": 25,46s + Closes #249 and #251. + - Update Xcode project for latest Xcode version (10.0) + - Allow a 5th parameter in WEBIRC. Thanks to "ItsOnlyBinary". + Closes #247. + + ngIRCd 25~rc1 (2018-08-11) + - Only send TOPIC updates to a channel when the topic actually changed: + This prevents the channel from becoming flooded by unnecessary TOPIC update + messages, that can happen when IRC services try to enforce a certain topic + but which is already set (at least on the local server), for example. + Therefore still forward it to all servers, but don't inform local clients + (still update setter and timestamp information, though!). + - Update Xcode project for latest Xcode version (9.2). This includes adding + missing and deleting obsolete file references. + - Handle user mode "C" ("Only users that share a channel are allowed to send + messages") like user mode "b" ("block private messages and notices"): allow + messages from servers, services, and IRC Operators, too. Change proposed by + "wowaname" back in 2015 in #ngircd, thanks! + - Allow IRC Ops and remote servers to KILL service clients: such clients + behave like regular users, therefore IRC operators and servers should be + able to KILL them: for example to resolve nick collisions. + Closes #242. + +ngIRCd 24 (2017-01-20) + + ngIRCd 24~rc1 (2017-01-07) + - Log privilege violations and failed OPER request with log level "error" + and send it to the "&SERVER" channel, too. + - Immediately shut down connection when receiving an "ERROR" command, + don't wait for the peer to close the connection. This allows the daemon + to forward the received "ERROR" message in the network, instead of the + very generic "client closed connection" message. + - Explicitly forbid remote servers to modify "x-lines" (G-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 handshake in this case (what wouldn't be + possible during regular runtime when a remote IRC Op sends the command) + and what can't be undone by IRC Ops later on (because of the missing + "AllowRemoteOper" option) ... + - Update Xcode project for latest Xcode version (8.0), and fix "duplicate + symbols" error messages when building (linking) the binary. + - Add "Documentation" variables to systemd configuration files. + - Make sure that SYSCONFDIR is always set, which can be handy when + using source code linters when ./configure hasn't been run already. + - Add the new "PAMServiceName" configuration option to specify the name + used as PAM service name. This setting allows to run multiple ngIRCd + instances with different PAM configurations for each instance. + Thanks to Christian Aistleitner <christian@quelltextlich.at> for the + patch, closes #226. + - Add an ".editorconfig" file to the project. + - Limit the number of message target, and suppress duplicates: This + prevents an user from flooding the server using commands like this: + "PRIVMSG nick1,nick1,nick1,...". + Duplicate targets are suppressed silently (channels and clients). + In addition, the maximum number of targets per PRIVMSG, NOTICE, ... + command are limited to MAX_HNDL_TARGETS (25). If there are more, the + daemon sends the new 407 (ERR_TOOMANYTARGETS_MSG) numeric, containing + the first target that hasn't been handled any more. Closes #187. + - Make contrib/platformtest.sh script more portable, and only show + "runs=Y" when the test suite really has been passed successfully. + +ngIRCd 23 (2015-11-16) + + ngIRCd 23~rc1 (2015-09-06) + - Use "NOTICE *" before registration instead of "NOTICE AUTH". "AUTH" is + a valid nickname so sending notices to it is probably not a good idea. + Use "*" as the target instead as done with numerics when the nick is not + available. This mimics the behavior in Charybdis, IRCD-Hybrid, InspIRCd + 2.2, Plexus 4, etc. Closes #217. + The "NoticeAuth" configuration variable (ngircd.conf) has been renamed + to "NoticeBeforeRegistration" accordingly, but the old name is still + supported for compatibility reasons. + - Implement new channel mode "N" (regular users can't change their nick + name while on this channel). Closes #214. + - Keep track of who placed bans, invites, and excepts. + Idea and implementation by LucentW, Thanks! Closes #203. + - Implement numeric RPL_LISTSTART(321). lightIRC and other clients + expecting RPL_LISTSTART should now behave correctly. + Idea and implementation by LucentW, Thanks! Closes #207. + - Streamline the effect of "MorePrivacy" option: Update documentation + in ngircd.conf(5); don't hide channels for IRC Ops on LIST and don't + hide IP addresses/hostnames on WHOIS when "MorePrivacy" is in effect. + This closes #198. + - IRC operators now can kick anyone when "OperCanMode" is set. + Idea and implementation by LucentW, Thanks! Closes #202. + - Implement user mode "I": Hide channels on WHOIS: this mode prevents + ngIRCd from showing channels on WHOIS (IRC Operators can always see + the channel list). + Idea and implementation by LucentW, Thanks! Closes #197. + - INVITE command: Implement ERR_USERNOTONSERV(504) numeric and make sure + that the target user is on the same server when inviting other users + to local ("&") channels. + Idea by Cahata, thanks! Closes #183. + - MODE command: Always report channel creation time. Up to now when + receiving a MODE command, ngIRCd only reported the channel creation + time to clients that were members of the channel. This patch reports + the channel creation time to all clients, regardless if they are joined + to that channel or not. At least ircd-seven behaves like this. + This closes #188. Reported by Cahata, thanks! + +ngIRCd 22.1 (2015-04-06) + + - Update "CipherList" to not enable SSLv3 by default. Idea, initial patch, + and testing by Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de>. + - Change ngIRCd test suite not to use DNS lookups: Different operating + systems do behave quite differently when doing DNS lookups, for example + "127.0.0.1" sometimes resolves to "localhost" and sometimes to + "localhost.localdomain" (for example OpenBSD). And other OS resolve + "localhost" to the real host name (for example Cygwin). So not using + DNS at all makes the test site much more portable. + +ngIRCd 22 (2014-10-11) + + - Match all list patterns case-insensitive: this affects the invite-, + ban-, and except lists, as well as G-Lines an K-Lines. + Problem pointed out by "wowaname" on #ngircd, thanks! + + ngIRCd 22~rc1 (2014-09-29) + - Sync "except lists" between servers: Up to now, ban, invite, and G-Line + lists have been synced between servers while linking -- but obviously + nobody noticed that except list have been missing ever since. Until now. + Thanks to "j4jackj", who reported this issue in #ngircd. + - Allow longer user names (up to 63 characters) for authentication. + - Increase MAX_SERVERS from 16 to 64: There are installations out there + that would like to configure more than 16 links per server, so increase + this limit. Best would be to get rid of MAX_SERVERS altogether and make + if fully dynamic, but start with this quick and dirty hack ... + - Test suite/platformtest.sh: Detect when tests have been skipped. + - Allow "DefaultUserModes" to set all possible modes, including modes only + settable by IRC Operators. + - Implement user mode "F": "relaxed flood protection". Clients with mode + "F" set are allowed to rapidly send data to the daemon. This mode is only + settable by IRC Operators and can cause problems in the network -- so be + careful and only set it on "trusted" clients! + User mode "F" is used by Bahamut for this purpose, for example. + - Use server password when PAM is compiled in but disabled. + - Streamline punctuation of log messages. + - Return ISUPPORT(005) numerics on "VERSION". This is how ircd-seven, + Charybdis, Hybrid, and InspIRCd behave, for example. + - configure: Only link "contrib/Debian" if it exists, which isn't the case + on "VPATH builds", for example. + - Show the account name in WHOIS. This uses the same numeric as Charybdis + and ircu families: WHOISLOGGEDIN(330). + - Pattern matching: Remove "range matching" in our pattern matching code + using the "[...]" syntax, because [ and ] are valid characters in nick + names and one has to quote them currently using the "\" character, which + is quite unexpected for users. + - platformtest.sh: New option "-x", don't regenerate build system and + allow using separate source and build trees. + - Test suite: explicitly enable glibc memory checking. + - Make "MODE -k" handling more robust and compatible, send "fake '*' key" + in all replies. + - portabtest: Actually test the functions snprintf(), strlcpy(), strlcat(), + and vsnprintf() for correctness, not only existence (which was quite + useless, because if they weren't available, the program could not have + been linked at all ...). + - Implement new configuration option "Network": it is used to set the + (completely optional) "network name", to which this instance of the + daemon belongs. When set, this name is used in the ISUPPORT(005) numeric + which is sent to all clients connecting to the server after logging in. + - Update doc/Platforms.txt. + - Various code cleanups, remove unused code, streamline error handling. + Remove all imp.h and exp.h header files, support non-standard vsnprintf() + return codes, and fix some K&R C portability issues. Streamline + DEBUG_ARRAY, DEBUG_BUFFER, DEBUG_IO, DEBUG_ZIP definitions. + - Increase penalty time to 10 seconds when handling OPER commands with an + invalid password. + +ngIRCd 21.1 (2014-03-25) + + - Don't ignore but use the server password when PAM is compiled in but + disabled. Thanks to Roy Sindre Norangshol <roy.sindre@norangshol.no>! + - doc/Platforms.txt: Update from master branch. + - doc/Services.txt: Update information for Anope 2.x. + - configure: add support for the LDFLAGS_END and LIBS_END variables to add + linker flags and libraries at the end of the configure run (CFLAGS_END has + been implemented already). + - Update Copyright notices for 2014 :-) + +ngIRCd 21 (2013-10-30) + + - Call arc4random_stir() in forked subprocesses, when available. This + is required by FreeBSD <10 and current NetBSD at least to correctly + initialize the "arc4" random number generator on these platforms. + + ngIRCd 21~rc2 (2013-10-20) + - Report the correct configuration file name on configuration errors, + support longer configuration lines, and warn when lines are truncated. + + ngIRCd 21~rc1 (2013-10-05) + - Actually KILL clients on GLINE/KLINE. (Closes bug #156) + - Add support to show all user links using the "STATS L" (uppercase) + command (restricted to IRC Operators). + - Implement configurable SSL cipher list selection for GnuTLS and OpenSSL + using the new configuration option "CipherList". In addition, this + changes the defaults to more secure values: "HIGH:!aNULL:@STRENGTH" for + OpenSSL, and "SECURE128" for GnuTLS. + - Show connection flag "s" (SSL) in RPL_TRACE{LINK|SERVER} messages: now + you can check if a server-to-server link is SSL-encrypted or not using + the IRC "TRACE" command. + - Implement the new configuration option "DefaultUserModes" which lists + user modes that become automatically set on new local clients right + after login. Please note that only modes can be set that the client + could set on itself, so you can't set "a" (away) or "o" (IRC Op), + for example! User modes "i" (invisible) or "x" (cloaked) etc. are + "interesting", though. (Closes bug #160) + - Add support for the new METADATA "account" property, which allows + services to automatically identify users after netsplits and across + service restarts. + - Implement a new configuration option "AllowedChannelTypes" that lists + all allowed channel types (channel prefixes) for newly created channels + on the local server. By default, all supported channel types are allowed. + If set to the empty string, local clients can't create new channels at + all, which equals the old "PredefChannelsOnly = yes" setting. + This change deprecates the "PredefChannelsOnly" variable, too, but it is + still supported and translated to the appropriate "AllowedChannelTypes" + setting. When the old "PredefChannelsOnly" variable is processed, a + warning message is logged. (Closes bug #152) + - Add support for "client certificate fingerprinting". When a client + passes an SSL certificate to the server, the "fingerprint" will be + forwarded in the network which enables IRC services to identify the + user using this certificate and not using passwords. + - Implement a new configuration option "IncludeDir" in the "[Options]" + section that can be used to specify a directory which can contain + further configuration files and configuration file snippets matching + the pattern "*.conf". These files are read in after the main server + configuration file ("ngircd.conf" by default) has been read in and + parsed. The default is "$SYSCONFDIR/ngircd.conf.d", so that it is + possible to adjust the configuration only by placing additional files + into this directory. (Closes bug #157) + - Add Travis-CI configuration file (".travis.yml") to project. + - ngIRCd now accepts user names including "@" characters, saves the + unmodified name for authentication but stores only the part in front + of the "@" character as "IRC user name". And the latter is how + ircd2.11, Bahamut, and irc-seven behave as well. (Closes bug #155) + - Lots of IRC "information functions" like ADMIN, INFO, ... now accept + server masks and names of connected users (in addition to server names) + for specifying the target server of the command. (Closes bug #153) + - Implement a new configuration option "IdleTimeout" in the "[Limits]" + section of the configuration file which can be used to set a timeout + in seconds after which the whole daemon will shutdown when no more + connections are left active after handling at least one client. + The default is 0, "never". + This can be useful for testing or when ngIRCd is started using "socket + activation" with systemd(8), for example. + - Implement support for systemd(8) "socket activation". + - Enable WHOIS to display information about IRC Services using the new + numeric 310(RPL_WHOISSERVICE) This numeric is used for this purpose by + InspIRCd, for example -- but as usual, other numerics are in use, too, + like 613 in UltimateIRCd ... + Please note that neither the Operator (+o) not the "bot status" (+B) + of an IRC service is displayed in the output. + - Update systemd(8) example configuration files in ./contrib/ directory: + the "ngircd.service" file now uses the "forking" service type which + enhances the log messages shown by "systemctl status ngircd.service", + and the new "ngircd.socket" file configures a systemd socket that + configures a socket for ngIRCd and launches the daemon on demand. + - Enhance help system and the HELP command: now a "help text file" can be + set using the new configuration option "HelpFile" ("global" section), + which is read in and parsed on server startup and configuration reload, + and then is used to output individual help texts to specific topics. + Please see the file ./doc/Commands.txt for details. + +ngIRCd 20.3 (2013-08-23) + + - This release is a bugfix release only, without new features. + - Security: Fix a denial of service bug (server crash) which could happen + when the configuration option "NoticeAuth" is enabled (which is NOT the + default) and ngIRCd failed to send the "notice auth" messages to new + clients connecting to the server (CVE-2013-5580). + +ngIRCd 20.2 (2013-02-15) + + - This release is a bugfix release only, without new features. + - Security: Fix a denial of service bug in the function handling KICK + commands that could be used by arbitrary users to crash the daemon + (CVE-2013-1747). + +ngIRCd 20.1 (2013-01-02) + + - This release is a bugfix release only, without new features. + +ngIRCd 20 (2012-12-17) + + - Allow user names ("INDENT") up to 20 characters when ngIRCd has not + been configured for "strict RFC mode". This is useful if you are using + external (PAM) authentication mechanisms that require longer user names. + Patch suggested by Brett Smith <brett@w3.org>, see + <http://arthur.barton.de/pipermail/ngircd-ml/2012-October/000579.html>. + + ngIRCd 20~rc2 (2012-12-02) + - Rework cloaked hostname handling and implement the "METADATA cloakhost" + subcommand: Now ngIRCd uses two fields internally, one to store the + "real" hostname and one to save the "cloaked" hostname. This allows + "foreign servers" (aka "IRC services") to alter the real and cloaked + hostnames of clients without problems, even when the user itself issues + additional "MODE +x" and "MODE -x" commands. + + ngIRCd 20~rc1 (2012-11-11) + - Update doc/Services.txt: describe the upcoming version of Anope 1.9.8, + then including a protocol module for ngIRCd. And remove our own patches + in ./contrib/Anope because they aren't supported any more ... + - Implement new "METADATA" command which can be used by remote servers + and IRC services to update client metadata like the client info text + ("real name"), user name, and hostname, and use this command to + configure an cloaked hostname (user mode "+x") on remote servers: + This prevents "double cloaking" of hostnames and even cloaked + hostnames are in sync on all servers supporting "METADATA" now. + - Implement new IRC "SVSNICK" command to allow remote servers (and IRC + services) to change nicknames of already registered users. The SVSNICK + command itself doesn't change the nickname, but it becomes forwarded + to the server to which the user is connected to. And then this server + initiates the real nickname changing using regular NICK commands. + This allows to run mixed networks with old servers not supporting the + SVSNICK command, because SVSNICK commands for nicknames on such servers + are silently ignored and don't cause a desynchronization of the network. + - New configuration option "MaxListSize" to configure the maximum number + of channels returned by a LIST command. The default is 100, as before. + - Implement user mode "b", "block messages": when a user has set mode "b", + all private messages and notices to this user are blocked if they don't + originate from a registered user, an IRC Op, server or service. The + originator gets an error numeric sent back in this case, + ERR_NONONREG_MSG (486), which is used by UnrealIRCd, too. (Closes #144) + - Implement channel mode "V" (invite disallow): If the new channel mode + "V" is set, the INVITE command becomes invalid and all clients get the + new ERR_NOINVITE_MSG (518) reply. (Closes #143) + - Implement channel mode "Q" and user mode "q": Both modes protect users + from channel kicks: only IRC operators and servers can kick users having + mode "q" or in channels with mode "Q". (Closes #141) + - Allow users to "cloak" their hostname only when the configuration + variable "CloakHostModeX" (introduced in 19.2) is set. Otherwise, only + IRC operators, other servers, and services are allowed to set the user + mode "+x": this prevents regular users from changing their hostmask to + the name of the IRC server itself, which confused quite a few people ;-) + (Closes #133) + - New configuration option "OperChanPAutoOp": If disabled, IRC operators + don't become channel operators in persistent channels when joining. + Enabled by default, which has been the behavior of ngIRCd up to this + patch. (Closes #135) + - Allow IRC operators to see secret (+s) channels in LIST command as long + as the "MorePrivacy" configuration option isn't enabled in the + configuration file. (Closes #136) + - Implement new (optional) IRC+ "CHARCONV" command to set a client + character set that the server translates all messages to/from UTF-8. + This feature requires the "libiconv" library and must be enabled using + the new "--with-iconv" option of the ./configure script. See + doc/Protocol.txt for details. (Closes #109) + - Implement user mode "B" ("Bot flag"): it is settable and unsettable by + every (non-restricted) client. This is how Unreal and InspIRCd do + behave, and so do we :-) + - Implement channel mode "M": Only the server, identified users and IRC + operators are able to talk in such a channel. + - Block nicknames that are reserved for services and are defined using the + configuration variable "ServiceMask" in "Server" blocks; And this + variable now can handle more than one mask separated by commas. + - Implemented XOP channel user modes: "Half Op" ("+h", prefix "%") can set + the channel modes +imntvIbek and kick all +v and normal users; "Admin" + ("+a", prefix "&") can set channel modes +imntvIbekoRsz and kick all +o, + +h, +v and normal users; and "Owner" ("+q", prefix "~") can set channel + modes +imntvIbekoRsz and kick all +a, +o, +h, +v and normal users. + - Implement hashed cloaked hostnames for both the "CloakHost" and + "CloakHostModeX" configuration options: now the admin can use the new + '%x' placeholder to insert a hashed version of the clients hostname, + and the new configuration option "CloakHostSalt" defines the salt for + the hash function. When "CloakHostSalt" is not set (the default), a + random salt will be generated after each server restart. + +ngIRCd 19.2 (2012-06-19) + + ngIRCd 19.2~rc1 (2012-06-13) + - New configuration option "CloakHostModeX" to configure the hostname + that gets used for IRC clients which have user mode "+x" enabled. + Up to now, the name of the IRC server itself has been used for this, + which still is the default when "CloakHostModeX" isn't set. + - Add instructions for setting up Atheme IRC services. + - Implement support for IRC capability handling, the new "CAP" command, + and capability "multi-prefix" which allows both the NAME and WHO command + handlers to return more than one "class prefix" to the client. + +ngIRCd 19.1 (2012-03-19) + + - Really include _all_ patches to build the Anope module into the + distribution archive ... ooops! + +ngIRCd 19 (2012-02-29) + + ngIRCd 19~rc1 (2012-02-12) + - Update preliminary ngIRCd protocol module for Anope 1.9.6, which now + is the only supported version. + - New numeric RPL_WHOISHOST_MSG(378), which returns the DNS host name + (if available) and the IP address of a client in the WHOIS reply. + Only the user itself and local IRC operators get this numeric. + - Implement channel exception list (mode 'e'). This allows a channel + operator to define exception masks that allow users to join the + channel even when a "ban" would match and prevent them from joining: + the exception list (e) overrides the ban list (b). + - Implement user mode 'C': If the target user of a PRIVMSG or NOTICE + command has the user mode 'C' set, it is required that both sender + and receiver are on the same channel. This prevents private flooding + by completely unknown clients. + - New RPL_WHOISREGNICK_MSG(307) numeric in WHOIS command replies: it + indicates if a nickname is registered (if user mode 'R' set). + - Limit channel invite, ban, and exception lists to 50 entries and fix + duplicate check and error messages when adding already listed entries + or deleting no (longer) existing ones. + - Limit the number of list items in the reply of LIST (100), WHO (25), + WHOIS (10), and WHOWAS (25) commands. + - Limit the MODE command to handle a maximum number of 5 channel modes + that require an argument (+Ibkl) per call and report this number + in the ISUPPORT(005) numeric: "MODES=5". + - LINKS command: support <mask> parameter to limit the reply. + - Add 1 second penalty for every further target on PRIVMSG/NOTICE + commands: this reduces the possibility of flooding channels with + commands like "PRIVMSG/NOTICE #a,#n,#c,... :message" a little bit. + Problem noticed by Cahata, thanks! + - New configuration option "PAMIsOptional": when set, clients not + sending a password are still allowed to connect: they won't become + "identified" and keep the "~" character prepended to their supplied + user name. See "man 5 ngircd.conf" for details. + - Fixed handling of WHO commands. This fixes two bugs: "WHO <nick>" + returned nothing at all if the user was "+i" (reported by Cahata, + thanks) and "WHO <nick|nickmask>" returned channel names instead + of "*" when the user was member of a (visible) channel. + - LUSERS reply: only count channels that are visible to the requesting + client, so the existence of secret channels is no longer revealed by + using LUSERS. Reported by Cahata, thanks! + - Unknown user and channel modes no longer stop the mode parser, but + are simply ignored. Therefore modes after the unknown one are now + handled. This is how ircd2.10/ircd2.11/ircd-seven behave, at least. + Reported by Cahata, thanks! + - Implement IRC commands "GLINE" and "KLINE" to ban users. G-Lines are + synchronized between server on peering, K-Lines are local only. + If you use "*!<user>@<host>" or "*!*@<host>" masks, these connections + are blocked even before the user is fully logged in (before PASS, + NICK, and USER commands have been processed) and before the child + processes for authentication are forked, so resource usage is smaller. + - Added doc/Modes.txt: document modes supported by ngIRCd. + - Implement user mode "R": indicates that the nickname of this user + is "registered". This mode isn't handled by ngIRCd itself, but must + be set and unset by IRC services like Anope. + - Implement channel mode "R": only registered users (having the user + mode "R" set) are allowed to join this channel. + - Test suite: bind to loopback (127.0.0.1) interface only. + - Handle unknown user and channel modes: these modes are saved and + forwarded to other servers, but ignored otherwise. + - Handle channel user modes 'a', 'h', and 'q' from remote servers. + These channel user modes aren't used for anything at the moment, + but ngIRCd knows that these three modes are "channel user modes" + and not "channel modes", that is that these modes take an "nickname" + argument. Like unknown user and channel modes, these modes are saved + and forwarded to other servers, but ignored otherwise. + +ngIRCd 18 (2011-07-10) + + - Add preliminary ngIRCd protocol module for Anope 1.9 to contrib/Anope/. + + ngIRCd 18~rc2 (2011-06-29) + - GnuTLS: use 1024 bits as minimum size of the DH prime. This enables + ngIRCd to accept incoming connections from other servers and clients + that "only" use at least 1024 bits again, like ngIRCd 17 did (and no + longer requires 2048 bits for incoming connections). + + ngIRCd 18~rc1 (2011-06-27) + - New configuration option "MorePrivacy" to "censor" some user information. + When enabled, signon time and idle time is left out. Part and quit + messages are made to look the same. WHOWAS requests are silently dropped. + All of this is useful if one wish to conceal users that access the ngircd + servers from TOR or I2P. + - New configuration option "ScrubCTCP" to scrub incoming CTCP commands. If + activated, the server silently drops incoming CTCP requests from both + other servers and from users. The server that scrubs CTCP will not forward + the CTCP requests to other servers in the network either, which can spell + trouble if not every oper knows about the CTCP-scrubbing. Scrubbing CTCP + commands also means that it is not possible to send files between users. + There is one exception to the CTCP scrubbing performed: ACTION ("/me + commands") requests are not scrubbed. + - Restructure ngIRCd configuration file: introduce new [Limits], [Options], + and [SSL] sections. The intention of this restructuring is to make the + [Global] section much cleaner, so that it only contains variables that + most installations must adjust to the local requirements. All the optional + variables are moved to [Limits], for configurable limits and timers of + ngIRCd, and [Options], for optional features. All SSL-related variables + are moved to [SSL] and the "SSL"-prefix is stripped. The old variables in + the [Global] section are deprecated now, but are still recognized. + => Don't forget to check your configuration, use "ngircd --configtest"! + - New documentation "how to contribute": doc/Contributing.txt. + - Avoid needlessly scary 'buffer overflow' messages: When the write buffer + space grows too large, ngIRCd has to disconnect the client to avoid + wasting too much memory, which is logged with a scary 'write buffer + overflow' message. Change this to a more descriptive wording. + - New configuration option "RequireAuthPing": PING-PONG on login. When + enabled, this configuration option lets ngIRCd send a PING with an numeric + "token" to clients logging in; and it will not become registered in the + network until the client responds with the correct PONG. + - New configuration option "NoticeAuth": send NOTICE AUTH on connect. When + active, ngircd will send "NOTICE AUTH" messages on client connect time + like e.g. snircd (QuakeNet) does. + - Add support for up to 3 targets in WHOIS queries, also allow up to one + wildcard query from local hosts. Follows ircd 2.10 implementation rather + than RFC 2812. At most 10 entries are returned per wildcard expansion. + - ngircd.conf(5) manual page: describe types of configuration variables + (booleans, text strings, integer numbers) and add type information to each + variable description. + - Terminate incoming connections on HTTP commands "GET" and "POST". + - New configuration option "CloakHost": when set, this host name is used for + every client instead of the real DNS host name (or IP address). + - New configuration option "CloakUserToNick": when enabled, ngIRCd sets + every clients' user name to their nickname and hides the user name + supplied by the IRC client. + - Make write buffers bigger, but flush early. Before this change, a client + got disconnected if the buffer flushing at 4k failed, now regular clients + can store up to 32k and servers up 64k even if flushing is not possible at + the moment. This enhances reliability on slow links. + - Allow "Port = 0" in [Server] blocks. Port number 0 marks remote servers + that try to connect to this daemon, but where this daemon never tries to + establish a connection on its own: only incoming connections are allowed. + - Enable WHOIS command to return information about services. + - Implement channel mode 'O': "IRC operators only". This channel mode is + used on DALnet (bahamut), for example. + - Remove support for ZeroConf/Bonjour/Rendezvous service registration + including the "[No]ZeroConf" configuration option. + - Deprecate NoXX-Options in ngircd.conf and move new variants into our new + [Options] section: 'NoDNS=no' => 'DNS=yes', 'NoIdent=no' => 'Ident=yes', + 'NoPAM=no' => 'PAM=yes', and 'NoZeroConf=no' => 'ZeroConf=yes' (and + vice-versa). The defaults are adjusted accordingly and the old variables + in [Global] are still accepted, so there is no functional change. + +ngIRCd 17.1 (2010-12-19) + + - Don't log critical (or worse) messages to stderr + - Remove "error file" when compiled with debug code enabled + - New numeric 329: get channel creation time on "MODE #chan" commands + +ngIRCd 17 (2010-11-07) + + - doc: change path names in sample-ngircd.conf depending on sysconfdir + + ngIRCd 17~rc2 (2010-10-25) + - Generate ngIRCd version number from GIT tag. + - Make source code compatible with ansi2knr again. This allows to compile + ngIRCd using a pre-ANSI K&R C compiler again. + + ngIRCd 17~rc1 (2010-10-11) + - New configuration option "NoZeroConf" to disable service registration at + runtime even if ngIRCd is compiled with support for ZeroConf (e.g. using + Howl, Avahi or on Mac OS X). + - New configuration option "SyslogFacility" to define the syslog "facility" + (the "target"), to which ngIRCd should send its log messages. + Possible values are system dependent, but most probably "auth", "daemon", + "user" and "local1" through "local7" are possible values; see syslog(3). + Default is "local5" for historical reasons. + - Dump the "internal server state" (configured servers, established + connections and known clients) to the console or syslog when receiving + the SIGUSR2 signal and debug mode is enabled. + - Enable the daemon to disable and enable "debug mode" on runtime using + signal SIGUSR1, when debug code is compiled in, not only on startup + using the command line parameters. + - Implement user mode "x": host name cloaking (closes: #102). + - Change MOTD file handling: ngIRCd now caches the contents of the MOTD + file, so the daemon now requires a HUP signal or REHASH command to + re-read the MOTD file when its content changed. + - Allow IRC ops to change channel modes even without OperServerMode set. + - Allow IRC operators to use MODE command on any channel (closes: #100). + - New configuration option "NoPAM" to disable PAM. + - Implement asynchronous user authentication using PAM, please see the + file doc/PAM.txt for details. + - Add some documentation for using BOPM with ngIRCd, see doc/Bopm.txt. + - Implement user mode "c": receive connect/disconnect NOTICEs. Note that + this new mode requires the user to be an IRC operator. + - Show SSL status in WHOIS output, numeric 275. + +ngIRCd 16 (2010-05-02) + + ngIRCd 16~rc2 (2010-04-25) + - Enhance connection statistics counters: display total number of served + connections on daemon shutdown and when a new client connects using + the new numeric RPL_STATSCONN (250). + + ngIRCd 16~rc1 (2010-03-25) + - Implement WEBIRC command used by some Web-IRC frontends. The password + required to secure this command must be configured using the new + "WebircPassword" variable in the ngircd.conf file. + - Remove limit on max number of configured irc operators. + - A new channel mode "secure connections only" (+z) has been implemented: + Only clients using a SSL encrypted connection to the server are allowed + to join such a channel. + But please note three things: a) already joined clients are not checked + when setting this mode, b) IRC operators are always allowed to join + every channel, and c) remote clients using a server not supporting this + mode are not checked either and therefore always allowed to join. + +ngIRCd 15 (2009-11-07) + + ngIRCd 15~rc1 (2009-10-15) + - Do not add default listening port (6667) if SSL ports were specified, so + ngIRCd can be configured to only accept SSL-encrypted connections now. + - Enable IRC operators to use the IRC command SQUIT (instead of the already + implemented but non-standard DISCONNECT command). + - New configuration option "AllowRemoteOper" (disabled by default) that + enables remote IRC operators to use the IRC commands SQUIT and CONNECT + on the local server. + - Enforce upper limit on maximum number of handled commands. This implements + a throttling scheme: an IRC client can send up to 3 commands or 256 bytes + per second before a one second pause is enforced. + +ngIRCd 14.1 (2009-05-05) + + - Security: fix remotely triggerable crash in SSL/TLS code. + - Debian: build ngircd-full-dbg package. + - Allow ping timeout quit messages to show the timeout value. + +ngIRCd 14 (2009-04-20) + + ngIRCd 14~rc1 (2009-03-29) + - Allow creation of persistent modeless channels. + - The INFO command reports the compile time now (if available). + - Support individual channel keys for pre-defined channels: introduce + new configuration variable "KeyFile" in [Channel] sections in ngircd.conf, + here a file can be configured for each pre-defined channel which contains + individual channel keys for different users. + - Remove limit on maximum number of predefined channels in ngircd.conf. + +ngIRCd 13 (2008-12-25) + + ngIRCd 13~rc1 (2008-11-21): + - New version number scheme :-) + - Initial support for IRC services, using a RFC1459 style interface, + tested with IRCServices (http://www.ircservices.za.net/) version 5.1.13. + For this to work, ngIRCd now supports server-server links conforming + to RFC 1459. New ngircd.conf(5) option: ServiceMask. + - Support for SSL-encrypted server-server and client-server links using + OpenSSL (configure: --with-openssl) or GNUTLS (configure: --with-gnutls). + New ngircd.conf(5) options: SSLPorts, SSLKeyFile, SSLKeyFilePassword, + SSLCertFile, SSLDHFile, and SSLConnect. + - Server local channels have been implemented, prefix "&", that are only + visible to users of the same server and are not visible in the network. + In addition ngIRCd creates a "special" channel &SERVER on startup and logs + all the messages to it that a user with mode +s receives. + - New make target "osxpkg" to build a Mac OS X installer package. + - New configuration option "NoIdent" to disable IDENT lookups even if the + daemon is compiled with IDENT support. + +ngIRCd 0.12.1 (2008-07-09) + + - Add option aliases -V (for --version) and -h (for --help). + - Make Listen parameter a comma-separated list of addresses. This also + obsoletes ListenIPv4 and ListenIPv6 options. If Listen is unset, it + is treated as Listen="::,0.0.0.0". + Note: ListenIPv4 and ListenIPv6 options are still recognized, + but ngircd will print a warning if they are used in the config file. + +ngIRCd 0.12.0 (2008-05-13) + + ngIRCd 0.12.0-pre2 (2008-04-29) + - IPv6: Add config options to disable ipv4/ipv6 support. + + ngIRCd 0.12.0-pre1 (2008-04-20) + - Add IPv6 support. + - Install a LaunchDaemon script to start/stop ngIRCd on Mac OS X. + - Implemented IRC commands INFO, SUMMON (dummy), and USERS (dummy) and + enhanced test suite to check these commands. (Dana Dahlstrom) + - IRC_WHO now supports search patterns and will test this against user + nickname/server name/host name, etc. as required by RFC 2812, Section 3.6.1. + (reported by Dana Dahlstrom) + - Implement RFC 2812 handling of "0" argument to 'JOIN': must be treated + as if the user had sent PART commands for all channels the user is a + member of. (Dana Dahlstrom) + - Allow NOTICEs to be sent to a channel. (Fabian Schlager) + +ngIRCd 0.11.0 (2008-01-15) + + - Add support for /STAT u (server uptime) command. + - New [Server] configuration Option "Bind" allows to specify + the source IP address to use when connecting to remote server. + - New configuration option "MaxNickLength" to specify the allowed maximum + length of user nicknames. Note: must be unique in an IRC network! + - Numeric 317: implemented "signon time" (displayed in WHOIS result). + - Added new server configuration option "Passive" for "Server" blocks to + disable automatic outgoing connections (similar to -p option to ngircd, + but only for the specified server). (Tassilo Schweyer) + - Added support for the WALLOPS command. Usage is restricted to IRC + operators. + +ngIRCd 0.10.2 (2007-06-08) + + - Predefined channel configuration now allows specification of channel key + (mode k) and maximum user count (mode l): variables "Key" and "MaxUsers". + - When using the epoll() IO interface, compile in the select() interface as + well and fall back to it when epoll() isn't available on runtime. + - Added support for IO APIs "poll()" and "/dev/poll". + +ngIRCd 0.10.1 (2006-12-17) + + - Allow PASS syntax defined in RFC 1459 for server links, too. + - New configuration option "PredefChannelsOnly": if set, clients can only + join predefined channels. + +ngIRCd 0.10.0 (2006-10-01) + + ngIRCd 0.10.0-pre1 (2006-08-02) + - Enhanced DIE to accept a single parameter ("comment text") which is sent + to all locally connected clients before the server goes down. + - JOIN now supports more than one channel key at a time. + - Implemented numeric "333": Time and user name who set a channel topic. + - Channel topics are no longer limited to 127 characters: now the only limit + is the maximum length of an IRC command, i. e. 512 bytes (in practice, this + limits the topic to about 490 characters due to protocol overhead). + - Reverse DNS lookup code now checks the result by doing an additional + lookup to prevent spoofing. + - Added new IO layer which (optionally) supports epoll() and kqueue() in + addition to the select() interface. + +ngIRCd 0.9.0 (2005-07-24) + + - Never run with root privileges but always switch the user ID. + - Make "netsplit" messages RFC compliant. + - Implemented the IRC function "WHOWAS". + - New configuration option "OperServerMode" to enable a workaround needed + when running an network with ircd2 servers and "OperCanUseMode" enabled + to prevent the ircd2 daemon to drop mode changes of IRC operators. + Patch by Florian Westphal, <westphal@foo.fh-furtwangen.de>. + - Implemented support for "secret channels" (channel mode "s"). + - New configuration option "Mask" for [Operator] sections to limit OPER + commands to users with a specific IRC mask. Patch from Florian Westphal. + - New configuration variable "PidFile", section "[Global]": if defined, + the server writes its process ID (PID) to this file. Default: off. + Idea of Florian Westphal, <westphal@foo.fh-furtwangen.de>. + - Added support for the Howl (http://www.porchdogsoft.com/products/howl/) + Rendezvous API, in addition to the API of Apple (Mac OS X). The available + API will be autodetected when you call "./configure --with-rendezvous". + +ngIRCd 0.8.0 (2004-06-26) + + - Two new configuration options: "ChrootDir" and "MotdPhrase", thanks to + Benjamin Pineau <ben@zouh.org>. Now you can force the daemon to change + its root and working directory to something "safe". MotdPhrase is used + to define an "MOTD string" instead of a whole file, useful if the + "real" MOTD file would be outside the "jail". + - INVITE- and BAN-lists become synchronized between IRC+ servers when + establishing new connections, if the peer supports this as well. + - The type of service (TOS) of all sockets is set to "interactive" now. + - Added short command line option "-t" as alternative to "--configtest". + - Added optional support for "IDENT" lookups on incoming connections. You + have to enable this function with the ./configure switch "--with-ident". + The default is not to do IDENT lookups. + +ngIRCd 0.7.5 (2003-07-11) + + - New configuration variable "MaxConnectionsIP" to limit the number of + simultaneous connections from a single IP that the server will accept. + This configuration options lowers the risk of denial of service attacks + (DoS), the default is 5 connections per client IP. + - Added new configuration variable "Listen" to bind all listening + sockets of the server to a single IP address. + +ngIRCd 0.7.1 (2003-07-18) + + - Added support for GNU/Hurd. + +ngIRCd 0.7.0 (2003-05-01) + + - New command CONNECT to enable and add server links. The syntax is not + RFC-compatible: use "CONNECT <name> <port>" to enable and connect an + configured server and "CONNECT <name> <port> <host> <mypwd> <peerpwd>" + to add a new server (ngIRCd tries to connect new servers only once!). + - Added DISCONNECT command ("DISCONNECT <name>") to disable servers. + - New command TRACE (you can trace only servers at the moment). + - New command HELP that lists all understood commands. + - ngIRCd can register itself with Rendezvous: to enable support pass the + new switch "--with-rendezvous" to configure. + - Added support for TCP Wrappers library: pass "--with-tcp-wrappers" to + configure to enable it. + - Changed some configure options to use "--with"/"--without" as prefix + instead of "--enable"/"--disable": "--without-syslog", "--without-zlib", + "--with-tcp-wrappers", and "--with-rendezvous". + - Enhanced manual pages ngircd(8) and ngircd.conf(5). + - Documentation is now installed in $(datadir)/doc/ngircd. + + +Older news (sorry, only available in German language): + +ngIRCd 0.6.0, 24.12.2002 + + - beim Schliessen einer Verbindung zeigt der Server nun vor dem ERROR + noch eine Statistik ueber die empfangene und gesendete Datenmenge an. + - Connection-Strukturen werden nun "pool-weise" verwaltet; der Pool wird + bei Bedarf bis zu einem konfigurierten Limit vergroessert. + - Mit der neuen Konfigurationsvariable "MaxConnections" (Sekion "Global") + kann die maximale Anzahl gleichzeitiger Verbindungen begrenzt werden. + Der Default ist -1, "unlimitiert". + - der Server erkennt nun, ob bereits eine eingehende Verbindung von einem + Peer-Server besteht und versucht dann nicht mehr, selber eine eigene + ausgehende Verbindung zu diesem auufzubauen. Dadurch kann nun auf beiden + Servern in der Konfiguration ein Port fuer den Connect konfiguriert + werden (beide Server versuchen sich dann gegenseitig zu connectieren). + - Server identifizieren sich nun mit asynchronen Passwoertern, d.h. das + Passwort, welches A an B schickt, kann ein anderes sein als das, welches + B als Antwort an A sendet. In der Konfig.-Datei, Abschnitt "Server", + wurde "Password" dazu durch "MyPassword" und "PeerPassword" ersetzt. + - Der Server kann nun zur Laufzeit die Konfiguration neu einlesen: dies + macht er nach dem Befehl REHASH oder wenn ein HUP-Signal empfangen wird. + - Server-Server-Links koennen nun komprimiert werden, dazu wird die zlib + (www.zlib.org) benoetigt. Unterstuetzt die Gegenseite die Komprimierung + nicht, wird automatisch unkomprimiert kommuniziert. Das Verfahren ist + kompatibel mit dem Original-ircd 2.10.3, d.h. beide Server koennen + miteinander ueber komprimiert Links kommunizieren. + - neue Konfigurations-Variable "MaxJoins": Hiermit kann die maximale Zahl + der Channels, in denen ein User Mitglied sein kann, begrent werden. + - neue Channel-Modes l (User-Limit) und k (Channel-Key) implementiert. + +ngIRCd 0.5.0, 20.09.2002 + + - AIX (3.2.5), HP-UX (10.20), IRIX (6.5), NetBSD (1.5.3/m68k) und Solaris + (2.5.1, 2.6) gehoeren nun auch zu den unterstuetzten Platformen. + - Unter A/UX (und evtl. weiteren Systemen) kompiliert der ngIRCd nun mit + dem "nativen" (ggf. pre-ANSI) Compiler. + - "persistente Channels" (Mode 'P') implementiert: diese koennen in der + Konfigurationsdatei definiert werden (Sektion "Channel", vgl. Beispiel- + Konfiguration "sample-ngircd.conf") und bleiben auch dann bestehen, + wenn kein User mehr im Channel ist. + - neue IRC-Befehle: KICK, INVITE, ADMIN, CHANINFO; LIST wurde erweitert. + Mit dem neuen Befehl CHANINFO synchronisieren Server, die das IRC+- + Protokoll unterstuetzen, Channel-Modes und Topics. Fuer den ADMIN-Befehl + gibt es neue Konfigurationsoptionen (Sektion "Global"): "AdminInfo1", + "AdminInfo2" und "AdminEMail". + - Invite- und Ban-Lists implementiert. + - neue Konfigurationsoption "OperCanUseMode" (Sektion "Global"): + ist sie aktiv, koennen IRC-Operatoren immer Channel-Modes setzen. + - "Test-Suite" begonnen: mit "make check" wird sie durchlaufen. + +ngIRCd 0.4.2, 29.04.2002 + + - IRC-Funktion LIST implementiert; bisher werden allerdings noch keine + Regular Expressions (bis auf "*") unterstuetzt. + +ngIRCd 0.4.0, 01.04.2002 + + - WHO implementiert (bisher ohne komplette Unterstuetzung von Masks). + - stderr wird nun in eine Datei umgelenkt (/ngircd-<PID>.err). + Laeuft der Server nicht im Debug-Modus, so wird diese bei Programm- + ende geloescht. Sollte der Server abstuerzen, finden sich hier evtl. + zusaetzliche Informationen. + - Server-Gruppen implementiert: es wird immer nur zu einem Server in + einer Gruppe eine Verbindung aufgebaut, klappt es beim ersten Server + nicht, so wird der naechste probiert. + - Clients und Channels werden nicht mehr ueber ihren Namen, sondern + einen Hash-Wert gesucht: sollte deutlich schneller sein. + - neuer Kommandozeilen-Parameter "--configtest": die Konfiguration wird + gelesen und die dann verwendeten Werte angezeigt. + - Client-Mode "s" (Server Notices) implementiert. + - mit dem neuen Kommandozeilen-Parameter "--config"/"-f" kann eine + alternative Konfigurationsdatei angegeben werden. + - nach dem Start kann der ngIRCd, wenn er mit root-Rechten laeuft, + zu einer anderen User-ID und Group-ID wechseln. + +ngIRCd 0.3.0, 02.03.2002 + + - bekommt der Server ein HUP-Signal, so startet er neu -- genau so, wie + er auf den IRC-Befehl RESTART reagiert. + - neuer Kommandozeilen-Schalter "--passive" (-p): wird er angegeben, so + verbindet sich der ngIRCd nicht mehr automatisch zu anderen Servern. + Zum Debuggen manchmal ganz praktisch :-) + - neue Befehle VERSION und KILL implementiert. NAMES korrigiert. + - Anpassungen an A/UX: gehoert nun auch zu den unterstuetzten Platformen. + - AWAY (und der User-Mode 'a') ist nun implementiert. + - der ngIRCd unterstuetzt nun Channel-Topics (TOPIC-Befehl). + - Channel- und Nicknames werden nun ordentlich validiert. + +ngIRCd 0.2.0, 15.02.2002 + + - Begonnen Channel-Modes und User-Channel-Modes zu implementieren: der + Server versteht an User-Modes o und v, beachtet letzteres allerdings + noch nirgends. Bekannte (aber nicht beachtete!) Channel-Modes sind + bisher a, m, n, p, q, s und t. Diese Modes werden von Usern ange- + nommen, von anderen Servern werden auch unbekannte Modes uebernommen. + - Nach dem Connect eines Users werden LUSERS-Informationen angezeigt. + +ngIRCd 0.1.0, 29.01.2002 + + - Channels implementiert, bisher jedoch noch ohne Channel-Modes, d.h. + es gibt keine Channel-Ops, kein Topic, kein "topic lock" etc. pp. + Chatten in Channels ist aber natuerlich moeglich ;-) + Dadurch zum Teil groessere Aenderungen an bisherigen Funktionen. + - neue Befehle fuer Channles: JOIN, PART und NJOIN. + - FAQ.txt in doc/ begonnen. + +ngIRCd 0.0.3, 16.01.2002 + + - Server-Links vollstaendig implementiert: der ngIRCd kann nun auch + "Sub-Server" haben, also sowohl als Leaf-Node als auch Hub in einem + IRC-Netzwerk arbeiten. + - WHOIS wird nun immer an den "Original-Server" weitergeleitet. + - Parser handhabt Leerzeichen zw. Parametern nun etwas "lockerer". + - Kommandozeilen-Parser: Debug- und No-Daemon-Modus, Hilfe. + - ngIRCd wandelt sich nun in einen Daemon (Hintergrundprozess) um. + - neue Befehle: LUSERS, LINKS. + +ngIRCd 0.0.2, 06.01.2002 + + - neuer Aufbau der Konfigurationsdatei, + - mehrere IRC-Operatoren koennen konfiguriert werden, + - Server-Links teilweise implementiert. Bisher kann der ngIRCd jedoch + nur "leafed server" sein, d.h. keine "Client-Server" haben. + +ngIRCd 0.0.1, 31.12.2001 + + - erste oeffentliche Version von ngIRCd als "public preview" :-) diff --git a/deprecated-ngircd/README.md b/deprecated-ngircd/README.md new file mode 100644 index 0000000..073fff4 --- /dev/null +++ b/deprecated-ngircd/README.md @@ -0,0 +1,101 @@ +# [ngIRCd](https://ngircd.barton.de) - Internet Relay Chat Server + +## Introduction + +*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]); please see the file `COPYING` for licensing +information. + +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 :-) + +## Status + +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` or corner-cases in the RFCs, but to implement most of the useful +commands and semantics that are used by existing clients. + +*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. +- 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. + +## Documentation + +The **homepage** of the ngIRCd project is <https://ngircd.barton.de>. + +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 + +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/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@lists.barton.de> + +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: + +- Bug tracker: <https://github.com/ngircd/ngircd/issues> +- Patches, "pull requests": <https://github.com/ngircd/ngircd/pulls> + +[IRC]: https://wikipedia.org/wiki/Internet_Relay_Chat +[GPL]: https://wikipedia.org/wiki/GNU_General_Public_License diff --git a/deprecated-ngircd/autogen.sh b/deprecated-ngircd/autogen.sh new file mode 100755 index 0000000..0cf9a0e --- /dev/null +++ b/deprecated-ngircd/autogen.sh @@ -0,0 +1,258 @@ +#!/bin/sh +# +# ngIRCd -- The Next Generation IRC Daemon +# 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 +# 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. +# +# Usage: +# [VAR=<value>] ./autogen.sh [<configure-args>] +# +# This script generates the ./configure script using GNU automake and +# GNU autoconf. It tries to be smart in finding the correct/usable/available +# installed versions of these tools on your system. +# +# In addition, it enables or disables the "de-ANSI-fication" support of GNU +# automake, which is supported up to autoconf 1.11.x an has been removed +# in automake 1.12 -- make sure to use a version of automake supporting it +# when generating distribution archives! +# +# The following strategy is used for each of aclocal, autoheader, automake, +# and autoconf: first, "tool" (the regular name of the tool, e. g. "autoconf" +# or "automake") is checked. If this fails, "tool<major><minor>" (for example +# "automake16") and "tool-<major>.<minor>" (e. g. "autoconf-2.54") are tried +# with <major> being 2 for tool of GNU autoconf and 1 for tools of automake; +# <minor> is tried from 99 to 0. The first occurrence will be used. +# +# When you pass <configure-args> to autogen.sh it will call the generated +# ./configure script on success and pass these parameters to it. +# +# You can tweak the behaviour using these environment variables: +# +# - ACLOCAL=<cmd>, AUTOHEADER=<cmd>, AUTOMAKE=<cmd>, AUTOCONF=<cmd> +# Name and optionally path to the particular tool. +# - PREFIX=<path> +# Search the GNU autoconf and GNU automake tools in <path> first. If the +# generated ./configure script will be called, pass "--prefix=<path>" to it. +# - EXIST=<tool> +# Use <tool> to test for aclocal, autoheader etc. pp. ... +# When not specified, either "type" or "which" is used. +# - VERBOSE=1 +# Output the detected names of the GNU automake and GNU autoconf tools. +# - GO=1 +# Call ./configure even if no arguments have been passed to autogen.sh. +# +# Examples: +# +# - ./autogen.sh +# Generates the ./configure script. +# - GO=1 ./autogen.sh +# Generates the ./configure script and runs it as "./configure". +# - VERBOSE=1 ./autogen.sh --with-ident +# Show tool names, generates the ./configure script, and runs it with +# these arguments: "./configure --with-ident". +# - ACLOCAL=aclocal-1.6 GO=1 PREFIX=$HOME ./autogen.sh +# Uses "aclocal-1.6" as aclocal tool, generates the ./configure script, +# 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() +{ + [ $# -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 + "${name}" --version 2>&1 \ + | grep -v "environment variable" >/dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "${name}" + return 0 + fi + fi + done + + while [ $minor -ge 0 ]; do + Check_Tool "$searchlist" "$major" "$minor" && return 0 + minor=$(expr $minor - 1) + done + return 1 +} + +Notfound() +{ + echo "Error: $* not found!" + echo 'Please install supported versions of GNU autoconf, GNU automake' + echo 'and pkg-config: see the INSTALL file for details.' + exit 1 +} + +Run() +{ + [ "$VERBOSE" = "1" ] && echo " - running \"$*\" ..." + "$@" +} + +# Reset locale settings to suppress warning messages of Perl +unset LC_ALL +unset LANG + +# Which command should be used to detect the automake/autoconf tools? +[ -z "$EXIST" ] && existlist="type which" || existlist="$EXIST" +EXIST="" +for t in $existlist; do + $t /bin/ls >/dev/null 2>&1 + if [ $? -eq 0 ]; then + rm -f /tmp/test.$$ + $t /tmp/test.$$ >/dev/null 2>&1 + [ $? -ne 0 ] && EXIST="$t" + fi + [ -n "$EXIST" ] && break +done +if [ -z "$EXIST" ]; then + echo "Didn't detect a working command to test for the autoconf/automake tools!" + echo "Searchlist: $existlist" + exit 1 +fi +[ "$VERBOSE" = "1" ] && echo "Using \"$EXIST\" to test for tools." + +# Try to detect the needed tools when no environment variable already +# specifies one: +echo "Searching for required tools ..." +[ -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 11) +[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE=$AUTOMAKE" +[ -z "$AUTOCONF" ] && AUTOCONF=$(Search autoconf 2) +[ "$VERBOSE" = "1" ] && echo " - AUTOCONF=$AUTOCONF" + +AUTOCONF_VERSION=$(echo "$AUTOCONF" | cut -d'-' -f2-) +[ -n "$AUTOCONF_VERSION" ] && [ "$AUTOCONF_VERSION" != "autoconf" ] \ + && export AUTOCONF_VERSION || unset AUTOCONF_VERSION +[ "$VERBOSE" = "1" ] && echo " - AUTOCONF_VERSION=$AUTOCONF_VERSION" +AUTOMAKE_VERSION=$(echo $AUTOMAKE | cut -d'-' -f2-) +[ -n "$AUTOMAKE_VERSION" ] && [ "$AUTOMAKE_VERSION" != "automake" ] \ + && export AUTOMAKE_VERSION || unset AUTOMAKE_VERSION +[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE_VERSION=$AUTOMAKE_VERSION" + +[ $# -gt 0 ] && CONFIGURE_ARGS=" $*" || CONFIGURE_ARGS="" +[ -z "$GO" ] && [ -n "$CONFIGURE_ARGS" ] && GO=1 + +# Verify that all tools have been found +command -v pkg-config >/dev/null || Notfound pkg-config +[ -z "$ACLOCAL" ] && Notfound aclocal +[ -z "$AUTOHEADER" ] && Notfound autoheader +[ -z "$AUTOMAKE" ] && Notfound automake +[ -z "$AUTOCONF" ] && Notfound autoconf + +AM_VERSION=$($AUTOMAKE --version | head -n 1 | sed -e 's/.* //g') +ifs=$IFS; IFS="."; set $AM_VERSION; IFS=$ifs +AM_MAJOR="$1"; AM_MINOR="$2" +echo "Detected automake $AM_VERSION ..." + +AM_MAKEFILES="src/ipaddr/Makefile.ng src/ngircd/Makefile.ng src/testsuite/Makefile.ng src/tool/Makefile.ng" + +# De-ANSI-fication? +if [ "$AM_MAJOR" -eq "1" ] && [ "$AM_MINOR" -lt "12" ]; then + # automake < 1.12 => automatic de-ANSI-fication support available + echo " - Enabling de-ANSI-fication support." + sed -e "s|^__ng_PROTOTYPES__|AM_C_PROTOTYPES|g" configure.ng >configure.ac + DEANSI_START="" + DEANSI_END="" +else + # automake >= 1.12 => no de-ANSI-fication support available + echo " - Disabling de-ANSI-fication support." + sed -e "s|^__ng_PROTOTYPES__|AC_C_PROTOTYPES|g" configure.ng >configure.ac + DEANSI_START="#" + DEANSI_END=" (disabled by ./autogen.sh script)" +fi +# Serial test harness? +if [ "$AM_MAJOR" -eq "1" ] && [ "$AM_MINOR" -ge "13" ]; then + # automake >= 1.13 => enforce "serial test harness" + echo " - Enforcing serial test harness." + SERIAL_TESTS="serial-tests" +else + # automake < 1.13 => no new test harness, nothing to do + # shellcheck disable=SC2034 + SERIAL_TEST="" +fi + +sed -e "s|^__ng_Makefile_am_template__|AUTOMAKE_OPTIONS = ${SERIAL_TESTS} ${DEANSI_START}ansi2knr${DEANSI_END}|g" \ + src/portab/Makefile.ng >src/portab/Makefile.am +for makefile_ng in $AM_MAKEFILES; do + makefile_am=$(echo "$makefile_ng" | sed -e "s|\.ng\$|\.am|g") + sed -e "s|^__ng_Makefile_am_template__|AUTOMAKE_OPTIONS = ${SERIAL_TESTS} ${DEANSI_START}../portab/ansi2knr${DEANSI_END}|g" \ + $makefile_ng >$makefile_am +done + +export ACLOCAL AUTOHEADER AUTOMAKE AUTOCONF + +# Generate files +echo "Generating files using \"$AUTOCONF\" and \"$AUTOMAKE\" ..." +Run $ACLOCAL && \ + Run $AUTOCONF && \ + Run $AUTOHEADER && \ + Run $AUTOMAKE --add-missing --no-force + +if [ $? -eq 0 ] && [ -x ./configure ]; then + # Success: if we got some parameters we call ./configure and pass + # all of them to it. + NAME=$(grep PACKAGE_STRING= configure | cut -d"'" -f2) + if [ "$GO" = "1" ]; then + [ -n "$PREFIX" ] && p=" --prefix=$PREFIX" || p="" + c="./configure${p}${CONFIGURE_ARGS}" + echo "Okay, autogen.sh for $NAME done." + echo "Calling \"$c\" ..." + $c + exit $? + else + echo "Okay, autogen.sh for $NAME done." + echo "Now run the \"./configure\" script." + exit 0 + fi +else + # Failure!? + echo "Error! Check your installation of GNU automake and autoconf!" + exit 1 +fi + +# -eof- diff --git a/deprecated-ngircd/config.guess b/deprecated-ngircd/config.guess new file mode 100755 index 0000000..cdfc439 --- /dev/null +++ b/deprecated-ngircd/config.guess @@ -0,0 +1,1807 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2023 Free Software Foundation, Inc. + +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-08-22' + +# 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 +# (at your option) any later version. +# +# This program 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/>. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess +# +# Please send patches to <config-patches@gnu.org>. + + +# 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] + +Output the configuration name of the system '$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +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." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# Just in case it came from the environment. +GUESS= + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD=$driver + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case $UNAME_SYSTEM in +Linux|GNU|GNU/*) + LIBC=unknown + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #if defined(__ANDROID__) + LIBC=android + #else + #include <features.h> + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #elif defined(__GLIBC__) + LIBC=gnu + #else + #include <stdarg.h> + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif + #endif + #endif + EOF + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" + + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)` + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case $UNAME_MACHINE_ARCH in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case $UNAME_MACHINE_ARCH in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case $UNAME_VERSION in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + GUESS=$machine-${os}${release}${abi-} + ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; + *:MidnightBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; + *:ekkoBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; + *:SolidBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; + *:OS108:*:*) + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; + macppc:MirBSD:*:*) + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; + *:MirBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; + *:Sortix:*:*) + GUESS=$UNAME_MACHINE-unknown-sortix + ;; + *:Twizzler:*:*) + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; + *:Redox:*:*) + GUESS=$UNAME_MACHINE-unknown-redox + ;; + mips:OSF1:*.*) + GUESS=mips-dec-osf1 + ;; + alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case $ALPHA_CPU_TYPE in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; + Amiga*:UNIX_System_V:4.0:*) + GUESS=m68k-unknown-sysv4 + ;; + *:[Aa]miga[Oo][Ss]:*:*) + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; + *:[Mm]orph[Oo][Ss]:*:*) + GUESS=$UNAME_MACHINE-unknown-morphos + ;; + *:OS/390:*:*) + GUESS=i370-ibm-openedition + ;; + *:z/VM:*:*) + GUESS=s390-ibm-zvmoe + ;; + *:OS400:*:*) + GUESS=powerpc-ibm-os400 + ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + GUESS=arm-unknown-riscos + ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + GUESS=hppa1.1-hitachi-hiuxmpp + ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; + NILE*:*:*:dcosx) + GUESS=pyramid-pyramid-svr4 + ;; + DRS?6000:unix:4.0:6*) + GUESS=sparc-icl-nx6 + ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; + s390x:SunOS:*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; + sun4H:SunOS:5.*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; + sun4*:SunOS:*:*) + case `/usr/bin/arch -k` in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like '4.1.3-JL'. + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; + sun3*:SunOS:*:*) + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case `/bin/arch` in + sun3) + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; + sun4) + GUESS=sparc-sun-sunos$UNAME_RELEASE + ;; + esac + ;; + aushp:SunOS:*:*) + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; + m68k:machten:*:*) + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; + powerpc:machten:*:*) + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; + RISC*:Mach:*:*) + GUESS=mips-dec-mach_bsd4.3 + ;; + RISC*:ULTRIX:*:*) + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; + VAX*:ULTRIX*:*:*) + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include <stdio.h> /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; + Motorola:PowerMAX_OS:*:*) + GUESS=powerpc-motorola-powermax + ;; + Motorola:*:4.3:PL8-*) + GUESS=powerpc-harris-powermax + ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + GUESS=powerpc-harris-powermax + ;; + Night_Hawk:Power_UNIX:*:*) + GUESS=powerpc-harris-powerunix + ;; + m88k:CX/UX:7*:*) + GUESS=m88k-harris-cxux7 + ;; + m88k:*:4*:R4*) + GUESS=m88k-motorola-sysv4 + ;; + m88k:*:3*:R3*) + GUESS=m88k-motorola-sysv3 + ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 + then + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x + then + GUESS=m88k-dg-dgux$UNAME_RELEASE + else + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE + fi + else + GUESS=i586-dg-dgux$UNAME_RELEASE + fi + ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + GUESS=m88k-dolphin-sysv3 + ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + GUESS=m88k-motorola-sysv3 + ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + GUESS=m88k-tektronix-sysv3 + ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + GUESS=m68k-tektronix-bsd + ;; + *:IRIX*:*:*) + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + GUESS=i386-ibm-aix + ;; + ia64:AIX:*:*) + if test -x /usr/bin/oslevel ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + fi + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + GUESS=$SYSTEM_NAME + else + GUESS=rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + GUESS=rs6000-ibm-aix3.2.4 + else + GUESS=rs6000-ibm-aix3.2 + fi + ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + fi + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; + *:AIX:*:*) + GUESS=rs6000-ibm-aix + ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + GUESS=romp-ibm-bsd4.4 + ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + GUESS=rs6000-bull-bosx + ;; + DPX/2?00:B.O.S.:*:*) + GUESS=m68k-bull-sysv3 + ;; + 9000/[34]??:4.3bsd:1.*:*) + GUESS=m68k-hp-bsd + ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + GUESS=m68k-hp-bsd4.4 + ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if test -x /usr/bin/getconf; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case $sc_cpu_version in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case $sc_kernel_bits in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if test "$HP_ARCH" = ""; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if test "$HP_ARCH" = hppa2.0w + then + set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; + 3050*:HI-UX:*:*) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + GUESS=unknown-hitachi-hiuxwe2 + ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + GUESS=hppa1.1-hp-bsd + ;; + 9000/8??:4.3bsd:*:*) + GUESS=hppa1.0-hp-bsd + ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + GUESS=hppa1.0-hp-mpeix + ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + GUESS=hppa1.1-hp-osf + ;; + hp8??:OSF1:*:*) + GUESS=hppa1.0-hp-osf + ;; + i*86:OSF1:*:*) + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk + else + GUESS=$UNAME_MACHINE-unknown-osf1 + fi + ;; + parisc*:Lites*:*:*) + GUESS=hppa1.1-hp-lites + ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + GUESS=c1-convex-bsd + ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + GUESS=c34-convex-bsd + ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + GUESS=c38-convex-bsd + ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + GUESS=c4-convex-bsd + ;; + CRAY*Y-MP:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; + CRAY*T3E:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; + CRAY*SV1:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; + *:UNICOS/mp:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; + sparc*:BSD/OS:*:*) + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; + *:BSD/OS:*:*) + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi + else + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf + fi + ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; + i*:CYGWIN*:*) + GUESS=$UNAME_MACHINE-pc-cygwin + ;; + *:MINGW64*:*) + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; + *:MINGW*:*) + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; + *:MSYS*:*) + GUESS=$UNAME_MACHINE-pc-msys + ;; + i*:PW*:*) + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; + *:Interix*:*) + case $UNAME_MACHINE in + x86) + GUESS=i586-pc-interix$UNAME_RELEASE + ;; + authenticamd | genuineintel | EM64T) + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; + IA64) + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; + esac ;; + i*:UWIN*:*) + GUESS=$UNAME_MACHINE-pc-uwin + ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + GUESS=x86_64-pc-cygwin + ;; + prep*:SunOS:5.*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; + *:GNU:*:*) + # the GNU system + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; + *:Minix:*:*) + GUESS=$UNAME_MACHINE-unknown-minix + ;; + aarch64:Linux:*:*) + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI + ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arm*:Linux:*:*) + set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi + else + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf + fi + fi + ;; + avr32*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + cris:Linux:*:*) + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; + crisv32:Linux:*:*) + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; + e2k:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + frv:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + hexagon:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + i*86:Linux:*:*) + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; + ia64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + k1om:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + m32r*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + m68*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + mips:Linux:*:* | mips64:Linux:*:*) + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + MIPS_ENDIAN=el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + MIPS_ENDIAN= + #else + MIPS_ENDIAN= + #endif + #endif +EOF + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + ;; + mips64el:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + openrisc*:Linux:*:*) + GUESS=or1k-unknown-linux-$LIBC + ;; + or32:Linux:*:* | or1k*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + padre:Linux:*:*) + GUESS=sparc-unknown-linux-$LIBC + ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + GUESS=hppa64-unknown-linux-$LIBC + ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; + esac + ;; + ppc64:Linux:*:*) + GUESS=powerpc64-unknown-linux-$LIBC + ;; + ppc:Linux:*:*) + GUESS=powerpc-unknown-linux-$LIBC + ;; + ppc64le:Linux:*:*) + GUESS=powerpc64le-unknown-linux-$LIBC + ;; + ppcle:Linux:*:*) + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + s390:Linux:*:* | s390x:Linux:*:*) + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; + sh64*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + sh*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + tile*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + vax:Linux:*:*) + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; + x86_64:Linux:*:*) + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __i386__ + ABI=x86 + #else + #ifdef __ILP32__ + ABI=x32 + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + x86) CPU=i686 ;; + x32) LIBCABI=${LIBC}x32 ;; + esac + fi + GUESS=$CPU-pc-linux-$LIBCABI + ;; + xtensa*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + GUESS=i386-sequent-sysv4 + ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; + i*86:OS/2:*:*) + # If we were able to find 'uname', then EMX Unix compatibility + # is probably installed. + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; + i*86:XTS-300:*:STOP) + GUESS=$UNAME_MACHINE-unknown-stop + ;; + i*86:atheos:*:*) + GUESS=$UNAME_MACHINE-unknown-atheos + ;; + i*86:syllable:*:*) + GUESS=$UNAME_MACHINE-pc-syllable + ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; + i*86:*DOS:*:*) + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL + else + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL + fi + ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL + else + GUESS=$UNAME_MACHINE-pc-sysv32 + fi + ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + GUESS=i586-pc-msdosdjgpp + ;; + Intel:Mach:3*:*) + GUESS=i386-pc-mach3 + ;; + paragon:*:*:*) + GUESS=i860-intel-osf1 + ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 + fi + ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + GUESS=m68010-convergent-sysv + ;; + mc68k:UNIX:SYSTEM5:3.51m) + GUESS=m68k-convergent-sysv + ;; + M680?0:D-NIX:5.3:*) + GUESS=m68k-diab-dnix + ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; + mc68030:UNIX_System_V:4.*:*) + GUESS=m68k-atari-sysv4 + ;; + TSUNAMI:LynxOS:2.*:*) + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; + rs6000:LynxOS:2.*:*) + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; + SM[BE]S:UNIX_SV:*:*) + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; + RM*:ReliantUNIX-*:*:*) + GUESS=mips-sni-sysv4 + ;; + RM*:SINIX-*:*:*) + GUESS=mips-sni-sysv4 + ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + GUESS=$UNAME_MACHINE-sni-sysv4 + else + GUESS=ns32k-sni-sysv + fi + ;; + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + GUESS=i586-unisys-sysv4 + ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <hewes@openmarket.com>. + # How about differentiating between stratus architectures? -djm + GUESS=hppa1.1-stratus-sysv4 + ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + GUESS=i860-stratus-sysv4 + ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + GUESS=$UNAME_MACHINE-stratus-vos + ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + GUESS=hppa1.1-stratus-vos + ;; + mc68*:A/UX:*:*) + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; + news*:NEWS-OS:6*:*) + GUESS=mips-sony-newsos6 + ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE + else + GUESS=mips-unknown-sysv$UNAME_RELEASE + fi + ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + GUESS=powerpc-be-beos + ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + GUESS=powerpc-apple-beos + ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + GUESS=i586-pc-beos + ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + GUESS=i586-pc-haiku + ;; + ppc:Haiku:*:*) # Haiku running on Apple PowerPC + GUESS=powerpc-apple-haiku + ;; + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) + GUESS=$UNAME_MACHINE-unknown-haiku + ;; + SX-4:SUPER-UX:*:*) + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; + SX-5:SUPER-UX:*:*) + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; + SX-6:SUPER-UX:*:*) + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; + SX-7:SUPER-UX:*:*) + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; + SX-8:SUPER-UX:*:*) + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; + SX-8R:SUPER-UX:*:*) + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; + SX-ACE:SUPER-UX:*:*) + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; + Power*:Rhapsody:*:*) + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; + *:Rhapsody:*:*) + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build + fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE + fi + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; + *:QNX:*:4*) + GUESS=i386-pc-qnx + ;; + NEO-*:NONSTOP_KERNEL:*:*) + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; + NSE-*:NONSTOP_KERNEL:*:*) + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; + NSR-*:NONSTOP_KERNEL:*:*) + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; + NSV-*:NONSTOP_KERNEL:*:*) + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; + NSX-*:NONSTOP_KERNEL:*:*) + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; + *:NonStop-UX:*:*) + GUESS=mips-compaq-nonstopux + ;; + BS2000:POSIX*:*:*) + GUESS=bs2000-siemens-sysv + ;; + DS/*:UNIX_System_V:*:*) + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "${cputype-}" = 386; then + UNAME_MACHINE=i386 + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype + fi + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; + *:TOPS-10:*:*) + GUESS=pdp10-unknown-tops10 + ;; + *:TENEX:*:*) + GUESS=pdp10-unknown-tenex + ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + GUESS=pdp10-dec-tops20 + ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + GUESS=pdp10-xkl-tops20 + ;; + *:TOPS-20:*:*) + GUESS=pdp10-unknown-tops20 + ;; + *:ITS:*:*) + GUESS=pdp10-unknown-its + ;; + SEI:*:*:SEIUX) + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; + *:DragonFly:*:*) + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; + esac ;; + *:XENIX:*:SysV) + GUESS=i386-pc-xenix + ;; + i*86:skyos:*:*) + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; + i*86:rdos:*:*) + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; + x86_64:VMkernel:*:*) + GUESS=$UNAME_MACHINE-unknown-esx + ;; + amd64:Isilon\ OneFS:*:*) + GUESS=x86_64-unknown-onefs + ;; + *:Unleashed:*:*) + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; +esac + +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" <<EOF +#ifdef _SEQUENT_ +#include <sys/types.h> +#include <sys/utsname.h> +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include <signal.h> +#if defined(_SIZE_T_) || defined(SIGLOST) +#include <sys/utsname.h> +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include <sys/param.h> + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include <sys/param.h> +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + +echo "$0: unable to guess system type" >&2 + +case $UNAME_MACHINE:$UNAME_SYSTEM in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <<EOF + +NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize +the system type. Please install a C compiler and try again. +EOF + ;; +esac + +cat >&2 <<EOF + +This script (version $timestamp), has failed to recognize the +operating system you are using. If your script is old, overwrite *all* +copies of config.guess and config.sub with the latest versions from: + + https://git.savannah.gnu.org/cgit/config.git/plain/config.guess +and + https://git.savannah.gnu.org/cgit/config.git/plain/config.sub +EOF + +our_year=`echo $timestamp | sed 's,-.*,,'` +thisyear=`date +%Y` +# shellcheck disable=SC2003 +script_age=`expr "$thisyear" - "$our_year"` +if test "$script_age" -lt 3 ; then + cat >&2 <<EOF + +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF +fi + +exit 1 + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/deprecated-ngircd/config.ini.example b/deprecated-ngircd/config.ini.example new file mode 100644 index 0000000..e8a5f77 --- /dev/null +++ b/deprecated-ngircd/config.ini.example @@ -0,0 +1,18 @@ +[Global] +Name = raye.mistivia.com +Info = IRC Server +Listen = 0.0.0.0, :: +Ports = 6667 +ServerUID = 100 +ServerGID = 100 + +[Limits] +MaxNickLength = 20 +MaxConnectionsIP = 99999 + +[Operator] +Name = xxx +Password = xxxxxx + +[Options] +OperCanUseMode = yes diff --git a/deprecated-ngircd/config.sub b/deprecated-ngircd/config.sub new file mode 100755 index 0000000..defe52c --- /dev/null +++ b/deprecated-ngircd/config.sub @@ -0,0 +1,1960 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2023 Free Software Foundation, Inc. + +# 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 +# (at your option) any later version. +# +# This program 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/>. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to <config-patches@gnu.org>. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +# 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 + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.sub ($timestamp) + +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." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +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 + exit 1 + ;; + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os 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* | managarm-* \ + | windows-* ) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac + ;; + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + 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]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + basic_os= + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac + ;; + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + basic_os=bsd + ;; + convex-c2) + basic_machine=c2-convex + basic_os=bsd + ;; + convex-c32) + basic_machine=c32-convex + basic_os=bsd + ;; + convex-c34) + basic_machine=c34-convex + basic_os=bsd + ;; + convex-c38) + basic_machine=c38-convex + basic_os=bsd + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac + ;; +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond + ;; + op50n) + cpu=hppa1.1 + vendor=oki + ;; + op60c) + cpu=hppa1.1 + vendor=oki + ;; + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + basic_os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + basic_os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + basic_os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + basic_os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $basic_os in + irix*) + ;; + *) + basic_os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + basic_os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $basic_os in + openstep*) + ;; + nextstep*) + ;; + ns2*) + basic_os=nextstep2 + ;; + *) + basic_os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + basic_os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf + ;; + none) + cpu=none + vendor=none + ;; + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine + ;; + leon-*|leon[3-9]-*) + cpu=sparc + 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' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + cpu=$basic_machine + vendor=pc + ;; + # These rules are duplicated from below for sake of the special case above; + # i.e. things that normalized to x86 arches should also default to "pc" + pc98) + cpu=i386 + vendor=pc + ;; + x64 | amd64) + cpu=x86_64 + vendor=pc + ;; + # Recognize the basic CPU types without company name. + *) + cpu=$basic_machine + vendor=unknown + ;; +esac + +unset -v basic_machine + +# Decode basic machines in the full and proper CPU-Company form. +case $cpu-$vendor in + # Here we handle the default manufacturer of certain CPU types in canonical form. It is in + # some cases the only manufacturer, in others, it is the most popular. + craynv-unknown) + vendor=cray + basic_os=${basic_os:-unicosmp} + ;; + c90-unknown | c90-cray) + vendor=cray + basic_os=${Basic_os:-unicos} + ;; + fx80-unknown) + vendor=alliant + ;; + romp-unknown) + vendor=ibm + ;; + mmix-unknown) + vendor=knuth + ;; + microblaze-unknown | microblazeel-unknown) + vendor=xilinx + ;; + rs6000-unknown) + vendor=ibm + ;; + vax-unknown) + vendor=dec + ;; + pdp11-unknown) + vendor=dec + ;; + we32k-unknown) + vendor=att + ;; + cydra-unknown) + vendor=cydrome + ;; + i370-ibm*) + vendor=ibm + ;; + orion-unknown) + vendor=highlevel + ;; + xps-unknown | xps100-unknown) + cpu=xps100 + vendor=honeywell + ;; + + # 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 + basic_os=${basic_os:-bosx} + ;; + + # Here we normalize CPU types irrespective of the vendor + amd64-*) + cpu=x86_64 + ;; + blackfin-*) + cpu=bfin + basic_os=linux + ;; + c54x-*) + cpu=tic54x + ;; + c55x-*) + cpu=tic55x + ;; + c6x-*) + cpu=tic6x + ;; + e500v[12]-*) + cpu=powerpc + basic_os=${basic_os}"spe" + ;; + mips3*-*) + cpu=mips64 + ;; + ms1-*) + cpu=mt + ;; + m68knommu-*) + cpu=m68k + basic_os=linux + ;; + m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) + cpu=s12z + ;; + openrisc-*) + cpu=or32 + ;; + parisc-*) + cpu=hppa + basic_os=linux + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + cpu=i586 + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) + cpu=i686 + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + cpu=i686 + ;; + pentium4-*) + cpu=i786 + ;; + pc98-*) + cpu=i386 + ;; + ppc-* | ppcbe-*) + cpu=powerpc + ;; + ppcle-* | powerpclittle-*) + cpu=powerpcle + ;; + ppc64-*) + cpu=powerpc64 + ;; + ppc64le-* | powerpc64little-*) + cpu=powerpc64le + ;; + sb1-*) + cpu=mipsisa64sb1 + ;; + sb1el-*) + cpu=mipsisa64sb1el + ;; + sh5e[lb]-*) + cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` + ;; + spur-*) + cpu=spur + ;; + strongarm-* | thumb-*) + cpu=arm + ;; + tx39-*) + cpu=mipstx39 + ;; + tx39el-*) + cpu=mipstx39el + ;; + x64-*) + cpu=x86_64 + ;; + xscale-* | xscalee[bl]-*) + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` + ;; + arm64-* | aarch64le-*) + cpu=aarch64 + ;; + + # Recognize the canonical CPU Types that limit and/or modify the + # company names they are paired with. + cr16-*) + basic_os=${basic_os:-elf} + ;; + crisv32-* | etraxfs*-*) + cpu=crisv32 + vendor=axis + ;; + cris-* | etrax*-*) + cpu=cris + vendor=axis + ;; + crx-*) + basic_os=${basic_os:-elf} + ;; + neo-tandem) + cpu=neo + vendor=tandem + ;; + nse-tandem) + cpu=nse + vendor=tandem + ;; + nsr-tandem) + cpu=nsr + vendor=tandem + ;; + nsv-tandem) + cpu=nsv + vendor=tandem + ;; + nsx-tandem) + cpu=nsx + vendor=tandem + ;; + mipsallegrexel-sony) + cpu=mipsallegrexel + vendor=sony + ;; + tile*-*) + basic_os=${basic_os:-linux-gnu} + ;; + + *) + # Recognize the canonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | 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 | arc32 | arc64 \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bpf | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | 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 \ + | 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* \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k | nvptx \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | picochip \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ + | rl78 | romp | rs6000 | rx \ + | s390 | s390x \ + | score \ + | sh | shl \ + | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | thumbv7* \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | w65 \ + | wasm32 | wasm64 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 + exit 1 + ;; + esac + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $vendor in + digital*) + vendor=dec + ;; + commodore*) + vendor=cbm + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if test x"$basic_os" != x +then + +# 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|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` + ;; + nto-qnx*) + kernel=nto + 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|'` + ;; + linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|linux|gnu|'` + ;; + managarm*) + kernel=managarm + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` + ;; + *) + kernel= + os=$basic_os + ;; +esac + +# Now, normalize the OS (knowing we just have one component, it's not a kernel, +# etc.) +case $os in + # First match some system type aliases that might get confused + # with valid system types. + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux + ;; + bluegene*) + os=cnk + ;; + solaris1 | solaris1.*) + os=`echo "$os" | sed -e 's|solaris1|sunos4|'` + ;; + solaris) + os=solaris2 + ;; + unixware*) + os=sysv4.2uw + ;; + # es1800 is here to avoid being matched by es* (a different OS) + es1800*) + os=ose + ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco*v* | scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos + ;; + qnx*) + os=qnx + ;; + hiux*) + os=hiuxwe2 + ;; + lynx*178) + os=lynxos178 + ;; + lynx*5) + os=lynxos5 + ;; + lynxos*) + # don't get caught up in next wildcard + ;; + lynx*) + os=lynxos + ;; + mac[0-9]*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + opened*) + os=openedition + ;; + os400*) + os=os400 + ;; + sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + ;; + sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + ;; + wince*) + os=wince + ;; + utek*) + os=bsd + ;; + dynix*) + os=bsd + ;; + acis*) + os=aos + ;; + atheos*) + os=atheos + ;; + syllable*) + os=syllable + ;; + 386bsd) + os=bsd + ;; + ctix* | uts*) + os=sysv + ;; + nova*) + os=rtmk-nova + ;; + ns2) + os=nextstep2 + ;; + # Preserve the version number of sinix5. + sinix5.*) + os=`echo "$os" | sed -e 's|sinix|sysv|'` + ;; + sinix*) + os=sysv4 + ;; + tpf*) + os=tpf + ;; + triton*) + os=sysv3 + ;; + oss*) + os=sysv3 + ;; + svr4*) + os=sysv4 + ;; + svr3) + os=sysv3 + ;; + sysvr4) + os=sysv4 + ;; + ose*) + os=ose + ;; + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint + ;; + dicos*) + os=dicos + ;; + pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $cpu in + arm*) + os=eabi + ;; + *) + 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. + ;; +esac + +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +kernel= +obj= +case $cpu-$vendor in + score-*) + os= + obj=elf + ;; + spu-*) + os= + obj=elf + ;; + *-acorn) + os=riscix1.2 + ;; + arm*-rebel) + kernel=linux + os=gnu + ;; + arm*-semi) + os= + obj=aout + ;; + c4x-* | tic4x-*) + os= + obj=coff + ;; + c8051-*) + os= + obj=elf + ;; + clipper-intergraph) + os=clix + ;; + hexagon-*) + os= + obj=elf + ;; + tic54x-*) + os= + obj=coff + ;; + tic55x-*) + os= + obj=coff + ;; + tic6x-*) + os= + obj=coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=tops20 + ;; + pdp11-*) + os=none + ;; + *-dec | vax-*) + os=ultrix4.2 + ;; + m68*-apollo) + os=domain + ;; + i386-sun) + os=sunos4.0.2 + ;; + m68000-sun) + os=sunos3 + ;; + m68*-cisco) + os= + obj=aout + ;; + mep-*) + os= + obj=elf + ;; + mips*-cisco) + os= + obj=elf + ;; + mips*-*) + os= + obj=elf + ;; + or32-*) + os= + obj=coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=sysv3 + ;; + sparc-* | *-sun) + os=sunos4.1.1 + ;; + pru-*) + os= + obj=elf + ;; + *-be) + os=beos + ;; + *-ibm) + os=aix + ;; + *-knuth) + os=mmixware + ;; + *-wec) + os=proelf + ;; + *-winbond) + os=proelf + ;; + *-oki) + os=proelf + ;; + *-hp) + os=hpux + ;; + *-hitachi) + os=hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=sysv + ;; + *-cbm) + os=amigaos + ;; + *-dg) + os=dgux + ;; + *-dolphin) + os=sysv3 + ;; + m68k-ccur) + os=rtu + ;; + m88k-omron*) + os=luna + ;; + *-next) + os=nextstep + ;; + *-sequent) + os=ptx + ;; + *-crds) + os=unos + ;; + *-ns) + os=genix + ;; + i370-*) + os=mvs + ;; + *-gould) + os=sysv + ;; + *-highlevel) + os=bsd + ;; + *-encore) + os=bsd + ;; + *-sgi) + os=irix + ;; + *-siemens) + os=sysv4 + ;; + *-masscomp) + os=rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=uxpv + ;; + *-rom68k) + os= + obj=coff + ;; + *-*bug) + os= + obj=coff + ;; + *-apple) + os=macos + ;; + *-atari*) + os=mint + ;; + *-wrs) + os=vxworks + ;; + *) + os=none + ;; +esac + +fi + +# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). + +case $os in + # 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) + ;; + # See `case $cpu-$os` validation below + ghcjs) + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ + | hiux* | abug | nacl* | netware* | windows* \ + | 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* | secbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ + | bosx* | nextstep* | cxux* | oabi* \ + | ptx* | ecoff* | winnt* | domain* | vsta* \ + | udi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* | serenity* \ + | cygwin* | msys* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | mint* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ + | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | 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*) + # Don't forget version if it is 3.2v4 or newer. + ;; + 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': 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-$obj in + linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \ + | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- ) + ;; + uclinux-uclibc*- ) + ;; + managarm-mlibc*- | managarm-kernel*- ) + ;; + 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 + exit 1 + ;; + -kernel*- ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 + exit 1 + ;; + *-kernel*- ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 + ;; + *-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*-) + ;; + 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. + ;; + --*) + # 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 + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) + vendor=acorn + ;; + *-sunos*) + vendor=sun + ;; + *-cnk* | *-aix*) + vendor=ibm + ;; + *-beos*) + vendor=be + ;; + *-hpux*) + vendor=hp + ;; + *-mpeix*) + vendor=hp + ;; + *-hiux*) + vendor=hitachi + ;; + *-unos*) + vendor=crds + ;; + *-dgux*) + vendor=dg + ;; + *-luna*) + vendor=omron + ;; + *-genix*) + vendor=ns + ;; + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) + vendor=ibm + ;; + s390-* | s390x-*) + vendor=ibm + ;; + *-ptx*) + vendor=sequent + ;; + *-tpf*) + vendor=ibm + ;; + *-vxsim* | *-vxworks* | *-windiss*) + vendor=wrs + ;; + *-aux*) + vendor=apple + ;; + *-hms*) + vendor=hitachi + ;; + *-mpw* | *-macos*) + vendor=apple + ;; + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) + vendor=atari + ;; + *-vos*) + vendor=stratus + ;; + esac + ;; +esac + +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/deprecated-ngircd/configure.ng b/deprecated-ngircd/configure.ng new file mode 100644 index 0000000..0dccfbc --- /dev/null +++ b/deprecated-ngircd/configure.ng @@ -0,0 +1,850 @@ +# +# ngIRCd -- The Next Generation IRC Daemon +# 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 +# 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. +# + +define(VERSION_ID,esyscmd([ + V=`git describe 2>/dev/null | sed -e 's/rel-//g' | sed -e 's/-/~/'`; + [ -z "$V" -a -r configure ] \ + && V=`grep "PACKAGE_STRING=" configure | cut -d"'" -f2 | cut -d' ' -f2` + ( [ -n "$V" ] && echo "$V" || echo "??" ) | tr -d '\n'; +])) + +m4_ifdef([AM_SILENT_RULES], + [m4_define([ng_color_tests], [color-tests])], + [m4_define([ng_color_tests], [])]) + +# -- Initialisation -- + +AC_PREREQ([2.61]) +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]) +AC_CANONICAL_HOST + +AM_INIT_AUTOMAKE([-Wall 1.10 foreign ]ng_color_tests) + +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +# -- Templates for config.h -- + +AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled]) +AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists]) +AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists]) +AH_TEMPLATE([ICONV], [Define if libiconv can be used, e.g. for CHARCONV]) +AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests]) +AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used]) +AH_TEMPLATE([PAM], [Define if PAM should be used]) +AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled]) +AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant]) +AH_TEMPLATE([SYSLOG], [Define if syslog should be used for logging]) +AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used]) +AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled]) +AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled]) + +AH_TEMPLATE([HOST_OS], [Target operating system name]) +AH_TEMPLATE([HOST_VENDOR], [Target system vendor]) +AH_TEMPLATE([HOST_CPU], [Target CPU name]) + +# -- C Compiler -- + +AC_PROG_CC +AC_PROG_CC_STDC + +# -- Helper programs -- + +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) + +AC_PROG_AWK +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_MKDIR_P +AC_PROG_RANLIB + +# -- Compiler Features -- + +AC_C_CONST +AC_C_INLINE +__ng_PROTOTYPES__ + +# -- Function Definitions -- + +AC_DEFUN([GCC_STACK_PROTECT_CC],[ + ssp_cc=yes + # Use -fstack-protector-all for the test to enfoce the use of the + # guard variable + AC_MSG_CHECKING([whether ${CC} accepts -fstack-protector]) + ssp_old_cflags="$CFLAGS" + CFLAGS="$CFLAGS -fstack-protector-all" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],[],[ssp_cc=no]) + echo $ssp_cc + CFLAGS="$ssp_old_cflags" + if test "X$ssp_cc" = "Xyes"; then + CFLAGS="$CFLAGS -fstack-protector" + AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) + fi +]) + +AC_DEFUN([WORKING_GETADDRINFO],[ + AC_CHECK_FUNCS([getaddrinfo],[ + AC_MSG_CHECKING([whether getaddrinfo() works]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include <stdio.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <netdb.h> +#include <string.h> +int +main(int argc, char **argv) +{ + struct addrinfo hints, *ai; + memset(&hints, 0, sizeof(hints)); + hints.ai_flags = AI_PASSIVE; + hints.ai_socktype = SOCK_STREAM; + hints.ai_family = PF_UNSPEC; + if(getaddrinfo(NULL, "0", &hints, &ai) != 0) + return 1; + return 0; +} + ]])],[ + AC_DEFINE([HAVE_WORKING_GETADDRINFO], 1, [getaddrinfo(0)]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + ],[ + AC_MSG_RESULT(no) + ]) + ]) +]) + +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 + # We are using the GNU C compiler. Good! + CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes" + + GCC_STACK_PROTECT_CC + GCC_W_NO_FORMAT_TRUNC +fi + +case "$host_os" in + hpux*) + # This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED + # (tested with HP/UX 11.11) + CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" + ;; +esac + +# Add additional CFLAGS, eventually specified on the command line: +test -n "$CFLAGS_ADD" && CFLAGS="$CFLAGS $CFLAGS_ADD" + +CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"' -DDOCDIR='\"\$(docdir)\"'" + +# -- Headers -- + +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_HEADER_TIME + +# Required header files +AC_CHECK_HEADERS([ \ + fcntl.h \ + netdb.h \ + netinet/in.h \ + stdlib.h \ + string.h \ + strings.h \ + sys/socket.h \ + sys/time.h \ + sys/types.h \ + unistd.h \ + ],,AC_MSG_ERROR([required C header missing!])) + +# Optional header files +AC_CHECK_HEADERS_ONCE([ \ + arpa/inet.h \ + inttypes.h \ + malloc.h \ + netinet/in_systm.h \ + netinet/ip.h \ + stdbool.h \ + stddef.h \ + stdint.h \ + sys/resource.h \ + sys/un.h \ + varargs.h \ +]) + +# -- Datatypes -- + +AC_MSG_CHECKING(whether socklen_t exists) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include <sys/types.h> +#include <sys/socket.h> + ]],[[ + socklen_t a, b; + a = 2; b = 4; a += b; + ]])],[ + AC_DEFINE(HAVE_socklen_t) AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) +]) + +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_TYPE_UID_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT8_T + +AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),, + [#include <arpa/inet.h>]) + +# -- Libraries -- + +# memmove: A/UX libUTIL +AC_SEARCH_LIBS([memmove], [UTIL], [], [ + AC_MSG_ERROR([unable to find the memmove() function]) +]) +# gethostbyname: Solaris libnsl +AC_SEARCH_LIBS([gethostbyname], [bind nsl network], [], [ + AC_MSG_ERROR([unable to find the gethostbyname() function]) +]) +# bind: SVR4 libsocket +AC_SEARCH_LIBS([bind], [socket network], [], [ + AC_MSG_ERROR([unable to find the bind() function]) +]) + +# -- Functions -- + +AC_FUNC_FORK +AC_FUNC_STRFTIME + +# Required functions +AC_CHECK_FUNCS([ \ + alarm \ + dup2 \ + endpwent \ + gethostbyaddr \ + gethostbyname \ + gethostname \ + gettimeofday \ + inet_ntoa \ + memmove \ + memset \ + setsid \ + socket \ + strcasecmp \ + strchr \ + strcspn \ + strerror \ + strncasecmp \ + strrchr \ + strspn \ + strstr \ + ],, + AC_MSG_ERROR([required function missing!])) + +# Optional functions +AC_CHECK_FUNCS_ONCE([ + arc4random \ + arc4random_stir \ + gai_strerror \ + getnameinfo \ + inet_aton \ + setgroups \ + setrlimit \ + sigaction \ + sigprocmask \ + snprintf \ + strdup \ + strlcat \ + strlcpy \ + strndup \ + strsignal \ + strtok_r \ + unsetenv \ + vsnprintf \ + waitpid \ +]) + +WORKING_GETADDRINFO + +# -- Configuration options -- + +# use syslog? + +x_syslog_on=no +AC_ARG_WITH(syslog, + AS_HELP_STRING([--without-syslog], + [disable syslog (autodetected by default)]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes], [ + AC_MSG_ERROR([Can't enable syslog!]) + ]) + fi + ], + [ AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes]) + ] +) +if test "$x_syslog_on" = "yes"; then + AC_DEFINE(SYSLOG, 1) + AC_CHECK_HEADERS(syslog.h,,AC_MSG_ERROR([required C header missing!])) +fi + +# use zlib compression? + +x_zlib_on=no +AC_ARG_WITH(zlib, + AS_HELP_STRING([--without-zlib], + [disable zlib compression (autodetected by default)]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_CHECK_LIB(z, deflate) + AC_CHECK_FUNCS(deflate, x_zlib_on=yes, + AC_MSG_ERROR([Can't enable zlib!]) + ) + fi + ], + [ AC_CHECK_LIB(z, deflate) + AC_CHECK_FUNCS(deflate, x_zlib_on=yes) + ] +) +if test "$x_zlib_on" = "yes"; then + AC_DEFINE(ZLIB, 1) + AC_CHECK_HEADERS(zlib.h,,AC_MSG_ERROR([required C header missing!])) +fi + +# detect which IO API to use: + +x_io_backend=none + +AC_ARG_WITH(select, + AS_HELP_STRING([--without-select], + [disable select IO support (autodetected by default)]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_CHECK_FUNCS(select, x_io_select=yes, + AC_MSG_ERROR([Can't enable select IO support!]) + ) + fi + ], + [ + AC_CHECK_FUNCS(select, x_io_select=yes) + ] +) + +AC_ARG_WITH(poll, + AS_HELP_STRING([--without-poll], + [disable poll support (autodetected by default)]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_CHECK_FUNCS(poll, [ + AC_CHECK_HEADERS(poll.h, + x_io_backend=poll\(\), + AC_MSG_ERROR( + [Can't enable poll IO support!]) + ) + ], [ + AC_MSG_ERROR([Can't enable poll IO support!]) + ]) + fi + ], + [ + AC_CHECK_FUNCS(poll, [ + AC_CHECK_HEADERS(poll.h, x_io_backend=poll\(\)) + ]) + ] +) + +AC_ARG_WITH(devpoll, + AS_HELP_STRING([--without-devpoll], + [disable /dev/poll IO support (autodetected by default)]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + + AC_CHECK_HEADERS(sys/devpoll.h,,AC_MSG_ERROR([required C header missing!])) + fi + ], + [ + AC_CHECK_HEADERS(sys/devpoll.h, x_io_backend=/dev/poll) + ] +) + +AC_ARG_WITH(epoll, + AS_HELP_STRING([--without-epoll], + [disable epoll IO support (autodetected by default)]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes, + AC_MSG_ERROR([Can't enable epoll IO support!]) + ) + fi + ], + [ + AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes) + ] +) + +AC_ARG_WITH(kqueue, + AS_HELP_STRING([--without-kqueue], + [disable kqueue IO support (autodetected by default)]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\), + AC_MSG_ERROR([Can't enable kqueue IO support!]) + ) + fi + ], + [ + AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\)) + ] +) + +if test "$x_io_epoll" = "yes" -a "$x_io_select" = "yes"; then + # when epoll() and select() are available, we'll use both! + x_io_backend="epoll(), select()" +else + if test "$x_io_epoll" = "yes"; then + # we prefere epoll() if it is available + x_io_backend="epoll()" + else + if test "$x_io_select" = "yes" -a "$x_io_backend" = "none"; then + # we'll use select, when available and no "better" + # interface has been detected ... + x_io_backend="select()" + fi + fi +fi + +if test "$x_io_backend" = "none"; then + AC_MSG_ERROR([No useable IO API activated/found!?]) +fi + +# use SSL? + +AC_ARG_WITH(openssl, + AS_HELP_STRING([--with-openssl], + [enable SSL support using OpenSSL]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + PKG_CHECK_MODULES([OPENSSL], [libssl libcrypto], + [LIBS="$LIBS $OPENSSL_LIBS" CFLAGS="$CFLAGS $OPENSSL_CFLAGS" + AC_DEFINE(HAVE_LIBSSL, 1)], + [AC_CHECK_LIB(crypto, BIO_s_mem) + AC_CHECK_LIB(ssl, SSL_new)] + ) + AC_CHECK_FUNCS(SSL_new, x_ssl_openssl=yes, + AC_MSG_ERROR([Can't enable openssl]) + ) + fi + ] +) + +AC_ARG_WITH(gnutls, + AS_HELP_STRING([--with-gnutls], + [enable SSL support using gnutls]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_CHECK_LIB(gnutls, gnutls_global_init) + AC_CHECK_FUNCS(gnutls_global_init, x_ssl_gnutls=yes, + AC_MSG_ERROR([Can't enable gnutls]) + ) + fi + ] +) + +x_ssl_lib="no" +if test "$x_ssl_gnutls" = "yes"; then + if test "$x_ssl_openssl" = "yes";then + AC_MSG_ERROR([Cannot enable both gnutls and openssl]) + fi + x_ssl_lib=gnutls +fi +if test "$x_ssl_openssl" = "yes"; then + x_ssl_lib=openssl +fi + +AM_CONDITIONAL(HAVE_SSL, [test $x_ssl_lib != "no"]) + +# use TCP wrappers? + +x_tcpwrap_on=no +AC_ARG_WITH(tcp-wrappers, + AS_HELP_STRING([--with-tcp-wrappers], + [enable TCP wrappers support]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_MSG_CHECKING(for hosts_access) + saved_LIBS="$LIBS" + LIBS="-lwrap $LIBS" + LIBS_END="-lwrap $LIBS_END" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include <sys/types.h> +#include <sys/socket.h> +#include <tcpd.h> +int allow_severity = 0; +int deny_severity = 0; + ]],[[ + tcpd_warn("link test"); + ]])],[ + AC_MSG_RESULT(yes) + AC_DEFINE(TCPWRAP, 1) + x_tcpwrap_on=yes + ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([Can't enable TCP wrappers!]) + ]) + LIBS="$saved_LIBS" + fi + ] +) + +# do IDENT requests using libident? + +x_identauth_on=no +AC_ARG_WITH(ident, + AS_HELP_STRING([--with-ident], + [enable "IDENT" ("AUTH") protocol support]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_CHECK_LIB(ident, ident_id) + AC_CHECK_FUNCS(ident_id, x_identauth_on=yes, + AC_MSG_ERROR([Can't enable IDENT support!]) + ) + fi + ] +) +if test "$x_identauth_on" = "yes"; then + AC_DEFINE(IDENTAUTH, 1) + AC_CHECK_HEADERS(ident.h,,AC_MSG_ERROR([required C header missing!])) +fi + +# compile in PAM support? + +x_pam_on=no +AC_ARG_WITH(pam, + AS_HELP_STRING([--with-pam], + [enable user authentication using PAM]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_CHECK_LIB(pam, pam_authenticate) + AC_CHECK_FUNCS(pam_authenticate, x_pam_on=yes, + AC_MSG_ERROR([Can't enable PAM support!]) + ) + fi + ] +) +if test "$x_pam_on" = "yes"; then + AC_DEFINE(PAM, 1) + AC_CHECK_HEADERS(security/pam_appl.h,pam_ok=yes) + if test "$pam_ok" != "yes"; then + AC_CHECK_HEADERS(pam/pam_appl.h,pam_ok=yes, + AC_MSG_ERROR([required C header missing!])) + fi +fi + +# compile in IRC+ protocol support? + +x_ircplus_on=yes +AC_ARG_ENABLE(ircplus, + AS_HELP_STRING([--disable-ircplus], + [disable IRC+ protocol]), + if test "$enableval" = "no"; then x_ircplus_on=no; fi +) +if test "$x_ircplus_on" = "yes"; then + AC_DEFINE(IRCPLUS, 1) + + # Compile in iconv support? + # We only check for it when IRC+ is enabled, because the IRC+ command + # CHARCONV is the only function depending on it. + x_iconv_on=no + AC_ARG_WITH(iconv, + AS_HELP_STRING([--with-iconv], + [enable character conversion using libiconv]), + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_CHECK_LIB(iconv, iconv_open) + AC_CHECK_FUNCS(iconv_open, x_iconv_on=yes) + if test "$x_iconv_on" != "yes"; then + AC_CHECK_LIB(iconv, libiconv_open) + AC_CHECK_FUNCS(libiconv_open, x_iconv_on=yes) + fi + if test "$x_iconv_on" != "yes"; then + AC_MSG_ERROR([Can't enable libiconv support!]) + fi + fi ] + ) + if test "$x_iconv_on" = "yes"; then + AC_DEFINE(ICONV, 1) + fi +fi + +# enable support for IPv6? + +x_ipv6_on=yes +AC_ARG_ENABLE(ipv6, + 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 + AC_DEFINE(WANT_IPV6, 1) +fi + +# compile in IRC "sniffer"? + +x_sniffer_on=no; x_debug_on=no +AC_ARG_ENABLE(sniffer, + AS_HELP_STRING([--enable-sniffer], + [enable IRC traffic sniffer (enables debug mode)]), + if test "$enableval" = "yes"; then + AC_DEFINE(SNIFFER, 1) + x_sniffer_on=yes; x_debug_on=yes + fi +) + +# enable additional debugging code? + +AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug], + [show additional debug output]), + if test "$enableval" = "yes"; then x_debug_on=yes; fi +) +if test "$x_debug_on" = "yes"; then + AC_DEFINE(DEBUG, 1) + test "$GCC" = "yes" && CFLAGS="-pedantic $CFLAGS" + AC_CHECK_FUNCS(mtrace) +fi + +# enable "strict RFC rules"? + +x_strict_rfc_on=no +AC_ARG_ENABLE(strict-rfc, + AS_HELP_STRING([--enable-strict-rfc], + [strict RFC conformance -- may break clients!]), + if test "$enableval" = "yes"; then + AC_DEFINE(STRICT_RFC, 1) + x_strict_rfc_on=yes + fi +) + +# -- Definitions -- + +AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" ) +AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" ) +AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" ) + +# Add additional CFLAGS, LDFLAGS and LIBS which were specified on the command +# line or by some tests from above, but after running this script. Useful for +# adding "-Werror", for example: +test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END" +test -n "$LDFLAGS_END" && LDFLAGS="$LDFLAGS $LDFLAGS_END" +test -n "$LIBS_END" && LIBS="$LIBS $LIBS_END" + +# -- Generate files -- + +AC_CONFIG_FILES([ \ + Makefile \ + contrib/Debian/Makefile \ + contrib/Makefile \ + doc/Makefile \ + doc/src/Makefile \ + man/Makefile \ + src/ipaddr/Makefile \ + src/Makefile \ + src/ngircd/Makefile \ + src/portab/Makefile \ + src/testsuite/Makefile \ + src/tool/Makefile \ +]) + +AC_OUTPUT + +type dpkg >/dev/null 2>&1 +if test $? -eq 0; then + # Generate debian/ link if the dpkg command exists + # (read: if we are running on a debian compatible system) + echo "creating Debian-specific links ..." + if test ! -f debian/rules -a -f contrib/Debian/rules; then + ln -s contrib/Debian debian + fi +fi + +# -- Result -- + +echo +echo "ngIRCd $PACKAGE_VERSION has been configured with the following options:" +echo + +# Someone please show me a better way :) [borrowed by OpenSSH] +B=`eval echo ${bindir}` ; B=`eval echo ${B}` +S=`eval echo ${sbindir}` ; S=`eval echo ${S}` +C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}` +M=`eval echo ${mandir}` ; M=`eval echo ${M}` +D=`eval echo ${docdir}` ; D=`eval echo ${D}` + +echo " Host: ${host}" +echo " Compiler: ${CC}" +test -n "$CFLAGS" && echo " Compiler flags: ${CFLAGS}" +test -n "$CPPFLAGS" && echo " Preprocessor flags: ${CPPFLAGS}" +test -n "$LDFLAGS" && echo " Linker flags: ${LDFLAGS}" +test -n "$LIBS" && echo " Libraries: ${LIBS}" +echo +echo " 'ngircd' binary: $S" +echo " Configuration file: $C" +echo " Manual pages: $M" +echo " Documentation: $D" +echo + +echo $ECHO_N " Syslog support: $ECHO_C" +test "$x_syslog_on" = "yes" \ + && echo $ECHO_N "yes $ECHO_C" \ + || echo $ECHO_N "no $ECHO_C" +echo $ECHO_N " Enable debug code: $ECHO_C" +test "$x_debug_on" = "yes" \ + && echo "yes" \ + || echo "no" + +echo $ECHO_N " zlib compression: $ECHO_C" +test "$x_zlib_on" = "yes" \ + && echo $ECHO_N "yes $ECHO_C" \ + || echo $ECHO_N "no $ECHO_C" +echo $ECHO_N " IRC sniffer: $ECHO_C" +test "$x_sniffer_on" = "yes" \ + && echo "yes" \ + || echo "no" + +echo $ECHO_N " Use TCP Wrappers: $ECHO_C" +test "$x_tcpwrap_on" = "yes" \ + && echo $ECHO_N "yes $ECHO_C" \ + || echo $ECHO_N "no $ECHO_C" +echo $ECHO_N " Strict RFC mode: $ECHO_C" +test "$x_strict_rfc_on" = "yes" \ + && echo "yes" \ + || echo "no" + +echo $ECHO_N " IDENT support: $ECHO_C" +test "$x_identauth_on" = "yes" \ + && echo $ECHO_N "yes $ECHO_C" \ + || echo $ECHO_N "no $ECHO_C" +echo $ECHO_N " IRC+ protocol: $ECHO_C" +test "$x_ircplus_on" = "yes" \ + && echo "yes" \ + || echo "no" + +echo $ECHO_N " IPv6 protocol: $ECHO_C" +test "$x_ipv6_on" = "yes" \ + && echo $ECHO_N "yes $ECHO_C" \ + || echo $ECHO_N "no $ECHO_C" +echo $ECHO_N " I/O backend: $ECHO_C" + echo "$x_io_backend" + +echo $ECHO_N " PAM support: $ECHO_C" +test "$x_pam_on" = "yes" \ + && echo $ECHO_N "yes $ECHO_C" \ + || echo $ECHO_N "no $ECHO_C" +echo $ECHO_N " SSL support: $ECHO_C" +echo "$x_ssl_lib" + +echo $ECHO_N " libiconv support: $ECHO_C" + echo "$x_iconv_on" + +echo + +define(_automake_regex_,[[^AUTOMAKE_OPTIONS = [a-z .\-]*/portab/ansi2knr]]) +if ! grep "_automake_regex_" src/ngircd/Makefile.am >/dev/null 2>&1; then + echo "WARNING:" + echo "This GNU automake generated build system does not support \"de-ANSI-fication\"," + echo "therefore don't use it to generate \"official\" distribution archives!" + echo "(Most probably you want to use GNU automake 1.11.x for this purpose ...)" + echo +fi + +# -eof- diff --git a/deprecated-ngircd/contrib/Debian/.gitignore b/deprecated-ngircd/contrib/Debian/.gitignore new file mode 100644 index 0000000..2b352d4 --- /dev/null +++ b/deprecated-ngircd/contrib/Debian/.gitignore @@ -0,0 +1,7 @@ +*.log +*.debhelper +*.substvars +debhelper-build-stamp +files +ngircd/ +ngircd.service diff --git a/deprecated-ngircd/contrib/Debian/Makefile.am b/deprecated-ngircd/contrib/Debian/Makefile.am new file mode 100644 index 0000000..bbc715f --- /dev/null +++ b/deprecated-ngircd/contrib/Debian/Makefile.am @@ -0,0 +1,30 @@ +# +# ngIRCd -- The Next Generation IRC Daemon +# 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 +# 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 = \ + changelog \ + control \ + copyright \ + ngircd.default \ + ngircd.pam \ + rules \ + watch \ + source/format + +maintainer-clean-local: + rm -f Makefile Makefile.in + +clean-local: + rm -f *.log *.debhelper *.substvars + rm -f debhelper-build-stamp files ngircd.service + rm -rf .debhelper/ ngircd/ + +# -eof- diff --git a/deprecated-ngircd/contrib/Debian/changelog b/deprecated-ngircd/contrib/Debian/changelog new file mode 100644 index 0000000..3d008ed --- /dev/null +++ b/deprecated-ngircd/contrib/Debian/changelog @@ -0,0 +1,598 @@ +ngircd (27-0ab1) unstable; urgency=medium + + * New "upstream" release: ngIRCd 27. + + -- Alexander Barton <alex@barton.de> Fri, 26 Apr 2024 16:52:14 +0200 + +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. + + -- Alexander Barton <alex@barton.de> Sat, 02 Jan 2021 14:31:51 +0100 + +ngircd (26-0ab1) unstable; urgency=medium + + * New "upstream" release: ngIRCd 26. + + -- Alexander Barton <alex@barton.de> Sat, 20 Jun 2020 15:26:46 +0200 + +ngircd (26~rc2-0ab1) unstable; urgency=low + + * New "upstream" release candidate 2 for ngIRCd Release 26. + + -- Alexander Barton <alex@barton.de> Thu, 11 Jun 2020 17:21:17 +0200 + +ngircd (26~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 26. + + -- Alexander Barton <alex@barton.de> Sun, 10 May 2020 17:13:17 +0200 + +ngircd (25-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 25. + + -- Alexander Barton <alex@barton.de> Wed, 23 Jan 2019 23:13:03 +0100 + +ngircd (25~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 25. + + -- Alexander Barton <alex@barton.de> Sat, 11 Aug 2018 21:35:08 +0200 + +ngircd (24-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 24. + + -- Alexander Barton <alex@barton.de> Fri, 20 Jan 2017 16:43:09 +0100 + +ngircd (24~rc1-0ab2) unstable; urgency=low + + * Use OpenSSL instead of GnuTLS for SSL-enabled packages. + + -- Alexander Barton <alex@barton.de> Fri, 20 Jan 2017 15:20:07 +0100 + +ngircd (24~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 24. + + -- Alexander Barton <alex@barton.de> Sat, 07 Jan 2017 18:58:02 +0100 + +ngircd (23-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 23. + + -- Alexander Barton <alex@barton.de> Mon, 16 Nov 2015 21:27:03 +0100 + +ngircd (23~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 23. + + -- Alexander Barton <alex@barton.de> Sun, 06 Sep 2015 16:55:23 +0200 + +ngircd (22.1-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 22.1. + + -- Alexander Barton <alex@barton.de> Mon, 06 Apr 2015 14:34:50 +0200 + +ngircd (22-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 22. + + -- Alexander Barton <alex@barton.de> Sat, 11 Oct 2014 20:29:03 +0200 + +ngircd (22~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 22. + + -- Alexander Barton <alex@barton.de> Mon, 29 Sep 2014 17:07:55 +0200 + +ngircd (21.1-0ab2) unstable; urgency=low + + * Use correct package name in pathname to "HelpFile" (Command.txt) + in "ngircd-full" and "ngircd-full-dbg" packages. + * Don't adjust path names that are correct by default. + + -- Alexander Barton <alex@barton.de> Mon, 14 Jul 2014 11:20:17 +0200 + +ngircd (21.1-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 21.1. + + -- Alexander Barton <alex@barton.de> Tue, 25 Mar 2014 14:44:59 +0100 + +ngircd (21-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 21. + + -- Alexander Barton <alex@barton.de> Wed, 30 Oct 2013 22:13:55 +0100 + +ngircd (21~rc2-0ab3) unstable; urgency=low + + * Fix sed(1) rules adjusting "ngircd-full" package, error introduced + by last commit :-/ + + -- Alexander Barton <alex@barton.de> Sun, 20 Oct 2013 18:31:16 +0200 + +ngircd (21~rc2-0ab2) unstable; urgency=low + + * Fix default "HelpFile" file name in ngircd.conf for "full" packages. + + -- Alexander Barton <alex@barton.de> Sun, 20 Oct 2013 17:18:28 +0200 + +ngircd (21~rc2-0ab1) unstable; urgency=low + + * New "upstream" release candidate 2 for ngIRCd Release 21. + + -- Alexander Barton <alex@barton.de> Sun, 20 Oct 2013 15:50:03 +0200 + +ngircd (21~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 21. + + -- Alexander Barton <alex@barton.de> Sat, 05 Oct 2013 23:24:09 +0200 + +ngircd (20.3-0ab1) unstable; urgency=high + + * New "upstream" release, fixing a security related bug: ngIRCd 20.3. + + -- Alexander Barton <alex@barton.de> Fri, 23 Aug 2013 21:53:21 +0200 + +ngircd (20.2-0ab1) unstable; urgency=high + + * New "upstream" release, fixing a security related bug: ngIRCd 20.2. + + -- Alexander Barton <alex@barton.de> Fri, 15 Feb 2013 12:17:00 +0100 + +ngircd (20.1-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 20.1. + + -- Alexander Barton <alex@barton.de> Wed, 02 Jan 2013 22:37:26 +0100 + +ngircd (20-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 20. + + -- Alexander Barton <alex@barton.de> Mon, 17 Dec 2012 13:04:15 +0100 + +ngircd (20~rc2-0ab1) unstable; urgency=low + + * New "upstream" release candidate 2 for ngIRCd Release 20. + + -- Alexander Barton <alex@barton.de> Sun, 02 Dec 2012 18:51:06 +0100 + +ngircd (20~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 20. + + -- Alexander Barton <alex@barton.de> Sun, 11 Nov 2012 16:03:32 +0100 + +ngircd (19.2-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 19.2. + + -- Alexander Barton <alex@barton.de> Tue, 19 Jun 2012 11:03:12 +0200 + +ngircd (19.2~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRC Release 19.2. + + -- Alexander Barton <alex@barton.de> Wed, 13 Jun 2012 10:59:34 +0200 + +ngircd (19.1-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 19.1. + + -- Alexander Barton <alex@barton.de> Mon, 19 Mar 2012 19:18:28 +0100 + +ngircd (19-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 19. + + -- Alexander Barton <alex@barton.de> Wed, 29 Feb 2012 17:34:08 +0100 + +ngircd (19~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 19. + + -- Alexander Barton <alex@barton.de> Sun, 12 Feb 2012 17:47:51 +0100 + +ngircd (18-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 18. + + -- Alexander Barton <alex@barton.de> Sun, 10 Jul 2011 20:03:20 +0200 + +ngircd (18~rc2-0ab1) unstable; urgency=low + + * New "upstream" release candidate 2 for ngIRCd Release 18. + + -- Alexander Barton <alex@barton.de> Wed, 29 Jun 2011 10:20:51 +0200 + +ngircd (18~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 18. + + -- Alexander Barton <alex@barton.de> Mon, 27 Jun 2011 22:58:36 +0200 + +ngircd (17.1-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 17.1. + + -- Alexander Barton <alex@barton.de> Sun, 19 Dec 2010 15:56:42 +0100 + +ngircd (17-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 17. + + -- Alexander Barton <alex@barton.de> Sun, 07 Nov 2010 17:23:07 +0100 + +ngircd (17~rc3-0ab1) unstable; urgency=low + + * New "upstream" release candidate 3 for ngIRCd Release 17. + + -- Alexander Barton <alex@barton.de> Wed, 27 Oct 2010 22:30:08 +0200 + +ngircd (17~rc2-0ab2) unstable; urgency=low + + * Install /etc/pam.d/ngircd including "auth required pam_permit.so" when + installing -full or -full-dbg variant to keep backwards compatibility. + + -- Alexander Barton <alex@barton.de> Tue, 26 Oct 2010 23:34:56 +0200 + +ngircd (17~rc2-0ab1) unstable; urgency=low + + * New "upstream" release candidate 2 for ngIRCd Release 17. + + -- Alexander Barton <alex@barton.de> Mon, 25 Oct 2010 18:51:15 +0200 + +ngircd (17~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 17. + + -- Alexander Barton <alex@barton.de> Mon, 11 Oct 2010 16:57:47 +0200 + +ngircd (16-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 16. + + -- Alexander Barton <alex@barton.de> Sun, 02 May 2010 13:32:41 +0200 + +ngircd (16~rc2-0ab1) unstable; urgency=low + + * New "upstream" release candidate 2 for ngIRCd Release 16. + + -- Alexander Barton <alex@barton.de> Sun, 25 Apr 2010 13:12:42 +0200 + +ngircd (16~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 16. + + -- Alexander Barton <alex@barton.de> Thu, 25 Mar 2010 15:56:03 +0200 + +ngircd (15-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 15. + + -- Alexander Barton <alex@barton.de> Thu, 7 Nov 2009 12:07:08 +0200 + +ngircd (15~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 15. + + -- Alexander Barton <alex@barton.de> Thu, 15 Oct 2009 10:01:08 +0200 + +ngircd (14.1-0ab1) unstable; urgency=high + + * New "upstream" release ngIRCd 14.1, fixing a security-related bug. + + -- Alexander Barton <alex@barton.de> Tue, 5 May 2009 13:13:38 +0200 + +ngircd (14-0ab3) unstable; urgency=low + + * Fixed "Conflicts:" line in debian/control: missing comma. + + -- Alexander Barton <alex@barton.de> Mon, 4 May 2009 11:21:55 +0200 + +ngircd (14-0ab2) unstable; urgency=low + + * Add new "ngircd-full-dbg" package including degug code and both + the --debug and --sniffer options, and containing debug symbols. + + -- Alexander Barton <alex@barton.de> Wed, 29 Apr 2009 01:13:03 +0200 + +ngircd (14-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 14. + + -- Alexander Barton <alex@barton.de> Mon, 20 Apr 2009 11:09:12 +0200 + +ngircd (14~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 14. + + -- Alexander Barton <alex@barton.de> Sun, 29 Mar 2009 17:09:17 +0200 + +ngircd (13-0ab1) unstable; urgency=low + + * New "upstream" release: ngIRCd 13. + + -- Alexander Barton <alex@barton.de> Thu, 25 Dec 2008 23:09:58 +0100 + +ngircd (13~rc1-0ab1) unstable; urgency=low + + * New "upstream" release candidate 1 for ngIRCd Release 13. + + -- Alexander Barton <alex@barton.de> Fri, 21 Nov 2008 22:04:41 +0100 + +ngircd (0.12.1-0ab1+dev) unstable; urgency=low + + * Update package for testing the new "upstream" features: + - Support for IRC services (see http://www.ircservices.za.net), + - Encrypted connections using GNU TLS (ngircd-full), + - Support for the IPv6 protocol (ngircd-full). + + -- Alexander Barton <alex@barton.de> Fri, 03 Oct 2008 16:22:55 +0200 + +ngircd (0.12.1-0ab1) unstable; urgency=low + + * New "upstream" release ngIRCd 0.12.1. + + -- Alexander Barton <alex@barton.de> Wed, 9 Jul 2008 11:27:00 +0200 + +ngircd (0.12.0-0ab1) unstable; urgency=low + + * New "upstream" release ngIRCd 0.12.0. + + -- Alexander Barton <alex@barton.de> Tue, 13 May 2008 12:30:31 +0200 + +ngircd (0.12.0-0ab0-pre2) unstable; urgency=low + + * Second prerelease of upcoming new "upstrem" release 0.12.0-pre1. + + -- Alexander Barton <alex@barton.de> Tue, 29 Apr 2008 23:06:14 +0200 + +ngircd (0.12.0-0ab0-pre1) unstable; urgency=low + + * Prereloease of upcoming new "upstrem" release 0.12.0-pre1. + + -- Alexander Barton <alex@barton.de> Sun, 20 Apr 2008 15:43:34 +0200 + +ngircd (0.11.0-0ab0-pre2) unstable; urgency=low + + * Second prerelease of upcoming new "upstream release". + + -- Alexander Barton <alex@barton.de> Mon, 7 Jan 2008 15:32:42 +0100 + +ngircd (0.11.0-0ab0-pre1) unstable; urgency=low + + * Prerelease of upcoming new "upstream release". + + -- Alexander Barton <alex@barton.de> Wed, 2 Jan 2008 21:33:15 +0100 + +ngircd (0.10.4-0ab1) unstable; urgency=high + + * New "upstream" release: 0.10.4 - fixing a security bug. + + -- Alexander Barton <alex@barton.de> Mon, 7 Jan 2008 22:04:44 +0100 + +ngircd (0.10.0-0ab1) unstable; urgency=low + + * New "upstream" release: 0.10.0 + + -- Alexander Barton <alex@barton.de> Sun, 1 Oct 2006 18:14:21 +0200 + +ngircd (0.10.0-0ab0-pre2-1) unstable; urgency=low + + * Bumped standards version to 3.7.2.1. + * Added "Provides: ircd" to Debian control file. + + -- Alexander Barton <alex@barton.de> Sun, 1 Oct 2006 16:25:33 +0200 + +ngircd (0.10.0-0ab0-pre2) unstable; urgency=low + + * Second "upstream" prerelease of upcoming 0.10.0 release. + + -- Alexander Barton <alex@barton.de> Sat, 9 Sep 2006 20:57:52 +0200 + +ngircd (0.10.0-0ab0-pre1) unstable; urgency=low + + * Prerelease of upcoming new "upstream release". + + -- Alexander Barton <alex@barton.de> Wed, 2 Aug 2006 12:01:07 +0200 + +ngircd (0.9.2-0ab1) unstable; urgency=low + + * New "upstream release" fixing a few bugs in 0.9.1. + + -- Alexander Barton <alex@barton.de> Sat, 15 Oct 2005 14:10:34 +0200 + +ngircd (0.9.1-0ab1) unstable; urgency=medium + + * New "upstream release" addressing two problems in ngIRCd 0.9.0. + + -- Alexander Barton <alex@barton.de> Wed, 3 Aug 2005 15:10:41 +0200 + +ngircd (0.9.0-0ab2) unstable; urgency=medium + + * Init script: fixed a problem with symbolic links in runlevel directories + that could prevent the init script from working correctly. + + -- Alexander Barton <alex@barton.de> Tue, 26 Jul 2005 21:31:18 +0200 + +ngircd (0.9.0-0ab1) unstable; urgency=low + + * New "upstream release". + + -- Alexander Barton <alex@Arthur.Ath.CX> Sat, 24 Jul 2005 23:30:00 +0200 + +ngircd (0.8.3-0ab1) unstable; urgency=high + + * New "upstream release", including security fixes. + + -- Alexander Barton <alex@Arthur.Ath.CX> Thu, 3 Feb 2005 10:41:55 +0100 + +ngircd (0.8.2-0ab1) unstable; urgency=high + + * New "upstream release", including security fixes. + + -- Alexander Barton <alex@Arthur.Ath.CX> Wed, 26 Jan 2005 23:14:12 +0100 + +ngircd (0.8.1-0ab1) unstable; urgency=low + + * New "upstream release". + + -- Alexander Barton <alex@Arthur.Ath.CX> Sat, 25 Dec 2004 01:18:32 +0100 + +ngircd (0.8.0-0ab2) unstable; urgency=low + + * Added missing commas to debian control file, fixes bug #56. + Thanks to Kevin Otte. + + -- Alexander Barton <alex@Arthur.Ath.CX> Thu, 15 Jul 2004 10:53:39 +0200 + +ngircd (0.8.0-0ab1) unstable; urgency=low + + * New upstream version. + + -- Alexander Barton <alex@Arthur.Ath.CX> Sat, 26 Jun 2004 11:25:59 +0200 + +ngircd (0.7.7+HEAD-0ab6) unstable; urgency=low + + * Incorporated actual CVS HEAD version which includes all features of + version 0.8.0-pre1 and patches for the resolver and logger. + + -- Alexander Barton <alex@Arthur.Ath.CX> Tue, 11 May 2004 02:18:50 +0200 + +ngircd (0.7.7+HEAD-0ab5) unstable; urgency=low + + * Updates from CVS HEAD branch, most notably: "INVITE- and BAN-lists + become synchronized between IRC+ servers when establishing new + connections, if the peer supports this as well." + + -- Alexander Barton <alex@Arthur.Ath.CX> Mon, 26 Apr 2004 01:53:15 +0200 + +ngircd (0.7.7+HEAD-0ab4) unstable; urgency=low + + * This version includes fixes for INVITE command and the handling of the + invite and ban lists from CVS-HEAD. + + -- Alexander Barton <alex@Arthur.Ath.CX> Fri, 9 Apr 2004 23:55:13 +0200 + +ngircd (0.7.7+HEAD-0ab3) unstable; urgency=low + + * Included MODE fix from CVS-HEAD branch. + + -- Alexander Barton <alex@Arthur.Ath.CX> Mon, 5 Apr 2004 13:09:24 +0200 + +ngircd (0.7.7+HEAD-0ab2) unstable; urgency=low + + * Incorporated more fixes and enhancements of CVS-HEAD version, + e. g. better connection logging and fixed TRACE command. + + -- Alexander Barton <alex@Arthur.Ath.CX> Sat, 28 Feb 2004 03:20:32 +0100 + +ngircd (0.7.7+HEAD-0ab1) unstable; urgency=low + + * New upstream version. This debian package includes all features of + ngIRCd 0.7.7 and changes of the CVS-HEAD development tree. + + -- Alexander Barton <alex@Arthur.Ath.CX> Thu, 5 Feb 2004 15:23:22 +0100 + +ngircd (0.7.6+HEAD-0ab2) unstable; urgency=low + + * Included new fixes and additions from the CVS-HEAD upstream branch, + e. g. the setting of type of service (TOS) on sockets. + + -- Alexander Barton <alex@Arthur.Ath.CX> Mon, 26 Jan 2004 04:05:41 +0100 + +ngircd (0.7.6+HEAD-0ab1) unstable; urgency=low + + * Included all changes from the CVS-HEAD upstream version. + * Restructured debian packaging system: now there are two packages, a + "standard" version that includes all the default options and a "full" + version that additionally includes support for TCP wrappers and IDENT + lookups. + + -- Alexander Barton <alex@Arthur.Ath.CX> Thu, 1 Jan 2004 23:12:11 +0100 + +ngircd (0.7.6-0ab1) unstable; urgency=medium + + * New upstream version. + * Changed version numvering scheme of debian package. + + -- Alexander Barton <alex@Arthur.Ath.CX> Fri, 5 Dec 2003 14:26:41 +0100 + +ngircd (0.7.5-0.2ab) unstable; urgency=low + + * Updated RPM and Debian package description and configuration. + + -- Alexander Barton <alex@Arthur.Ath.CX> Sat, 29 Nov 2003 21:24:32 +0100 + +ngircd (0.7.5-0.1ab) unstable; urgency=low + + * New upstream version. + + -- Alexander Barton <alex@Arthur.Ath.CX> Fri, 7 Nov 2003 21:59:58 +0100 + +ngircd (0.7.1-0.1ab) unstable; urgency=low + + * New upstream version :-) + + -- Alexander Barton <alex@Arthur.Ath.CX> Fri, 18 Jul 2003 22:53:02 +0200 + +ngircd (0.7.0-0.7ab) unstable; urgency=low + + * Fixed up post installation script (added interpreter, fixed chmod call). + + -- Alexander Barton <alex@Arthur.Ath.CX> Sun, 13 Jul 2003 00:52:38 +0200 + +ngircd (0.7.0-0.6ab) unstable; urgency=low + + * Added /etc/default/ngircd. + * Included own post installation script. + + -- Alexander Barton <alex@Arthur.Ath.CX> Sat, 12 Jul 2003 20:31:09 +0200 + +ngircd (0.7.0-0.5ab) unstable; urgency=low + + * Enhanced init script. + * Included NJOIN fix from actual CVS "HEAD" branch. + + -- Alexander Barton <alex@Arthur.Ath.CX> Wed, 9 Jul 2003 22:40:49 +0200 + +ngircd (0.7.0-0.4ab) unstable; urgency=low + + * Reverted use of dh_installexamples. + + -- Alexander Barton <alex@Arthur.Ath.CX> Thu, 22 May 2003 00:15:03 +0200 + +ngircd (0.7.0-0.3ab) unstable; urgency=low + + * Removed "debian/docs" and "debian/conffiles"; debhelper takes care of + this for us automagically. + * Excluded "etc/ngircd.conf" from dh_fixperms. + + -- Alexander Barton <alex@Arthur.Ath.CX> Wed, 21 May 2003 23:25:05 +0200 + +ngircd (0.7.0-0.2ab) unstable; urgency=low + + * Fixed wrong variable substitution in init script. + * Added some CVS "Id-Tags" (but not checked in, yet). + * Removed own "Provides:" from control file. + + -- Alexander Barton <alex@barton.de> Wed, 21 May 2003 12:32:34 +0200 + +ngircd (0.7.0-0.1ab) unstable; urgency=low + + * Initial Release. + + -- Alexander Barton <alex@barton.de> Wed, 21 May 2003 02:36:52 +0200 diff --git a/deprecated-ngircd/contrib/Debian/control b/deprecated-ngircd/contrib/Debian/control new file mode 100644 index 0000000..e05ae64 --- /dev/null +++ b/deprecated-ngircd/contrib/Debian/control @@ -0,0 +1,46 @@ +Source: ngircd +Section: net +Priority: optional +Maintainer: Alexander Barton <alex@barton.de> +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}, +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 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 :-) + . + This package is built with support for all optional features and uses the + OpenSSL library for SSL/TLS support. diff --git a/deprecated-ngircd/contrib/Debian/copyright b/deprecated-ngircd/contrib/Debian/copyright new file mode 100644 index 0000000..4b39bfa --- /dev/null +++ b/deprecated-ngircd/contrib/Debian/copyright @@ -0,0 +1,58 @@ +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> + +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. + +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. + +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". + +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. diff --git a/deprecated-ngircd/contrib/Debian/ngircd.default b/deprecated-ngircd/contrib/Debian/ngircd.default new file mode 100644 index 0000000..062d376 --- /dev/null +++ b/deprecated-ngircd/contrib/Debian/ngircd.default @@ -0,0 +1,7 @@ +# +# Defaults for the ngIRCd daemon +# + +# Parameters to pass to the ngircd daemon on startup, see ngircd(8) for +# possible options (default: empty). +PARAMS="" diff --git a/deprecated-ngircd/contrib/Debian/ngircd.pam b/deprecated-ngircd/contrib/Debian/ngircd.pam new file mode 100644 index 0000000..9d2f6d5 --- /dev/null +++ b/deprecated-ngircd/contrib/Debian/ngircd.pam @@ -0,0 +1,10 @@ +# /etc/pam.d/ngircd + +# 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 diff --git a/deprecated-ngircd/contrib/Debian/rules b/deprecated-ngircd/contrib/Debian/rules new file mode 100755 index 0000000..561f765 --- /dev/null +++ b/deprecated-ngircd/contrib/Debian/rules @@ -0,0 +1,72 @@ +#!/usr/bin/make -f + +# 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 + +# Install the fail2ban configuration. + install -o root -g root -m 0644 -D \ + $(CURDIR)/contrib/ngircd-fail2ban.conf \ + $(CURDIR)/debian/ngircd/etc/fail2ban/filter.d/ngircd.conf + +# 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 diff --git a/deprecated-ngircd/contrib/Debian/source/format b/deprecated-ngircd/contrib/Debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/deprecated-ngircd/contrib/Debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/deprecated-ngircd/contrib/Debian/watch b/deprecated-ngircd/contrib/Debian/watch new file mode 100644 index 0000000..7943e69 --- /dev/null +++ b/deprecated-ngircd/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@ diff --git a/deprecated-ngircd/contrib/Dockerfile b/deprecated-ngircd/contrib/Dockerfile new file mode 100644 index 0000000..de4cc37 --- /dev/null +++ b/deprecated-ngircd/contrib/Dockerfile @@ -0,0 +1,68 @@ +# 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 +LABEL org.opencontainers.image.source=https://github.com/ngircd/ngircd +LABEL org.opencontainers.image.description="Free, portable and lightweight Internet Relay Chat server (build container)" +LABEL org.opencontainers.image.licenses=GPL-2.0-or-later +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 +LABEL org.opencontainers.image.source=https://github.com/ngircd/ngircd +LABEL org.opencontainers.image.description="Free, portable and lightweight Internet Relay Chat server" +LABEL org.opencontainers.image.licenses=GPL-2.0-or-later +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" ] diff --git a/deprecated-ngircd/contrib/Makefile.am b/deprecated-ngircd/contrib/Makefile.am new file mode 100644 index 0000000..cd2eb05 --- /dev/null +++ b/deprecated-ngircd/contrib/Makefile.am @@ -0,0 +1,33 @@ +# +# ngIRCd -- The Next Generation IRC Daemon +# 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 +# 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 = Debian + +EXTRA_DIST = README.md \ + de.barton.ngircd.metainfo.xml \ + de.barton.ngircd.plist \ + Dockerfile \ + ngindent.sh \ + ngircd-bsd.sh \ + ngircd-fail2ban.conf \ + ngIRCd-Logo.gif \ + ngircd-redhat.init \ + ngircd.logcheck \ + ngircd.service \ + ngircd.socket \ + ngircd.spec \ + nglog.sh \ + platformtest.sh + +maintainer-clean-local: + rm -f Makefile Makefile.in + +# -eof- diff --git a/deprecated-ngircd/contrib/README.md b/deprecated-ngircd/contrib/README.md new file mode 100644 index 0000000..5ab5769 --- /dev/null +++ b/deprecated-ngircd/contrib/README.md @@ -0,0 +1,40 @@ +# [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-fail2ban.conf`: fail2ban(1) filter configuration for ngIRCd. + +- `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. diff --git a/deprecated-ngircd/contrib/de.barton.ngircd.metainfo.xml b/deprecated-ngircd/contrib/de.barton.ngircd.metainfo.xml new file mode 100644 index 0000000..d06e378 --- /dev/null +++ b/deprecated-ngircd/contrib/de.barton.ngircd.metainfo.xml @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="UTF-8"?> +<component type="service"> + <id>de.barton.ngircd</id> + <name>ngIRCd</name> + <summary>Lightweight Internet Relay Chat server</summary> + <metadata_license>MIT</metadata_license> + <project_license>GPL-2.0-or-later</project_license> + <developer_name>Alexander Barton and Contributors</developer_name> + <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 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> + <category>Network</category> + </categories> + <url type="homepage">https://ngircd.barton.de</url> + <url type="bugtracker">https://ngircd.barton.de/bugtracker</url> + <url type="help">https://ngircd.barton.de/support</url> + <provides> + <binary>ngircd</binary> + </provides> + <launchable type="service">ngircd</launchable> + <releases> + <release version="27" date="2024-04-26" /> + <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" /> + <release version="26~rc1" date="2020-05-10" type="development" /> + <release version="25" date="2019-01-23" /> + <release version="25~rc1" date="2018-08-11" type="development" /> + <release version="24" date="2017-01-20" /> + <release version="24~rc1" date="2017-01-07" type="development" /> + <release version="23" date="2015-11-16" /> + <release version="23~rc1" date="2015-09-06" type="development" /> + <release version="22.1" date="2015-04-06" /> + <release version="22" date="2014-10-11" /> + <release version="22~rc1" date="2014-09-29" type="development" /> + <release version="21.1" date="2014-03-25" /> + <release version="21" date="2013-10-30" /> + <release version="21~rc2" date="2013-10-20" type="development" /> + <release version="21~rc1" date="2013-10-05" type="development" /> + <release version="20.3" date="2013-08-23" /> + <release version="20.2" date="2013-02-15" /> + <release version="20.1" date="2013-01-02" /> + <release version="20" date="2012-12-17" /> + <release version="20~rc2" date="2012-12-02" type="development" /> + <release version="20~rc1" date="2012-11-11" type="development" /> + <release version="19.2" date="2012-06-19" /> + <release version="19.2~rc1" date="2012-06-13" type="development" /> + <release version="19.1" date="2012-03-19" /> + <release version="19" date="2012-02-29" /> + <release version="19~rc1" date="2012-02-12" type="development" /> + <release version="18" date="2011-07-10" /> + <release version="18~rc2" date="2011-06-29" type="development" /> + <release version="18~rc1" date="2011-06-27" type="development" /> + <release version="17.1" date="2010-12-19" /> + <release version="17" date="2010-11-07" /> + <release version="17~rc3" date="2010-10-27" type="development" /> + <release version="17~rc2" date="2010-10-25" type="development" /> + <release version="17~rc1" date="2010-10-11" type="development" /> + <release version="16" date="2010-05-02" /> + <release version="16~rc2" date="2010-04-25" type="development" /> + <release version="16~rc1" date="2010-03-25" type="development" /> + <release version="15" date="2009-11-07" /> + <release version="15~rc1" date="2009-10-15" type="development" /> + <release version="14.1" date="2009-05-05" /> + <release version="14" date="2009-04-20" /> + <release version="14~rc1" date="2009-03-29" type="development" /> + <release version="13" date="2008-12-25" /> + <release version="0.12.1" date="2008-07-09" /> + <release version="0.12.0" date="2008-05-13" /> + <release version="0.12.0-pre2" date="2008-04-29" type="development" /> + <release version="0.12.0-pre1" date="2008-04-20" type="development" /> + <release version="0.11.1" date="2008-02-26" /> + <release version="0.11.0" date="2008-01-15" /> + <release version="0.11.0-pre2" date="2008-01-07" type="development" /> + <release version="0.11.0-pre1" date="2008-01-02" type="development" /> + <release version="0.10.4" date="2008-01-07" /> + <release version="0.10.3" date="2007-08-01" /> + <release version="0.10.2" date="2007-06-08" /> + <release version="0.10.2-pre2" date="2007-05-19" type="development" /> + <release version="0.10.2-pre1" date="2007-05-05" type="development" /> + <release version="0.10.1" date="2006-12-17" /> + <release version="0.10.0" date="2006-10-01" /> + <release version="0.10.0-pre2" date="2006-09-09" type="development" /> + <release version="0.10.0-pre1" date="2006-08-02" type="development" /> + <release version="0.9.2" date="2005-10-15" /> + <release version="0.9.1" date="2005-08-03" /> + <release version="0.9.0" date="2005-07-24" /> + <release version="0.9.0-pre1" date="2005-07-09" type="development" /> + <release version="0.8.3" date="2005-02-03" /> + <release version="0.8.2" date="2005-01-26" /> + <release version="0.8.1" date="2004-12-25" /> + <release version="0.8.0" date="2004-06-26" /> + <release version="0.8.0-pre1" date="2004-05-07" type="development" /> + <release version="0.7.7" date="2004-02-05" /> + <release version="0.7.6" date="2003-12-05" /> + <release version="0.7.5" date="2003-11-07" /> + <release version="0.7.1" date="2003-07-18" /> + <release version="0.7.0" date="2003-05-01" /> + <release version="0.7.0-pre2" date="2003-04-27" type="development" /> + <release version="0.7.0-pre1" date="2003-04-22" type="development" /> + <release version="0.6.0" date="2002-12-24" /> + <release version="0.6.0-pre2" date="2002-12-23" type="development" /> + <release version="0.6.0-pre1" date="2002-12-18" type="development" /> + <release version="0.5.4" date="2002-11-24" /> + <release version="0.5.3" date="2002-11-08" /> + <release version="0.5.2" date="2002-10-04" /> + <release version="0.5.1" date="2002-10-03" /> + <release version="0.5.0" date="2002-09-20" /> + <release version="0.5.0-pre2" date="2002-09-17" type="development" /> + <release version="0.5.0-pre1" date="2002-09-16" type="development" /> + <release version="0.4.3" date="2002-06-11" /> + <release version="0.4.2" date="2002-04-29" /> + <release version="0.4.1" date="2002-04-08" /> + <release version="0.4.0" date="2002-04-01" /> + <release version="0.3.0" date="2002-03-02" /> + <release version="0.2.1" date="2002-02-17" /> + <release version="0.2.0" date="2002-02-15" /> + <release version="0.1.0" date="2002-01-29" /> + <release version="0.0.3" date="2002-01-16" /> + <release version="0.0.2" date="2002-01-06" /> + <release version="0.0.1" date="2001-12-31" /> + </releases> +</component> diff --git a/deprecated-ngircd/contrib/de.barton.ngircd.plist b/deprecated-ngircd/contrib/de.barton.ngircd.plist new file mode 100644 index 0000000..38754b5 --- /dev/null +++ b/deprecated-ngircd/contrib/de.barton.ngircd.plist @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Disabled</key> + <true/> + <key>KeepAlive</key> + <true/> + <key>Label</key> + <string>de.barton.ngIRCd</string> + <key>ProgramArguments</key> + <array> + <string>/opt/ngircd/sbin/ngircd</string> + <string>--nodaemon</string> + </array> + <key>RunAtLoad</key> + <true/> + <key>StandardErrorPath</key> + <string>/Library/Logs/ngIRCd.log</string> + <key>StandardOutPath</key> + <string>/Library/Logs/ngIRCd.log</string> +</dict> +</plist> diff --git a/deprecated-ngircd/contrib/ngIRCd-Logo.gif b/deprecated-ngircd/contrib/ngIRCd-Logo.gif Binary files differnew file mode 100644 index 0000000..9fc6d14 --- /dev/null +++ b/deprecated-ngircd/contrib/ngIRCd-Logo.gif diff --git a/deprecated-ngircd/contrib/ngindent.sh b/deprecated-ngircd/contrib/ngindent.sh new file mode 100755 index 0000000..57cbf81 --- /dev/null +++ b/deprecated-ngircd/contrib/ngindent.sh @@ -0,0 +1,46 @@ +#!/bin/sh +# +# ngIRCd -- The Next Generation IRC Daemon +# Copyright (c)2001-2019 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. +# +# This script uses GNU indent(1) to format C source code files of ngIRCd. +# Usage: +# - ./contrib/ngindent.sh [<file> [<file> [...]]] +# - cat ./src/ngircd/<c_file> | ./contrib/ngindent.sh + +# Use a coding-style based on "Kernighan & Ritchie" (-kr): +INDENTARGS="-kr + -bad + -c3 + -cd41 + -i8 + -l80 + -ncs + -psl + -sob + -ss + -ts8 + -blf + -il0 +" + +# check if indent(1) is available +command -v indent >/dev/null 2>&1 && INDENT="indent" +command -v gindent >/dev/null 2>&1 && INDENT="gindent" +command -v gnuindent >/dev/null 2>&1 && INDENT="gnuindent" + +if [ -z "$INDENT" ]; then + echo "Error: GNU \"indent\" not found!" + exit 1 +fi + +# shellcheck disable=SC2086 +$INDENT -v $INDENTARGS "$@" + +# -eof- diff --git a/deprecated-ngircd/contrib/ngircd-bsd.sh b/deprecated-ngircd/contrib/ngircd-bsd.sh new file mode 100755 index 0000000..e085646 --- /dev/null +++ b/deprecated-ngircd/contrib/ngircd-bsd.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# PROVIDE: ngircd +# REQUIRE: NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: FreeBSD shutdown + +# Add the following line to /etc/rc.conf to enable `ngircd': +# +#ngircd_enable="YES" +# + +. "/etc/rc.subr" + +name="ngircd" +rcvar=`set_rcvar` + +command="/usr/local/sbin/ngircd" +command_args="" + +load_rc_config "$name" +: ${ngircd_enable="NO"} +: ${ngircd_flags=""} + +required_files="/usr/local/etc/$name.conf" +pidfile="${ngircd_pidfile:-/var/run/${name}/${name}.pid}" + +if [ ! x"${ngircd_chrootdir}" = x ];then + # Mount a devfs in the chroot directory if needed + if [ ! -c ${ngircd_chrootdir}/dev/random \ + -o ! -c ${ngircd_chrootdir}/dev/null ]; then + umount ${ngircd_chrootdir}/dev 2>/dev/null + mount_devfs devfs ${ngircd_chrootdir}/dev + fi + + devfs -m ${ngircd_chrootdir}/dev rule apply hide + devfs -m ${ngircd_chrootdir}/dev rule apply path null unhide + devfs -m ${ngircd_chrootdir}/dev rule apply path random unhide + + # Copy local timezone information if it is not up to date. + if [ -f /etc/localtime ]; then + cmp -s /etc/localtime "${named_chrootdir}/etc/localtime" || \ + cp -p /etc/localtime "${named_chrootdir}/etc/localtime" + fi + + pidfile="${ngircd_chrootdir}${pidfile}" +fi + +run_rc_command "$1" + +# -eof- diff --git a/deprecated-ngircd/contrib/ngircd-fail2ban.conf b/deprecated-ngircd/contrib/ngircd-fail2ban.conf new file mode 100644 index 0000000..c9903e0 --- /dev/null +++ b/deprecated-ngircd/contrib/ngircd-fail2ban.conf @@ -0,0 +1,25 @@ +# Fail2ban filter for ngIRCd +# +# Put into /etc/fail2ban/filter.d/ngircd.conf and enable in your jail.local +# configuration like this: +# +# [ngircd] +# enabled = true +# backend = systemd +# + +[INCLUDES] + +before = common.conf + +[DEFAULT] + +_daemon = ngircd + +[Definition] + +failregex = ^%(__prefix_line)sRefused connection from <ADDR> on socket \d+: + +[Init] + +journalmatch = _SYSTEMD_UNIT=ngircd.service + _COMM=ngircd diff --git a/deprecated-ngircd/contrib/ngircd-redhat.init b/deprecated-ngircd/contrib/ngircd-redhat.init new file mode 100755 index 0000000..9f133bd --- /dev/null +++ b/deprecated-ngircd/contrib/ngircd-redhat.init @@ -0,0 +1,119 @@ +#!/bin/sh +# +# ngIRCd start and stop script for RedHat based distributions. +# Written by Naoya Nakazawa <naoya.n@gmail.com> for CentOS 5.2, 2009. +# +# chkconfig: 2345 01 +# description: ngIRCd is an Open Source server for \ +# the Internet Relay Chat (IRC), which \ +# is developed and published under \ +# the terms of the GNU General Public +# Licence (URL: http://www.gnu.org/licenses/gpl.html). \ +# ngIRCd means "next generation IRC daemon", \ +# it's written from scratch and not deduced from the \ +# "grandfather of IRC daemons", the daemon of the IRCNet. +# +# processname: /usr/sbin/ngircd +# config: /etc/ngircd +# pidfile: /var/run/ngircd.pid + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/ngircd +NAME=ngIRCd +BASENAME=ngircd +CONF=/etc/$BASENAME.conf +DESC="IRC daemon" +PARAMS="-f $CONF" + +# Source function library. +. /etc/init.d/functions + +# Get config. +test -f /etc/sysconfig/network && . /etc/sysconfig/network +test -f /etc/sysconfig/makuosan && . /etc/sysconfig/makuosan + +# Check that networking is up. +[ "${NETWORKING}" = "yes" ] || exit 0 + +[ -x $DAEMON ] || exit 1 +[ -f $CONF ] || exit 2 + +RETVAL=0 + +start(){ + echo -n $"Starting $NAME: " + daemon $DAEMON $PARAMS + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$BASENAME + echo + return $RETVAL +} + +stop(){ + echo -n $"Stopping $NAME: " + killproc $DAEMON + RETVAL=$? + if [ $RETVAL -eq 0 ] ; then + rm -f /var/lock/subsys/$BASENAME + fi + echo + return $RETVAL +} + +reload(){ + echo -n $"Reloading configuration: " + killproc $DAEMON -HUP + RETVAL=$? + echo + return $RETVAL +} + +restart(){ + stop + start +} + +condrestart(){ + [ -e /var/lock/subsys/$BASENAME ] && restart + return 0 +} + +check_config(){ + $DAEMON $PARAMS --configtest >/dev/null 2>&1 + [ $? -eq 0 ] && return 0 + + echo -n $"Configuration of $NAME is not valid, won't (re)start!" + echo -n $"Run \"$DAEMON --configtest\" and fix it up ..." + exit 6 +} + +# See how we were called. +case "$1" in + start) + check_config + start + ;; + stop) + stop + ;; + status) + status $NAME + ;; + restart) + restart + ;; + reload) + reload + ;; + condrestart) + condrestart + ;; + test) + check_config + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|test}" + RETVAL=1 +esac + +exit $RETVAL diff --git a/deprecated-ngircd/contrib/ngircd.logcheck b/deprecated-ngircd/contrib/ngircd.logcheck new file mode 100644 index 0000000..598ed17 --- /dev/null +++ b/deprecated-ngircd/contrib/ngircd.logcheck @@ -0,0 +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]+\]: 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]+\]: 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]+\]: 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 \".*\" \(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|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|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$ diff --git a/deprecated-ngircd/contrib/ngircd.service b/deprecated-ngircd/contrib/ngircd.service new file mode 100644 index 0000000..311bc0d --- /dev/null +++ b/deprecated-ngircd/contrib/ngircd.service @@ -0,0 +1,48 @@ +# ngIRCd systemd service unit. +# See systemd(1), systemd.unit(5), systemd.service(5), systemd.exec(5). + +[Unit] +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 hopm.service +Before=anope.service atheme.service irc-services.service +Before=bopm.service hopm.service + +[Service] +Type=notify +User=irc +Group=irc +# Settings & limits: +CapabilityBoundingSet=CAP_SYS_CHROOT CAP_NET_BIND_SERVICE +MemoryDenyWriteExecute=yes +NoNewPrivileges=yes +PrivateDevices=yes +PrivateTmp=yes +ProtectControlGroups=yes +ProtectHome=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +ProtectSystem=full +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 --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] +WantedBy=multi-user.target diff --git a/deprecated-ngircd/contrib/ngircd.socket b/deprecated-ngircd/contrib/ngircd.socket new file mode 100644 index 0000000..1aee546 --- /dev/null +++ b/deprecated-ngircd/contrib/ngircd.socket @@ -0,0 +1,12 @@ +[Unit] +Description=Next Generation IRC Daemon (Socket) +Documentation=man:ngircd(8) man:ngircd.conf(5) + +[Socket] +BindIPv6Only=ipv6-only +ListenStream=0.0.0.0:6667 +#ListenStream=[::]:6667 +IPTOS=low-delay + +[Install] +WantedBy=sockets.target diff --git a/deprecated-ngircd/contrib/ngircd.spec b/deprecated-ngircd/contrib/ngircd.spec new file mode 100644 index 0000000..3d4eefc --- /dev/null +++ b/deprecated-ngircd/contrib/ngircd.spec @@ -0,0 +1,57 @@ +%define name ngircd +%define version 27 +%define release 1 +%define prefix %{_prefix} + +Summary: A lightweight daemon for the Internet Relay Chat (IRC) +Name: %{name} +Version: %{version} +Release: %{release} +License: GPLv2+ +Group: System Environment/Daemons +URL: http://ngircd.barton.de/ +Source: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: zlib-devel, openssl-devel + +%description +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. + + +%prep +%setup -q +%build +%configure \ + --with-zlib \ + --with-openssl + +make %{?_smp_mflags} + +%install +[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT" +%makeinstall +( + cd "$RPM_BUILD_ROOT" + ( cd usr/sbin; mv *-ngircd ngircd ) + ( cd usr/share/man/man5; mv *-ngircd.conf.5 ngircd.conf.5 ) + ( cd usr/share/man/man8; mv *-ngircd.8 ngircd.8 ) + rm -fr usr/share/doc/ngircd +) + +%clean +[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT" + +%files +%defattr(755,root,root) +%doc AUTHORS.md COPYING ChangeLog INSTALL.md NEWS README.md doc/* +%config(noreplace) /etc +%{_prefix}/sbin +%{_mandir}/man5/ngircd.conf* +%{_mandir}/man8/ngircd.8* diff --git a/deprecated-ngircd/contrib/nglog.sh b/deprecated-ngircd/contrib/nglog.sh new file mode 100755 index 0000000..cb4eb3e --- /dev/null +++ b/deprecated-ngircd/contrib/nglog.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# +# ngIRCd -- The Next Generation IRC Daemon +# Copyright (c)2001-2020 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. +# +# This script parses the log output of ngircd(8), and colorizes the messages +# according to their log level. Example usage: +# ./src/ngircd/ngircd -f $PWD/doc/sample-ngircd.conf -np | ./contrib/nglog.sh +# + +gawk ' + /^\[[[:digit:]]+:0 / {print "\033[1;95m" $0 "\033[0m"} + /^\[[[:digit:]]+:1 / {print "\033[1;35m" $0 "\033[0m"} + /^\[[[:digit:]]+:2 / {print "\033[1;91m" $0 "\033[0m"} + /^\[[[:digit:]]+:3 / {print "\033[1;31m" $0 "\033[0m"} + /^\[[[:digit:]]+:4 / {print "\033[1;33m" $0 "\033[0m"} + /^\[[[:digit:]]+:5 / {print "\033[1m" $0 "\033[0m"} + /^\[[[:digit:]]+:6 / {print $0} + /^\[[[:digit:]]+:7 / {print "\033[90m" $0 "\033[0m"} +' </dev/stdin & + +wait diff --git a/deprecated-ngircd/contrib/platformtest.sh b/deprecated-ngircd/contrib/platformtest.sh new file mode 100755 index 0000000..e5d577d --- /dev/null +++ b/deprecated-ngircd/contrib/platformtest.sh @@ -0,0 +1,257 @@ +#!/bin/sh +# +# 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. +# + +# 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@lists.barton.de>. + +NAME=$(basename "$0") +VERBOSE= +CLEAN=1 + +PLATFORM= +COMPILER="unknown" +VERSION="unknown" +DATE=$(date "+%y-%m-%d") +COMMENT= + +R_CONFIGURE= +R_MAKE= +R_CHECK= +R_CHECK_Y="?" +R_RUN= + +SRC_D=$(dirname "$0") +MY_D="$PWD" + +[ -n "$MAKE" ] || MAKE="make" +export MAKE CC + +while [ $# -gt 0 ]; do + case "$1" in + "-v") + VERBOSE=1 + ;; + "-x") + CLEAN= + ;; + *) + echo "Usage: $NAME [-v] [-x]" + echo + echo " -v Verbose output" + echo " -x Don't regenerate build system, even when possible" + echo + exit 2 + esac + shift +done + +for cmd in telnet expect; do + command -v "$cmd" >/dev/null 2>&1 \ + || echo "$NAME: WARNING: $cmd(1) not found, \"make check\" won't run all tests!" +done + +echo "$NAME: Checking ngIRCd base source directory ..." +grep "ngIRCd" "$SRC_D/ChangeLog" >/dev/null 2>&1 +if [ $? -ne 0 ]; then + grep "ngIRCd" "$SRC_D/../ChangeLog" >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "$NAME: ngIRCd base source directory not found!?" + exit 1 + fi + SRC_D="$SRC_D/.." +fi +echo "$NAME: - source directory: $SRC_D" +echo "$NAME: - working directory: $MY_D" + +echo "$NAME: Checking for GIT tree ..." +if [ -d "$SRC_D/.git" ]; then + echo "$NAME: Checking for \"git\" command ..." + git version >/dev/null 2>&1 + if [ $? -eq 0 ] && [ -n "$CLEAN" ]; then + echo "$NAME: Running \"git clean\" ..." + cd "$SRC_D" || exit 1 + if [ -n "$VERBOSE" ]; then + git clean -dxf + else + git clean -dxf >/dev/null + fi + cd "$MY_D" || exit 1 + fi +fi + +echo "$NAME: Checking for \"$SRC_D/configure\" script ..." +if [ ! -r "$SRC_D/configure" ]; then + echo "$NAME: Running \"$SRC_D/autogen.sh\" ..." + cd "$SRC_D" || exit 1 + if [ -n "$VERBOSE" ]; then + ./autogen.sh + else + ./autogen.sh >/dev/null + fi + if [ $? -ne 0 ]; then + echo "$NAME: \"$SRC_D/autogen.sh\" script failed, aborting!" + exit 1 + fi + cd "$MY_D" || exit 1 +fi + +if [ -r "$SRC_D/configure" ]; then + echo "$NAME: Running \"$SRC_D/configure\" script ..." + if [ -n "$VERBOSE" ]; then + "$SRC_D/configure" -C + else + "$SRC_D/configure" -C >/dev/null + fi + if [ $? -eq 0 ] && [ -r ./Makefile ]; then + R_CONFIGURE=1 + rm -f "src/ngircd/ngircd" + echo "$NAME: Running \"$MAKE\" ..." + if [ -n "$VERBOSE" ]; then + "$MAKE" + else + "$MAKE" >/dev/null + fi + if [ $? -eq 0 ] && [ -x src/ngircd/ngircd ]; then + R_MAKE=1 + echo "$NAME: Running \"$MAKE check\" ..." + if [ -n "$VERBOSE" ]; then + "$MAKE" check + else + "$MAKE" check >/dev/null + fi + if [ $? -eq 0 ]; then + R_CHECK=1 + R_RUN=$R_CHECK + [ -r ./src/testsuite/tests-skipped.lst ] \ + && R_CHECK_Y="y" || R_CHECK_Y="Y" + else + ./src/ngircd/ngircd --help 2>/dev/null \ + | grep "^ngIRCd" >/dev/null + [ $? -eq 0 ] && R_RUN=1 + fi + fi + fi +fi + +# Get target platform information +if [ -r "src/config.h" ]; then + CPU=$(grep "HOST_CPU" "src/config.h" | cut -d'"' -f2) + OS=$(grep "HOST_OS" "src/config.h" | cut -d'"' -f2) + VENDOR=$(grep "HOST_VENDOR" "src/config.h" | cut -d'"' -f2) + PLATFORM="$CPU/$VENDOR/$OS" +fi +if [ -z "$PLATFORM" ]; then + PLATFORM="$(uname 2>/dev/null) $(uname -r 2>/dev/null), $(uname -m 2>/dev/null)" +fi + +# Get compiler information +if [ -r "Makefile" ]; then + CC=$(grep "^CC = " Makefile | cut -d' ' -f3) + $CC --version 2>&1 | grep -i "GCC" >/dev/null + if [ $? -eq 0 ]; then + # GCC, or compiler that mimics GCC + $CC --version 2>&1 | grep -i "Open64" >/dev/null + if [ $? -eq 0 ]; then + COMPILER="Open64" + else + COMPILER=$($CC --version | head -1 \ + | cut -d')' -f2 | cut -d' ' -f2) + COMPILER="gcc $COMPILER" + fi + else + # Non-GCC compiler + $CC --version 2>&1 | grep -i "clang" >/dev/null + if [ $? -eq 0 ]; then + COMPILER=$($CC --version 2>/dev/null | head -1 \ + | cut -d'(' -f1 | cut -d'-' -f1 \ + | sed -e 's/version //g; s/^\([A-Z]\)[A-Za-z]* clang/\1-clang/g; s/LLVM /clang /g') + fi + $CC -version 2>&1 | grep -i "tcc" >/dev/null + if [ $? -eq 0 ]; then + COMPILER=$($CC -version 2>/dev/null | head -1 \ + | cut -d'(' -f1 | sed -e 's/version //g') + fi + if [ "$COMPILER" = "unknown" ]; then + v="$($CC --version 2>/dev/null | head -1)" + [ -z "$v" ] && v="$($CC -version 2>/dev/null | head -1)" + [ -n "$v" ] && COMPILER="$v" + fi + fi +fi + +# Get ngIRCd version information +eval "$(grep "^VERSION = " Makefile | sed -e 's/ //g')" +case "$VERSION" in + *~*-*) + VERSION=$(echo "$VERSION" | cut -b1-10) + ;; +esac +[ -n "$VERSION" ] || VERSION="unknown" + +# Get IO interface information +if [ "$OS" = "linux-gnu" ]; then + COMMENT="1" +else + grep "^#define HAVE_SYS_DEVPOLL_H 1" src/config.h >/dev/null 2>&1 + [ $? -eq 0 ] && COMMENT="4" + grep "^#define HAVE_EPOLL_CREATE 1" src/config.h >/dev/null 2>&1 + [ $? -eq 0 ] && COMMENT="5" + grep "^#define HAVE_KQUEUE 1" src/config.h >/dev/null 2>&1 + [ $? -eq 0 ] && COMMENT="3" +fi + +[ -n "$R_CONFIGURE" ] && C="Y" || C="N" +[ -n "$R_MAKE" ] && M="Y" || M="N" +[ -n "$R_CHECK" ] && T="$R_CHECK_Y" || T="N" +if [ -n "$R_RUN" ]; then + # Mark "runs" with "Y" only when the test suite succeeded: + [ "$T" = "N" ] && R="?" || R="Y" +else + R="N" +fi +[ -n "$COMMENT" ] && COMMENT=" $COMMENT" + +echo +echo " the executable works (\"runs\") as expected --+" +echo " tests run successfully (\"make check\") --+ |" +echo " ngIRCd compiles (\"make\") --+ | |" +echo " ./configure works --+ | | |" +echo " | | | |" +echo "Platform Compiler ngIRCd Date Tester C M T R *" +echo "--------------------------- ------------ ---------- -------- -------- - - - - -" +command -v printf >/dev/null 2>&1 +if [ $? -eq 0 ]; then + printf "%-27s %-12s %-10s %s %-8s %s %s %s %s%s\n" \ + "$PLATFORM" "$COMPILER" "$VERSION" "$DATE" "$LOGNAME" \ + "$C" "$M" "$T" "$R" "$COMMENT" +else + echo "$PLATFORM $COMPILER $VERSION $DATE $LOGNAME" \ + "$C" "$M" "$T" "$R" "$COMMENT" +fi +echo + +double_check() { + echo "Please double check that the ngIRCd daemon starts up, runs and handles IRC" + echo "connections successfully!" +} + +if [ "$R_CHECK_Y" = "y" ]; then + echo "WARNING: Some tests have been skipped!" + double_check + echo +fi +if [ "$R" = "?" ]; then + echo "WARNING: The resulting binary passed simple tests, but the test suite failed!" + double_check + echo +fi diff --git a/deprecated-ngircd/doc/Bopm.txt b/deprecated-ngircd/doc/Bopm.txt new file mode 100644 index 0000000..338e5cb --- /dev/null +++ b/deprecated-ngircd/doc/Bopm.txt @@ -0,0 +1,53 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2014 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- BOPM.txt -- + + +I. Introduction +~~~~~~~~~~~~~~~~ + +Citing <http://wiki.blitzed.org/BOPM>: "BOPM is an open source open proxy +monitor, designed for use with hybrid-based ircds, although it can be used +with slight modification on any server which has the ability to show connects +to opers and that supports KLINEs." + +Starting with Release 17, ngIRCd supports all required log messages that +BOPM requires to be useful. + +II. Installation +~~~~~~~~~~~~~~~~~ + +Install BOPM as usual, please see the BOPM documentation for details. +Afterwards adjust the following configuration parameters that are important +for ngIRCd: + +a) BOPM "IRC" section: + + 1) Set "server" and "port" accordingly, + + 2) adjust the "oper" line to match an [Operator] block in ngircd.conf, + + 3) change "mode" to "+ci" or "+c". + + 4) Set "connregex" to the following string, everything in one line(!): + "Client connecting: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9\\.]+)\\].*"; + and comment out all the other "connregex" examples (that is, prepend a + "#" character). + + 5) Set "kline" to "GLINE *@%h :Open proxy found on your host!"; + and comment out all the other "kline" examples. + +b) BOPM "scanner" section: + + Make sure you configure a valid "target_ip" and "target_port" for the + configured scanners to test. And please note that you CAN'T USE the port + of ngIRCd, because ngIRCd doesn't send any banner message by default! + + So you need a service what sends a banner, so for example POP3, SMTP, + IMAP, or SSH daemons should work ... diff --git a/deprecated-ngircd/doc/Capabilities.txt b/deprecated-ngircd/doc/Capabilities.txt new file mode 100644 index 0000000..0f160ed --- /dev/null +++ b/deprecated-ngircd/doc/Capabilities.txt @@ -0,0 +1,28 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2012 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- Capabilities.txt -- + + +This document lists and describes the "IRC capabilities" that ngIRCd supports +and can be requested by a IRC/IRCv3 client that supports the "CAP" command. + +ngIRCd implements the "IRC Client Capabilities Extension" as described here: +<http://ircv3.net/specs/core/capability-negotiation-3.1.html> + + +I. Supported Capabilities +~~~~~~~~~~~~~~~~~~~~~~~~~ + +* "multi-prefix" + + When requested, the multi-prefix client capability will cause the IRC + server to send all possible prefixes which apply to a user in NAMES and + WHO output. + + See <http://ircv3.net/specs/extensions/multi-prefix-3.1.html>. diff --git a/deprecated-ngircd/doc/Commands.txt b/deprecated-ngircd/doc/Commands.txt new file mode 100644 index 0000000..0ca8703 --- /dev/null +++ b/deprecated-ngircd/doc/Commands.txt @@ -0,0 +1,996 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2019 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- Commands.txt -- + + +This file lists all commands available on ngIRCd. It is written in a format +that is human readable as well as machine parseable and therefore can be used +as "help text file" of the daemon. + +In short, the daemon reads this file on startup and parses it as following +when an user issues a "HELP <cmd>" command: + + 1. Search the file for a line "- <cmd>", + 2. Output all subsequent lines that start with a TAB (ASCII 9) character + to the client using NOTICE commands, treat lines containing a single "." + after the TAB as empty lines. + 3. Break at the first line not starting with a TAB character. + +This format allows to have information to each command stored in this file +which will not be sent to an IRC user requesting help which enables us to +have additional annotations stored here which further describe the origin, +implementation details, or limits of the specific command which are not +relevant to an end-user but administrators and developers. + +A special "Intro" block is returned to the user when the HELP command is +used without a command name: + + +- Intro + This is ngIRCd, a server software for Internet Relay Chat (IRC) + networks. You can find more information about ngIRCd on its homepage: + <http://ngircd.barton.de> + . + Use "HELP COMMANDS" to get a list of all available commands and + "HELP <command-name>" to get help for a specific IRC command, for + example "HELP quit" or "HELP privmsg". + + +Connection Handling Commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- CAP + CAP LS + CAP LIST + CAP REQ <capabilities> + CAP ACK <capabilities> + CAP NAK <capabilities> + CAP CLEAR + CAP END + . + List, request, and clear "IRC Capabilities". + . + Using this command, an IRC client can request additional "IRC + capabilities" during login or later on, which influences the + communication between server and client. Normally, these commands + aren't directly used by humans, but automatically by their client + software. And please note that issuing such commands manually can + irritate the client software used, because of the "non-standard" + behavior of the server! + . + - CAP LS: list all available capabilities. + - CAP LIST: list active capabilities of this connection. + - CAP REQ: Request particular capabilities. + - CAP ACK: Acknowledge a set of capabilities to be enabled/disabled. + - CAP NAK: Reject a set of capabilities. + - CAP CLEAR: Clear all set capabilities. + - CAP END: Indicate end of capability negotiation during login, + ignored in an fully registered session. + + Please note that the <capabilities> must be given in a single + parameter but whitespace separated, therefore a command could look + like this: "CAP REQ :capability1 capability2 capability3" for example. + + References: + - <http://ircv3.net/specs/core/capability-negotiation-3.1.html> + - <http://ngircd.barton.de/doc/Capabilities.txt> + - doc/Capabilities.txt + +- CHARCONV + CHARCONV <client-charset> + . + Set client character set encoding to <client-charset>. + . + After receiving such a command, the server translates all message + data received from the client using the set <client-charset> to the + server encoding (UTF-8), and all message data which is to be sent to + the client from the server encoding (UTF-8) to <client-charset>. + . + This enables older clients and clients using "strange" character sets + to transparently participate in channels and direct messages to + clients using UTF-8, which should be the default today. + + References: + - IRC+, <http://ngircd.barton.de/doc/Protocol.txt> + - IRC+, doc/Protocol.txt + +- NICK + NICK <nickname> + NICK <nickname> [<hops>] + NICK <nickname> <hops> <username> <host> <servertoken> <usermodes> <realname> + . + Set or change the <nickname> of a client (first form) and register + remote clients (second and third form; servers only). + + References: + - RFC 1459, 4.1.2 "Nick message" (old client and server protocol) + - RFC 2812, 3.1.2 "Nick message" (client protocol) + - RFC 2813, 4.1.3 "Nick" (server protocol) + +- PASS + PASS <password> + PASS <password> <version> <flags> [<options>] + . + Set a connection <password>. This command must be the first command + sent to the server, even before the NICK/USER or SERVER commands. + . + The first form is used by user sessions or (old) RFC 1459 servers, + the second form is used by RFC 2812 or IRC+ compliant servers and + enables the server to indicate its version and supported protocol + features. + + References: + - RFC 1459, 4.1.1 "Password message" (old client and server protocol) + - RFC 2812, 3.1.1 "Password message" (client protocol) + - RFC 2813, 4.1.1 "Password message" (server protocol) + - IRC+, <http://ngircd.barton.de/doc/Protocol.txt> + - IRC+, doc/Protocol.txt + +- PING + PING <token> [<target>] + . + Tests the presence of a connection to a client or server. + . + If no <target> has been given, the local server is used. User clients + can only use other servers as <target>, no user clients. + . + A PING message results in a PONG reply containing the <token>, which + can be arbitrary text. + + Please note: + The RFCs state that the <token> parameter is used to specify the + origin of the PING command when forwarded in the network, but this + is not the case: the sender is specified using the prefix as usual, + and the parameter is used to identify the PONG reply in practice. + + References: + - RFC 2812, 3.7.2 "Ping message" + +- PONG + PONG <target> [<token>] + . + Reply to a "PING" command, indicate that the connection is alive. + . + The <token> is the arbitrary text received in the "PING" command and + can be used to identify the correct PONG sent as answer. + . + When the "PONG" command is received from a user session, the <target> + parameter is ignored; otherwise the PONG is forwarded to this client. + + References: + - RFC 2812, 3.7.3 "Pong message" + +- QUIT + QUIT [<quit-message>] + . + Terminate a user session. + . + When received from a user, the server acknowledges this by sending + an "ERROR" message back to the client and terminates the connection. + . + When a <quit-message> has been given, it is sent to all the channels + that the client is a member of when leaving. + + References: + - RFC 2812, 3.1.7 "Quit" + - RFC 2813, 4.1.5 "Quit" + +- USER + USER <username> <hostname> <unused> <realname> + . + Register (and authenticate) a new user session with a short <username> + and a human-readable <realname>. + . + The parameter <hostname> is only used when received by an other server + and ignored otherwise; and the parameter <unused> is always ignored. + But both parameters are required on each invocation by the protocol + and can be set to arbitrary characters/text when not used. + . + If <username> contains an "@" character, the full <username> is used + for authentication, but only the first part up to this character is + set as "user name" for this session. + + References: + - RFC 2812, 3.1.3 "User message" + +- WEBIRC + WEBIRC <password> <username> <hostname> <ip-address> + . + Allow Web-to-IRC gateway software (for example) to set the correct + user name and host name of users instead of their own. + . + It must be the very first command sent to the server, even before + USER and NICK commands! + . + The <password> must be set in the server configuration file to prevent + unauthorized clients to fake their identity; it is an arbitrary string. + + References: + - IRC+, <http://ngircd.barton.de/doc/Protocol.txt> + - IRC+, doc/Protocol.txt + + +General Commands +~~~~~~~~~~~~~~~~ + +- AWAY + AWAY [<message>] + . + Provides the server with a message to automatically send in reply to a + PRIVMSG directed at the user, but not to a channel they are on. + . + If <message> is omitted, the away status is removed. + + References: + - RFC 2812, 4.1 "Away" + +- HELP + HELP [<command>] + . + Show help information for a specific IRC <command>. The <command> name + is case-insensitive. + . + Use the command "HELP Commands" to get a list of all available commands. + + The HELP command isn't specified by any RFC but implemented by most + daemons. If no help text could be read in, ngIRCd outputs a list of all + implemented commands when receiving a plain "HELP" command as well as + on "HELP Commands". + + ngIRCd replies using "NOTICE" commands like ircd 2.10/2.11; other + implementations are using numerics 704, 705, and 706. + +- MODE + MODE <nickname> [{+|-}<mode>[<mode>] [{+|-}<mode>[<mode>] [...]]] + MODE <channel> [{+|-}<mode>[<mode>] [<arg> [<arg> [...]]] [{+|-}<mode>[<mode>] [<arg> [<arg> [...]]] [...]]] + . + Set and get user and channel modes. + . + When no mode parameters are given, the currently set user or channel + modes are returned. Otherwise the modes are adjusted accordingly + and the changes will be reported back to the client. + . + All user and channel "modes" are indicated by single case-sensitive + characters. + . + Please note that a user can only get and set his own modes, and not + all user "levels" are allowed to change all channel modes ... + . + The mode parameters can become quite complex, especially when dealing + with channel modes that require additional arguments: + . + {+|-}<mode(s}> -- set or unset one or more modes. + +<mode(s)> -<mode(s)> -- set some modes and unset others. + +<modes> <arg1> <arg2> -- set (at least) two modes with arguments. + . + Some examples: + . + MODE nick +i -- set user to "invisible". + MODE #chan +tn -- set "topic lock" and "no external messages". + MODE #chan -t +l 50 -- remove "topic lock", set "user limit" to 50. + MODE #chan +ov nick1 nick2 -- set "channel op" and "voice" mode + to nick1 and nick2 in channel #chan. + . + A complete list of all modes supported by ngIRCd can be found online + here: <http://ngircd.barton.de/doc/Modes.txt>. + + References: + - RFC 2811, 4. "Channel Modes" + - RFC 2812, 3.1.5 "User mode message" + - RFC 2812, 3.2.3 "Channel mode message" + - <http://ngircd.barton.de/doc/Modes.txt> + - doc/Modes.txt + +- NOTICE + NOTICE <target>[,<target>[,...]] <message> + . + Send a <message> to a given <target>, which can be a user or a + channel, but DON'T report any error. + . + The "NOTICE" command exactly behaves like the "PRIVMSG" command, but + doesn't report any errors it encounters (like an unknown <target>). + Please see the help text of the "PRIVMSG" command for a detailed + description of the parameters! + + References: + - RFC 2812, 2.3.1 "Message format in Augmented BNF" + - RFC 2812, 3.3 "Sending messages" + - RFC 2812, 3.3.2 "Notice" + +- PRIVMSG + PRIVMSG <target>[,<target>[,...]] <message> + . + Send a <message> to a given <target>, which can be a user or a + channel, and report all errors. + . + The <target> must follow one of these syntax variants: + . + - <nickname> + - <channel> + - <user>[%<host>]@<server> + - <user>%<host> + - <nickname>!<user>@<host> + . + If the <target> is a user, a private message is sent directly to this + user; if it resolves to a channel name, a public message is sent + to all the members of that channel. + . + In addition, IRC Ops can use these two forms to specify the <target>: + . + - #<hostmask> + - $<servermask> + . + The <mask> can contain the wildcard characters "*" and "?", but must + contain at least one dot (".") and no wildcard after the last one. + Then, the <message> is sent to all users matching this <mask>. + . + All warnings and errors are reported back to the initiator using + numeric status codes, which is the only difference to the "NOTICE" + command, which doesn't report back any errors or warnings at all. + . + Please note that clients often use "MSG" as an alias to PRIVMSG, and + a command "QUERY <nick> [<message>]" to initiate private chats. Both + are command extensions of the client and never sent to the server. + + References: + - RFC 2812, 2.3.1 "Message format in Augmented BNF" + - RFC 2812, 3.3 "Sending messages" + - RFC 2812, 3.3.1 "Private messages" + +Status and Informational Commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- ADMIN + ADMIN [<target>] + . + Show administrative information about an IRC server in the network. + . + <target> can be a server name, the nickname of a client connected to + a specific server, or a mask matching a server name in the network. + The server of the current connection is used when <target> is omitted. + + References: + - RFC 2812, 3.4.9 "Admin command" + +- INFO + INFO [<target>] + . + Show the version, birth & online time of an IRC server in the network. + . + <target> can be a server name, the nickname of a client connected to + a specific server, or a mask matching a server name in the network. + The server of the current connection is used when <target> is omitted. + + References: + - RFC 2812, 3.4.10 "Info command" + +- ISON + ISON <nickname> [<nickname> [...]] + . + Query online status of a list of nicknames. The server replies with + a list only containing nicknames actually connected to a server in + the network. If no nicknames of the given list are online, an empty + list is returned to the client requesting the information. + + Please note that "all" IRC daemons even parse separate nicknames in + a single parameter (like ":nick1 nick2"), and therefore ngIRCd + implements this behavior, too. + + References: + - RFC 2812, 4.9 "Ison message" + +- LINKS + LINKS [[<target>] <mask>] + . + List all servers currently registered in the network matching <mask>, + or all servers if <mask> has been omitted, as seen by the server + specified by <target> or the local server when <target> is omitted. + . + <target> can be a server name, the nickname of a client connected to + a specific server, or a mask matching a server name in the network. + + References: + - RFC 2812, 3.4.5 "Links message" + +- LUSERS + LUSERS [<mask> [<target>]] + . + Return statistics about the number of clients (users, servers, + services, ...) in the network as seen by the server <target>. + . + <target> can be a server name, the nickname of a client connected to + a specific server, or a mask matching a server name in the network. + The server of the current connection is used when <target> is omitted. + + Please note that ngIRCd ignores the <mask> parameter entirely: it + is not possible to get information for a part of the network only. + + References: + - RFC 2812, 3.4.2 "Lusers message" + +- MOTD + MOTD [<target>] + . + Show the "Message of the Day" (MOTD) of an IRC server in the network. + . + <target> can be a server name, the nickname of a client connected to + a specific server, or a mask matching a server name in the network. + The server of the current connection is used when <target> is omitted. + + References: + - RFC 2812, 3.4.1 "Motd message" + +- NAMES + NAMES [<channel>[,<channel>[,...]] [<target>]] + . + Show the list of users that are members of a particular <channel> + (and that are visible for the client requesting this information) as + seen by the server <target>. More than one <channel> can be given + separated by "," (but not whitespaces!). + . + If <channel> has been omitted, all visible users are shown, grouped + by channel name, and all visible users not being members of at least + one channel are shown as members of the pseudo channel "*". + . + <target> can be a server name, the nickname of a client connected to + a specific server, or a mask matching a server name in the network. + The server of the current connection is used when <target> is omitted. + + References: + - RFC 2812, 3.2.5 "Names message" + +- STATS + STATS [<query> [<target>]] + . + Show statistics and other information of type <query> of a particular + IRC server in the network. + . + The following <query> types are supported (case-insensitive where + applicable): + . + - g Network-wide bans ("G-Lines"). + - k Server-local bans ("K-Lines"). + - L Link status (servers and user links). + - l Link status (servers and own link). + - m Command usage count. + - u Server uptime. + . + <target> can be a server name, the nickname of a client connected to + a specific server, or a mask matching a server name in the network. + The server of the current connection is used when <target> is omitted. + . + To use "STATS L" the user must be an IRC Operator. + + References: + - RFC 2812, 3.4.4 "Stats message" + +- TIME + TIME [<target>] + . + Show the local time of an IRC server in the network. + . + <target> can be a server name, the nickname of a client connected to + a specific server, or a mask matching a server name in the network. + The server of the current connection is used when <target> is omitted. + + References + - RFC 2812, 3.4.6 "Time message" + +- TRACE + TRACE [<target>] + . + Find the route to a specific server and send information about its + peers. Each server that processes this command reports back to the + sender about it: the replies from pass-through servers form a chain + which shows the route to the destination. + . + <target> can be a server name, the nickname of a client connected to + a specific server, or a mask matching a server name in the network. + The server of the current connection is used when <target> is omitted. + + References: + - RFC 2812, 3.4.8 "Trace message" + +- USERHOST + USERHOST <nickname> [<nickname> [...]] + . + Show flags and the hostmasks (<user>@<host>) of the <nickname>s, + separated by spaces. The following flags are used: + . + - "-" The client is "away" (the mode "+a" is set on this client). + - "+" Client seems to be available, at least it isn't marked "away". + - "*" The client is an IRC operator (the mode "+o" is set). + + References: + - RFC 2812, 4.8 "Userhost message" + +- VERSION + VERSION [<target>] + . + Show version information about a particular IRC server in the network. + . + <target> can be a server name, the nickname of a client connected to + a specific server, or a mask matching a server name in the network. + The server of the current connection is used when <target> is omitted. + . + Please note: in normal operation, the version number ends in a dot + (".", for example "ngIRCd-20.1."). If it ends in ".1" (for example + "ngIRCd-20.1.1", same version than before!), the server is running in + debug-mode; and if it ends in ".2", the "network sniffer" is active! + Keep your privacy in mind ... + + References: + - RFC 2812, 3.4.3 "Version message" + +- WHO + WHO [<mask> ["o"]] + . + Show a list of users who match the <mask>, or all visible users when + the <mask> has been omitted. (Special case: the <mask> "0" is + equivalent to "*") + . + If the flag "o" is given, the server will only return information about + IRC Operators. + + References: + - RFC 2812, 3.6.1 "Who query" + +- WHOIS + WHOIS [<target>] <mask>[,<mask>[,...]] + . + Query information about users matching the <mask> parameter(s) as seen + by the server <target>; up to 3 <masks> are supported. + . + <target> can be a server name, the nickname of a client connected to a + specific server, or a mask matching a server name in the network. The + server of the current connection is used when <target> is omitted. + + References: + - RFC 2812, 3.6.2 "Whois query" + +- WHOWAS + WHOWAS <nickname>[,<nickname>[,...]] [<count> [<target>]] + . + Query information about nicknames no longer in use in the network, + either because of nickname changes or disconnects. The history is + searched backwards, returning the most recent entry first. If there + are multiple entries, up to <count> entries will be shown (or all of + them, if no <count> has been given). + . + <target> can be a server name, the nickname of a client connected to a + specific server, or a mask matching a server name in the network. The + server of the current connection is used when <target> is omitted. + + References: + - RFC 2812, 3.6.3 "Whowas" + + +Channel Commands +~~~~~~~~~~~~~~~~ + +- INVITE + INVITE <nickname> <channel> + . + Invite <nickname> to join channel <channel>. + . + <channel> does not have to exist, but if it does, only members of the + channel are allowed to invite other users. If the channel mode "+i" + is set, only channel "half-ops" (and above) may invite other clients, + and if channel mode "+V" is set, nobody can invite other users. + + References: + - RFC 2812, 3.2.7 "Invite message" + +- JOIN + JOIN {<channel>[,<channel>[,...]] [<key>[,<key>[,...]]] | 0} + . + Makes the client join the <channel> (comma-separated list), specifying + the channel keys ("passwords"). A <channel-key> is only needed if the + <channel> has the mode "+k" set. + . + If the channel(s) do not exist, then they will be created. + . + Using "JOIN 0" parts all channels at once. + + References: + - RFC 2812, 3.2.1 "Join message" (client protocol) + - RFC 2813, 4.2.1 "Join message" (server protocol) + +- KICK + KICK <channel>[,<channel>[,...]] <nickname>[,<nickname>[,...]] [<reason>] + . + Remove users(s) with <nickname>(s) from <channel>(s). + . + There must be either exactly one <channel> parameter and multiple + <nickname> parameters, or as many <channel> parameters as there are + <nickname> parameters. The <reason> is shown to the users being + kicked, and the nickname of the current user is used when <reason> + is omitted. + + References: + - RFC 2812, 3.2.8 "Kick command" + +- LIST + LIST [<mask>[,<mask>[,...]] [<server>]] + . + List all visible channels matching the <mask> (comma-separated list), + or all channels when no <mask> was specified. + . + If <server> is given, the command will be forwarded to <server> for + evaluation. + + References: + - RFC 2812, 3.2.6 "List message" + +- PART + PART <channel>[,<channel>[,...]] [<part-message>] + . + Leave <channel> (comma-separated list), optionally with sending a + <part-message> to all the other channel members. + + References: + - RFC 2812, 3.2.2 "Part message" + +- TOPIC + TOPIC <channel> [<topic>] + . + Change or view the topic of a channel. + . + The topic for channel <channel> is returned if there is no <topic> + given. If the <topic> parameter is present, the topic for that + channel will be changed, if this action is allowed for the user + requesting it. If the <topic> parameter is an empty string, the + topic for that channel will be removed. + + References: + - RFC 2812, 3.2.4 "Topic message" + + +Administrative Commands +~~~~~~~~~~~~~~~~~~~~~~~ + +- CONNECT + CONNECT <server> [<port> [<remote-server> [<my-pwd> <peer-pwd>]]] + . + Instructs the current server, or <remote-server> if specified, + to connect to the server named <server>, which must be configured + in the server configuration file. + . + To use this command, the user must be an IRC Operator. To establish + a connection on a <remote-server>, you must have remote IRC operator + privileges. + . + If <port>, <my-pwd> and <peer-pwd> are given, these values override + the ones specified in the server configuration file. + + References: + - RFC 2812, 3.4.7 "Connect message" + +- DIE + DIE [<message>] + . + Instructs the server to shut down. + . + The optional (and non-standard) <message> text is sent to each client + connected to this server before all connections are closed. + . + To use this command, the user must be an IRC Operator. + + References: + - RFC 2812, 4.3 "Die message" + +- DISCONNECT + DISCONNECT <server> + . + Disconnect and disable a locally linked server. + . + To use this command, the user must be an IRC Operator. + + References: + - This command is not specified in the IRC RFCs, it is an extension + of ngIRCd. + +- GLINE + GLINE <nick!user@hostmask> [<timeout> :<reason>] + . + This command provides timed G-Lines (network-wide bans). + . + If a client matches a G-Line, it cannot connect to any server on + the IRC network for <timeout> seconds. When <timeout> is 0, it make + the G-Line permanent. + . + If no <timeout> and no <reason> is given, the G-Line is removed. + . + To use this command, the user must be an IRC Operator. + . + "STATS g" can be used to list all currently active G-Lines. + + References: + - This command is not specified in the IRC RFCs, it is an extension + of ngIRCd. + +- KILL + KILL <nickname> <reason> + . + Forcibly remove all users with a given <nickname> from the IRC + network and display the given <reason> to them. + . + This command is used internally between servers, too, for example + to disconnect duplicate <nickname>'s after a "net split". + . + To use this command, the user must be an IRC Operator. + + References: + - RFC 2812, 3.7.1 "Kill message" + +- KLINE + KLINE <nick!user@hostmask> [<timeout> :<reason>] + . + This command provides timed K-Lines (server-local bans). + . + If a client matches a K-Line, it cannot connect to this server for + <timeout> seconds. When <timeout> is 0, it makes the K-Line permanent. + . + If no <timeout> and no <reason> is given, the K-Line is removed. + . + To use this command, the user must be an IRC Operator. + . + "STATS k" can be used to list all currently active K-Lines. + + References: + - This command is not specified in the IRC RFCs, it is an extension + of ngIRCd. + +- OPER + OPER <name> <password> + . + Authenticates a user named <name> as an IRC operator on the current + server/network. + . + This operator <name> must be configured in the server configuration. + . + Please note that <name> is NOT related to a nickname at all! + + References: + - RFC 2812, 3.1.4 "Oper message" + +- REHASH + REHASH + . + Causes the server to re-read and re-process its configuration file(s). + . + While rehashing, no new connections are accepted, but all already + established connections stay connected. + . + To use this command, the user must be an IRC Operator. + + References: + - RFC 2812, 4.2 "Rehash message" + +- RESTART + RESTART + . + Restart the server. + . + While restarting, all connections are reset and no new connections + are accepted. + . + To use this command, the user must be an IRC Operator. + + References: + - RFC 2812, 4.4 "Restart message" + +- WALLOPS + WALLOPS <message> + . + Sends <message> to all users with user mode "+w". + . + To use this command, the user must be an IRC Operator. + + References: + - RFC 2812, 4.7 "Operwall message" + +IRC Service Commands +~~~~~~~~~~~~~~~~~~~~ + +- SERVICE + SERVICE <name> <reserved1> <distribution> <type> <reserved2> <info> + SERVICE <name> <servertoken> <distribution> {<type>|+<modes>} <hops> <info> + . + Register a new service in the network. + . + The first form is used by directly linked services and isn't supported + by ngIRCd at the moment. The second form announces services connected + to remote "pseudo-servers" ("services hubs"). + . + The <distribution> and <type> parameters are ignored by ngIRCd. + + References: + - RFC 2812, 3.1.6 "Service message" + - RFC 2813, 4.1.4 "Service message" + +- SERVLIST + SERVLIST [<mask> [<type>]] + . + List all IRC services currently registered in the network. + . + The optional <mask> and <type> parameters can be used to limit the + listing to services matching the <mask> and that are of type <type>. + . + Please note that ngIRCd doesn't use any service types at the moment + and therefore all services are of type "0". + + References: + - RFC 2812, 3.5.1 "Servlist message" + +- SQUERY + SQUERY <target>[,<target>[,...]] <message> + . + Send a <message> to a given <target> IRC service, and report all + errors. + . + The "SQUERY" command exactly behaves like the "PRIVMSG" command, but + enforces that the <target> of the <message> is an IRC service. + Please see the help text of the "PRIVMSG" command for a detailed + description of the parameters! + . + If a user wants to interact with IRC services, he should use "SQUERY" + instead of "PRIVMSG" or "NOTICE": only "SQUERY makes sure that no + regular user, which uses the nickname of an IRC service, receives + the command in error, for example during a "net split"! + + References: + - RFC 2812, 2.3.1 "Message format in Augmented BNF" + - RFC 2812, 3.3 "Sending messages" + - RFC 2812, 3.3.2 "Notice" + +- SVSNICK + SVSNICK <oldnick> <newnick> + . + Forcefully change foreign user nicknames. This command is allowed + for servers only. + . + The "SVSNICK" command is forwarded to the server to which the user + with nickname <oldnick> is connected to, which in turn generates a + regular "NICK" command that then is sent to the client, so no special + support in the client software is required. + + References: + - ngIRCd GIT commit e3f300d3231f + + +Server Protocol Commands +~~~~~~~~~~~~~~~~~~~~~~~~ + +- CHANINFO + CHANINFO <channel> +<modes> [[<key> <limit>] <topic>] + . + CHANINFO is used by servers to inform each other about a channel: + its modes, channel key, user limits and its topic. + . + Note: even when <modes> don't include "k" (key) or "l" (limit), both + parameters must be given when used; use "*" for "no key" and 0 for + "no limit" for the unused parameter in this case. + . + The CHANINFO command is allowed on server-links only. + + References: + - IRC+, <http://ngircd.barton.de/doc/Protocol.txt> + - IRC+, doc/Protocol.txt + +- ERROR + ERROR [<message> [<> [...]]] + . + Inform a client or a server about an error condition. The first + parameter, if given, is logged by the server receiving the message, + all other parameters are silently ignored. + . + This command is silently ignored on non-server and non-service links + and shouldn't be used by regular IRC clients. + . + The ERROR message is also sent before terminating a regular client + connection. + + References: + - RFC 2812, 3.7.4 "Error message" + +- METADATA + METADATA <target> <key> <value> + . + The METADATA command is used on server-links to update "metadata" + information of clients, like the hostname, the info text ("real name"), + or the user name. + . + The METADATA command is allowed on server-links only. + + References: + - IRC+, <http://ngircd.barton.de/doc/Protocol.txt> + - IRC+, doc/Protocol.txt + +- NJOIN + NJOIN <channel> [<mode>]<nick>[,[<mode>]<nick>[,...]] + . + The NJOIN command is used on server-links to add users with <nick> + and <mode> to a <channel> while peering. + . + The NJOIN command is allowed on server-links only. + + References: + - RFC 2813, 4.2.2 "Njoin message" + +- SERVER + SERVER <servername> <info> + SERVER <servername> <hopcount> <info> + SERVER <servername> <hopcount> <token> <info> + . + The first form registers the local connection as a new server in the + network, the second (RFC 1459) and third (RFC 2812) form announce a + new remote server in the network. + . + The SERVER command is allowed on unregistered or server-links only. + + References: + - RFC 1459, 4.1.4 "Server message" + - RFC 2813, 4.1.2 "Server message" + +- SQUIT + SQUIT <server> <comment> + . + Disconnects an IRC Server from the network. + . + This command is used on server-links, but can be used by IRC Operators + to forcefully disconnect servers from the network, too. + + References: + - RFC 2812, 3.1.8 "Squit" + - RFC 2813, 4.1.6 "Server quit message" + +Dummy Commands +~~~~~~~~~~~~~~ + +- SUMMON + SUMMON <user> [<target> [<channel>]] + . + This command was intended to call people into IRC who are directly + connected to the terminal console of the IRC server -- but is + deprecated today. Therefore ngIRCd doesn't really implement this + command and always returns an error message, regardless of the + parameters given. + + References: + - RFC 2812, 4.5 "Summon message" + +- USERS + USERS [<target>] + . + This command was intended to list users directly logged in into the + console of the IRC server -- but is deprecated today. Therefore ngIRCd + doesn't really implement this command and always returns an error + message, regardless of the parameters given. + + References: + - RFC 2812, 4.6 "Users" + +- GET + GET [...] + . + Fake HTTP GET command. When received, the connection is shut down + immediately again to protect against crazy web browsers ... + + References: + - ngIRCd GIT commit 33e8c2480649 + +- POST + POST [...] + . + Fake HTTP POST command. When received, the connection is shut down + immediately again to protect against crazy web browsers ... + + References: + - ngIRCd GIT commit 33e8c2480649 diff --git a/deprecated-ngircd/doc/Container.md b/deprecated-ngircd/doc/Container.md new file mode 100644 index 0000000..b50f2e9 --- /dev/null +++ b/deprecated-ngircd/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)' +``` diff --git a/deprecated-ngircd/doc/Contributing.txt b/deprecated-ngircd/doc/Contributing.txt new file mode 100644 index 0000000..dd2b297 --- /dev/null +++ b/deprecated-ngircd/doc/Contributing.txt @@ -0,0 +1,60 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2015 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- Contributing.txt -- + + +If you want to contribute to ngIRCd, please read the following paragraphs to +get an idea of how to do it the best :-) + + - Use GIT + + The source code of ngIRCd is maintained using GIT, see doc/GIT.txt. So if + remotely possible, use GIT for your work, too. It makes your and our lives + much easier ;-) + + - Don't forget to include documentation + + When adding features and new configuration options, don't forget to not + only code the features but to describe them in doc/sample-ngircd.conf, + man/ngircd.8.tmp and/or man/ngircd.conf.5.tmpl as well! + + - Be present on IRC + + If you intend to code some new features or do some code cleanups or better + documentation, please be present on <irc://irc.barton.de/#ngircd> and + discuss your plans early! So other developers have an idea on what others + are working on, can offer help, and can synchronize their own work. + + - Check and validate your work! + + Use "make check" to validate your work, and use "make distcheck" to + validate the resulting archives, especially when adding/removing files! + + - Send patches in "unified diff" format + + Please send patches in "unified" format, that is, use "diff -u". + Or even better: use GIT ("git diff"), see above. + + - Send patches to the mailing list + + If you have some code to present, send the patch(es) and/or pointers to + your GIT repository to the official ngIRCd mailing list for review, not + only to #ngircd: so it becomes archived and more people have a chance to + review your patch. + + Sure it is a good idea to post some notes to #ngircd, too! :-) + + And this is open source, your work must not be 100% finished and perfect, + work in progress is interesting, too: "release early, release often"! + +- Use GitHub to create "Pull Requests" + + ngIRCd is hosted on GitHub (<https://github.com/ngircd>), so please use the + tools available there and open issues (comment!) and create pull requests! + See <https://help.github.com/articles/using-pull-requests/> for details. diff --git a/deprecated-ngircd/doc/FAQ.md b/deprecated-ngircd/doc/FAQ.md new file mode 100644 index 0000000..2a0ae1d --- /dev/null +++ b/deprecated-ngircd/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 :-) diff --git a/deprecated-ngircd/doc/HowToRelease.txt b/deprecated-ngircd/doc/HowToRelease.txt new file mode 100644 index 0000000..3551423 --- /dev/null +++ b/deprecated-ngircd/doc/HowToRelease.txt @@ -0,0 +1,89 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2024 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- HowToRelease.txt -- + + +I. Introduction +~~~~~~~~~~~~~~~ + +Creating a new ngIRCd release requires a few steps to follow: the source +tree must be in a releasable state (be up to date, include all required +patches, be tested on as many platforms as possible), a name for the new +release must be chosen, and all the files describing the release must be +updated accordingly. + +Since ngIRCd release 13 (2009-12-25) we use "simple" release numbers for +major releases (e.g. "13", "17", "42", ...) introducing new features and +sub-releases for bug fixes only (e.g. "14.1", "22.3", ...). + +When creating pre-releases or release candidates, please use the tilde ("~") +character to separate the "postfix" in the release number (e.g. "17~rc2" +or "123.4~rc6"). + +The release/version number of a build is automatically generated using the +GIT "describe" command, see git-describe(1). Therefore it is required that +a new release is tagged in the GIT tree and that the configure script is +up-to-date (e.g. using ./autogen.sh) before generating the archives! + + +II. How to prepare a new ngIRCd release? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +a) Make sure you have working versions of GNU autoconf and GNU automake + installed on the system you use for generating the release: + as of May 2020 we are using GNU autoconf 2.69 and GNU automake 1.11.6 + which seem to work just fine. + NOTE: new releases of GNU automake DO NOT work, as they lack support for + the "ansi2knr" wrapper and "de-ANSI-fication" support! + +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.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 + - NEWS + +d) Update the version numbers in the following files: + - contrib/de.barton.ngircd.metainfo.xml + - contrib/ngircd.spec + +e) Generate a new Debian change log entry in the following file, e.g. using + the Debian "dch" tool of the "devscripts" package: + - contrib/Debian/changelog + +f) Commit the above changes to GIT: "git add", "git commit" + +g) Create a new signed GIT tag for the new release: "git tag -s". + Please note that we don't use the tilde ("~") here, instead use a simple + hyphen ("-") as delimiter: e.g. "rel-16" "rel-17-rc1", "rel-18-pre2", ... + +h) Run "./autogen.sh" to update the ./configure script with the correct + release number (autogenerated using "git describe", see above). + +i) Run "./configure" to rebuild all generated Makefiles. + +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>" + +l) Upload and distribute the newly generated ngIRCd release archive(s) + and GnuPG signatures (to the website, its mirrors, and GitHub). + +m) Update the ngIRCd website and its mirrors! + +n) Write an announcement to the mailing list, Twitter, ... + +o) Relax :-) diff --git a/deprecated-ngircd/doc/Makefile.am b/deprecated-ngircd/doc/Makefile.am new file mode 100644 index 0000000..d37c9b3 --- /dev/null +++ b/deprecated-ngircd/doc/Makefile.am @@ -0,0 +1,92 @@ +# +# ngIRCd -- The Next Generation IRC Daemon +# 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 +# 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. +# + +.tmpl: + $(AM_V_GEN)sed \ + -e "s@:ETCDIR:@${sysconfdir}@" \ + -e "s@:DOCDIR:@${docdir}@" \ + <$< >$@ + +SUFFIXES = .tmpl + +static_docs = \ + Bopm.txt \ + Capabilities.txt \ + Commands.txt \ + Container.md \ + Contributing.txt \ + FAQ.md \ + HowToRelease.txt \ + Modes.txt \ + PAM.txt \ + Platforms.txt \ + Protocol.txt \ + README-AUX.txt \ + README-BeOS.txt \ + README-Interix.txt \ + RFC.txt \ + Services.txt \ + SSL.md + +doc_templates = sample-ngircd.conf.tmpl + +generated_docs = sample-ngircd.conf + +toplevel_docs = ../AUTHORS.md ../COPYING ../ChangeLog ../INSTALL.md ../NEWS ../README.md + +SUBDIRS = src + +EXTRA_DIST = $(static_docs) $(doc_templates) + +CLEANFILES = $(generated_docs) + +maintainer-clean-local: + rm -f Makefile Makefile.in + +all: $(generated_docs) + +install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs) + $(MKDIR_P) -m 755 $(DESTDIR)$(sysconfdir) + @if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \ + ${MAKE} install-config; \ + fi + $(MKDIR_P) -m 755 $(DESTDIR)$(docdir) + for f in $(static_docs) $(toplevel_docs); do \ + $(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \ + done + for f in $(generated_docs); do \ + $(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \ + done + +install-config: + $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf + @echo; \ + echo " ** NOTE: Installed sample configuration file:"; \ + echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \ + echo + +uninstall-hook: + rm -rf $(DESTDIR)$(docdir) + @if cmp --silent sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; then \ + ${MAKE} uninstall-config; \ + else \ + echo; \ + echo " ** NOTE: Not uninstalling changed configuration file:"; \ + echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \ + echo; \ + fi + +uninstall-config: + rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf + +.PHONY: install-config uninstall-config + +# -eof- diff --git a/deprecated-ngircd/doc/Modes.txt b/deprecated-ngircd/doc/Modes.txt new file mode 100644 index 0000000..92e6613 --- /dev/null +++ b/deprecated-ngircd/doc/Modes.txt @@ -0,0 +1,95 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2015 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- Modes.txt -- + + +This document lists the different user modes, channel modes, and channel +user modes that ngIRCd supports. + + +I. User Modes +~~~~~~~~~~~~~ + +User modes are attributes a user has in the network, regardless of the +channels he is using at the moment. + + mode since description + + a 0.3.0 User is away. + b 20 User blocks private messages and notices. + B 20 User is flagged as a "bot". + c 17 IRC operator wants to receive connect/disconnect NOTICEs. + C 19 Only users that share a channel are allowed to send messages. + F 22 Relaxed flood protection (only settable by IRC Operators). + i 0.0.1 User is "invisible". + I 23 No channels are shown on WHOIS (IRC Ops can always see those). + o 0.0.1 User is IRC operator. + q 20 User is protected, can not be kicked from a channel. + r 0.0.1 User is restricted. + R (1) 19 User is registered (e.g. by NickServ). + s 0.4.0 User wants to receive server notices. + w 0.11.0 User wants to receive WALLOPS messages. + x 17 Hostname of this user is "cloaked". + +II. Channel Modes +~~~~~~~~~~~~~~~~~ + +Channel modes are attributes of specific channels which are valid for all +users joined (or trying to join) to this channel. Some modes add and remove +users to lists (e.g. "invite list", "ban list"), others have parameters +(like "channel key"), most are simple flags (like "moderated"). + + mode since description + + b 0.5.0 Add/remove a host mask to the ban list. + e 19 Add/remove a host mask to the exception list. + i 0.5.0 Channel is "invite only". + I 0.5.0 Add/remove a host mask to the invite list. + k 0.6.0 Channel has a "key" (a password). + l 0.6.0 Channel has a user limit. + m 0.3.0 Channel is moderated, only "voiced" users can send messages. + M 20 Only registered users (and IRC Ops) can send messages. + n 0.3.0 Channel doesn't allow messages of users not being members. + N 23 Users can't change their nickname while on this channel. + O 18 Only IRC operators are allowed to join this channel. + P 0.5.0 Channel is "persistent". + Q 20 Nobody can be kicked from the channel. + r (1) 19 Channel is "registered" (e.g. by ChanServ). + R 19 Only registered users are allowed to join this channel. + s 0.9.0 Channel is "secret". + t 0.3.0 Only ChanOps are allowed to modify the channel topic. + V 20 Channel doesn't allow invites. + z 16 Only users connected via SSL are allowed to join the channel. + +III. Channel User Modes +~~~~~~~~~~~~~~~~~~~~~~~ + +Channel user modes are attributes that a particular user has in a specific +channel of which he is a member. + + mode since description + + q 20 User is channel owner. This mode can only be set by an IRC + service, other owner or IRC operator. Channel owners can + promote other users to all levels: q, a, o, h, v. Prefix: "~". + a 20 User is channel admin and can promote other users to v, h, o. + Prefix: "&". + o 0.2.0 User is channel operator and can op/kick/... other members. + Prefix: "@". + h 20 User is half op and can set channel modes imntvIbek and kick + voiced and normal users. Prefix: "%". + v 0.2.0 User is "voiced" and can speak even if channel is moderated. + Prefix: "+". + + +Notes +~~~~~ + +(1) This mode is not set by ngIRCd itself but by services. ngIRCd handles + the mode transparently and possibly adjusts its behavior. diff --git a/deprecated-ngircd/doc/PAM.txt b/deprecated-ngircd/doc/PAM.txt new file mode 100644 index 0000000..818c4f1 --- /dev/null +++ b/deprecated-ngircd/doc/PAM.txt @@ -0,0 +1,49 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2013 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- PAM.txt -- + + +ngIRCd can optionally be compiled to use PAM, the Pluggable Authentication +Modules library, for user authentication. When compiled with PAM support, +ngIRCd will authenticate all users connecting to the daemon using the +configured PAM modules in an asynchronous child process. + +To enable PAM, you have to pass the command line parameter "--with-pam" to +the "configure" script. Please see the PAM documentation ("man 7 pam") for +details and information about configuring PAM and its individual modules. + +A very simple -- and quite useless ;-) -- example would be: + + /etc/pam.d/ngircd: + auth required pam_debug.so + +Here the "pam_debug" module will be called each time a client connects to +the ngIRCd and has sent its PASS, NICK, and USER commands. + +The PAM library used by the ngIRCd daemon must be able to access its +configuration file, so don't forget to check permissions and run something +like this: "chmod 644 /etc/pam.d/ngircd". + +Please note ONE VERY IMPORTANT THING: + +All the PAM modules are executed with the privileges of the user ngIRCd +is running as. Therefore a lot of PAM modules aren't working as expected, +because they need root privileges ("pam_unix", for example)! +Only PAM modules not(!) requiring root privileges (such as "pam_pgsql", +"pam_mysql", "pam_opendirectory" ...) can be used in conjunction with ngIRCd. + +More Examples: + + * Use an own "password file" for ngIRCd: + + Note: you can use the htpasswd(1) utility of Apache to manage password + files used by pam_pwdfile, see "man htpasswd"! + + /etc/pam.d/ngircd: + auth required pam_pwdfile.so pwdfile=/etc/ngircd/ngircd.passwd diff --git a/deprecated-ngircd/doc/Platforms.txt b/deprecated-ngircd/doc/Platforms.txt new file mode 100644 index 0000000..f982c0c --- /dev/null +++ b/deprecated-ngircd/doc/Platforms.txt @@ -0,0 +1,179 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2024 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- Platforms.txt -- + + +This file lists the status of all platforms on which ngIRCd has been tested. +Included is the date and version of the last test and the name of the tester +or maintainer. + +If you successfully compiled and tested ngIRCd on a platform that isn't listed +here, please write to the mailing list so that this list can be updated. The +script "./contrib/platformtest.sh" should output a summary that is suitable +for inclusion here. Thanks for your help! + + + the executable works ("runs") as expected --+ + tests run successfully ("make check") --+ | + ngIRCd compiles ("make") --+ | | + ./configure works --+ | | | + | | | | +Platform Compiler ngIRCd Date Tester C M T R * +--------------------------- ------------ ---------- -------- -------- - - - - - +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 27~rc1 24-04-13 alex Y Y Y Y 3 +aarch64/unknown/linux-gnu gcc 12.2.0 27~rc1 24-04-21 alex Y Y Y Y 1 +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 +armv7l/unk./linux-gnueabi gcc 4.4.3 19.1 12-04-29 goetz Y Y Y Y 5 +armv7l/unk./linux-gnueabihf gcc 4.6.3 22~rc1-3 14-10-10 alex Y Y Y Y 5 +armv7l/unk./linux-gnueabihf gcc 4.8.2 21.1 14-07-15 goetz Y Y Y Y 5 +armv7l/unk./linux-gnueabihf gcc 4.9.2 23 16-01-10 alex Y Y Y Y 5 +hppa/unknown/openbsd3.5 gcc 2.95.3 CVSHEAD 04-05-25 alex Y Y Y Y +hppa/unknown/openbsd5.4 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y y Y 3 +hppa1.1/unknown/linux-gnu gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y +hppa2.0/unknown/linux-gnu gcc 3.3.5 13~rc1 08-12-02 alex Y Y Y Y +hppa2.0w-hp-hpux11.11 gcc 4.2.3 14.1 09-07-22 goetz Y Y Y Y +i386/apple/darwin9.7.0 gcc 4.0.1 14.1 09-08-04 alex Y Y Y Y 3 +i386/apple/darwin10.8.0 gcc 4.2.1 19 12-02-26 alex Y Y Y Y 3 +i386/apple/darwin11.3.0 gcc 4.2.1 19 12-02-26 alex Y Y Y Y 3 +i386/pc/linux-gnu gcc 4.1.2 13~rc1 08-12-05 alex Y Y Y Y 1 +i386/pc/linux-gnu gcc 4.4.5 22~rc1-3 14-10-10 alex Y Y Y Y 1 +i386/pc/minix clang 3.4 23 16-01-06 goetz Y Y N Y +i386/pc/solaris2.9 gcc 3.2.2 CVSHEAD 04-02-24 alex Y Y Y Y +i386/pc/solaris2.11 gcc 4.8.2 24 17-01-21 goetz Y Y Y Y 4 +i386/unknown/freebsd5.2.1 gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y +i386/unknown/freebsd6.2 gcc 3.4.6 20~rc1 12-11-13 alex Y Y Y Y 3 +i386/unknown/freebsd7.3 gcc 4.2.1 24~rc1-7 17-01-20 alex Y Y Y Y 3 +i386/unknown/netbsdelf1.5.2 egcs-1.1.2 21 13-11-25 goetz Y Y N Y +i386/unknown/netbsdelf1.6.2 gcc 2.95.3 18 11-07-10 goetz Y Y Y Y +i386/unknown/netbsdelf3.0.1 gcc 3.3.3 0.10.0-p1 06-08-30 alex Y Y Y Y 3 +i386/unknown/netbsdelf4.0 gcc 4.1.2 24~rc1-7 17-01-20 alex Y Y Y Y 3 +i386/unknown/netbsdelf5.0.2 gcc 4.1.3 19 12-02-26 alex Y Y Y Y 3 +i386/unknown/openbsd3.5 gcc 2.95.3 23 15-11-27 goetz Y Y y Y 3 +i386/unknown/openbsd3.9 gcc 3.3.5 0.10.0-p1 06-08-30 alex Y Y Y Y 3 +i386/unknown/openbsd4.1 gcc 3.3.5 16 10-04-11 alex Y Y Y Y 3 +i386/unknown/openbsd5.3 gcc 4.2.1 21 13-11-28 goetz Y Y Y Y 3 +i386/unknown/openbsd5.4 gcc 4.2.1 21 13-11-28 goetz Y Y Y Y 3 +i586/pc/haiku gcc 2.95.3 19.2~138 12-10-11 user Y Y N N +i586/pc/interix3.5 gcc 3.3 23 16-01-29 alex Y Y N Y +i686/pc/cygwin gcc 4.9.3 23 16-01-06 alex Y Y Y Y +i686/pc/linux-gnu gcc 2.6.3 23 16-01-06 goetz Y Y y Y 1 +i686/pc/linux-gnu gcc 2.7.2.1 23 15-11-30 goetz Y Y N Y 1 +i686/pc/linux-gnu gcc 2.95.2 23 15-12-23 goetz Y Y Y Y 1 +i686/pc/linux-gnu gcc 2.95.4 0.8.0 04-05-30 alex Y Y Y Y 1 +i686/pc/linux-gnu gcc 3.3.5 14.1 09-08-04 alex Y Y Y Y 1 +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 27~rc1 24-04-21 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 +m68k/apple/aux3.1.1 gcc 2.7.2 19 12-02-26 alex Y Y N Y +m68k/apple/aux3.1.1 Orig. A/UX 19 12-02-26 alex Y Y N Y 2 +m68k/hp/hp-ux9.10 Orig. HPUX 0.7.x-CVS 03-04-30 goetz Y Y Y Y +m88k/dg/dgux5.4R3.10 gcc 2.5.8 CVSHEAD 04-03-15 alex Y Y ? ? +mips/sgi/irix6.5 SGI 25 19-12-29 goetz Y Y ? ? +mipsel/openwrt/linux-uclibc gcc 4.8 24~9-g619a 18-01-28 goetz - - - Y 6 +mipsel/unknown/linux-gnu gcc 4.1.2 18 11-07-05 goetz Y Y N Y 1 +mipsel/unknown/linux-gnu gcc 4.4.5 21 13-11-24 goetz Y Y Y Y 1 +mipsel/unknown/netbsd8.0 gcc 5.5.0 25 19-08-09 root Y Y y Y 3 +powerpc/apple/darwin6.8 gcc 3.1 21 14-01-03 goetz Y Y Y Y +powerpc/apple/darwin7.9.0 gcc 3.3 22 15-03-22 goetz Y Y Y Y 3 +powerpc/apple/darwin8.11.0 gcc 4.0.1 26 20-07-08 goetz Y Y Y Y 3 +powerpc/apple/darwin9.8.0 gcc 4.0.1 21 14-01-04 goetz Y Y Y Y 3 +powerpc/unknown/linux-gnu gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y +powerpc/unknown/openbsd3.6 gcc 2.95.3 0.10.0 06-10-08 alex Y Y N Y +sparc/sun/solaris2.6 gcc 2.95.3 0.7.x-CVS 03-04-22 alex Y Y Y Y +sparc/sun/solaris2.7 gcc 3.3 0.8.0 04-05-30 alex Y Y Y Y +sparc/unkn./netbsdelf1.6.1 gcc 2.95.3 0.8.0 04-05-30 alex Y Y Y Y +sparc/unknown/openbsd5.5 gcc 4.2.1 21.1 14-05-03 goetz Y Y Y Y 3 +x86_64/apple/darwin10.8.0 gcc 4.2.1 21~rc2 13-10-30 alex Y Y Y Y 3 +x86_64/apple/darwin12.3.0 gcc 4.2.1 20.2 13-04-01 alex Y Y Y Y 3 +x86_64/apple/darwin13.0.0 A-clang 5.0 21 14-01-02 alex Y Y Y Y 3 +x86_64/apple/darwin14.5.0 A-clang 6.1 23~rc1 15-09-06 alex Y Y Y Y 3 +x86_64/apple/darwin15.6.0 A-clang 8.0 23~38-g455 16-11-04 alex Y Y Y Y 3 +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 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 27~rc1 24-04-21 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 26 20-08-28 alex Y Y Y Y 3 +x86_64/unknown/freebsd14.0 F-clang 16.0 27~rc1 24-04-21 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 27~rc1 24-04-21 user 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 D-clang 14.0 27~rc1 24-04-21 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 +x86_64/unknown/linux-gnu gcc 4.7.2 23~rc1-3 15-11-15 alex Y Y Y Y 1 +x86_64/pc/linux-gnu gcc 4.8.4 24~rc1-7 17-01-20 alex Y Y Y Y 1 +x86_64/pc/linux-gnu gcc 4.9.2 24~rc1-7 17-01-20 alex Y Y Y Y 1 +x86_64/unknown/linux-gnu gcc 5.3.0 23 15-12-14 goetz Y Y Y Y 1 +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 27~rc1 24-04-21 alex Y Y Y Y 1 +x86_64/pc/linux-gnu gcc 12.2.0 27~rc1 24-04-21 alex Y Y Y Y 1 +x86_64/pc/linux-gnu gcc 13.2.1 27~rc1 24-04-21 alex Y Y Y Y 1 +x86_64/pc/solaris2.11 gcc 10.3.0 27~rc1 24-04-26 alex Y Y y Y 5 +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 27~rc1 24-04-21 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 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 27~rc1 24-04-21 alex Y Y Y Y 3 + + +* Notes +~~~~~~~ + +(1) */*/linux-gnu (Linux platforms): + ngIRCd has been tested with various Linux distributions, such as ArchLinux, + Debian, Gentoo, Red Hat (Fedora) and SuSE using Linux kernels 2.2.x, 2.4.x, + 2.6.x, 3.x, 4.x and 5.x, with various versions of the GNU C compiler + (starting with 2.95.x) and Clang. The eldest glibc used was glibc-2.0.7. + ngIRCd compiled and ran on all of these systems successfully. + Current Linux kernels (starting with 2.6.x) and glibc's support the more + efficient epoll() IO interface, see (5) below. + +(2) This compiler is a pre-ANSI C compiler (K&R), therefore the source code is + automatically converted using the included ansi2knr tool while building. + +(3) Using the kqueue() IO interface. + +(4) Using the /dev/poll IO interface. + +(5) Using the epoll() IO interface. + +(6) ngIRCd has been cross-compiled with gcc 4.8 on Ubuntu x86-64 for + MIPSEL Linux OpenWRT distribution (uclibc), for the target computer + Vocore2, where the created binary ran well. + +(7) This actually is Windows 10 running Windows Subsystem for Linux (WSL). diff --git a/deprecated-ngircd/doc/Protocol.txt b/deprecated-ngircd/doc/Protocol.txt new file mode 100644 index 0000000..b920b45 --- /dev/null +++ b/deprecated-ngircd/doc/Protocol.txt @@ -0,0 +1,265 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2019 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- Protocol.txt -- + + +I. Compatibility +~~~~~~~~~~~~~~~~ + +The ngIRCd implements the Internet Relay Chat (IRC) protocol version 2.10 +as defined in RFC ("request for comment") 1459 and 2810-2813. These (and +probably further relevant RFCs) are listed in doc/RFC.txt. + +Unfortunately, even the "original" ircd doesn't follow these specifications +in all details. But because the ngIRCd should be a fully compatible +replacement for this server ("ircd") it tries to emulate these differences. + +If you don't like this behavior please ./configure the ngIRCd using the +"--enable-strict-rfc" command line option. But keep in mind: not all IRC +clients are compatible with a server configured that way, some can't even +connect at all! Therefore this option usually isn't desired for "normal +server operation". + +In addition, ngIRCd implements some "IRCv3" features. This includes: + - IRCv3 Client Capability Negotiation + - IRCv3.1 multi-prefix Extension + - IRCv3.2 userhost-in-names Extension +Please see the IRCv3 homepage for more information: <https://ircv3.net>. + + +II. The IRC+ Protocol +~~~~~~~~~~~~~~~~~~~~~ + +Starting with version 0.5.0, the ngIRCd extends the original IRC protocol +as defined in RFC 2810-2813. This enhanced protocol is named "IRC+". It is +backwards compatible to the "plain" IRC protocol and will only be used by +the ngIRCd if it detects that the peer supports it as well. + +The "PASS" command is used to detect the protocol and peer versions see +RFC 2813 (section 4.1.1) and below. + + +II.1 Register new server link + + Command: PASS + Parameters: <password> <version> <flags> [<options>] + Used by: servers only (with these parameters) + +<password> is the password for this new server link as defined in the server +configuration which is sent to the peer or received from it. + +<version> consists of two parts and is at least 4, at most 14 characters +long: the first four bytes contain the IRC protocol version number, whereas +the first two bytes represent the major version, the last two bytes the +minor version (the string "0210" indicates version 2.10, e.g.). + +The following optional(!) 10 bytes contain an implementation-dependent +version number. Servers supporting the IRC+ protocol as defined in this +document provide the string "-IRC+" here. + +Example for <version>: "0210-IRC+". + +<flags> consists of two parts separated with the character "|" and is at +most 100 bytes long. The first part contains the name of the implementation +(ngIRCd sets this to "ngircd", the original ircd to "IRC", e.g.). The second +part is implementation-dependent and should only be parsed if the peer +supports the IRC+ protocol as well. In this case the following syntax is +used: "<serverversion>[:<serverflags>]". + +<serverversion> is an ASCII representation of the clear-text server version +number, <serverflags> indicates the supported IRC+ protocol extensions (and +may be empty!). + +The following <serverflags> are defined at the moment: + +- C: The server supports the CHANINFO command. + +- L: INVITE- and BAN-lists should be synchronized between servers: if the + peer understands this flag, it will send "MODE +I" and "MODE +b" + commands after the server link has been established. + +- H: The server supports the "enhanced server handshake", see section II.2 + for a detailed description. + +- M: Changing client "metadata" (hostname, real name, ...) using the + METADATA command is supported. + +- o: IRC operators are allowed to change channel- and channel-user-modes + even if they aren't channel-operator of the affected channel. + +- S: The server supports the SERVICE command (on this link). + +- X: Server supports XOP channel modes (owner, admin, halfop) and supports + these user prefixes in CHANINFO commands, for example. + +- Z: Compressed server links are supported by the server. + +Example for a complete <flags> string: "ngircd|0.7.5:CZ". + +The optional parameter <options> is used to propagate server options as +defined in RFC 2813, section 4.1.1. + + +II.2 Enhanced Server Handshake + +The "enhanced server handshake" is used when both servers support this IRC+ +extension, which is indicated by the 'H' flag in the <serverflags> sent with +the PASS command, see section II.1. + +It basically means, that after exchanging the PASS and SERVER commands the +server is not registered in the network (as usual), but that IRC numerics +are exchanged until the numeric 376 (ENDOFMOTD) is received. Afterwards the +peer is registered in the network as with the regular IRC protocol. + +A server implementing the enhanced server handshake (and indicating this +using 'H' in the <serverflags>) MUST ignore all unknown numerics to it +silently. + +In addition, such a server should at least send the numeric 005 (ISUPPORT) +to its peer, containing the following information. Syntax: <key>=<value>, +one token per IRC parameter. If the server has to send more than 12 token +it must send separate ISUPPORT numerics (this is a limitation of the IRC +protocol which allows at max 15 arguments per command). + + - NICKLEN: Maximum nickname length. Default: 9. + - CASEMAPPING: Case mapping used for nick- and channel name comparing. + Default: "ascii", the chars [a-z] are lowercase of [A-Z]. + - PREFIX: List of channel modes a person can get and the respective prefix + a channel or nickname will get in case the person has it. The order of the + modes goes from most powerful to least powerful. Default: "(ov)@+" + - CHANTYPES: Supported channel prefixes. Default: "#". + - CHANMODES: List of channel modes for 4 types, separated by comma (","): + Mode that adds or removes a nick or address to a list, mode that changes + a setting (both have always has a parameter), mode that changes a setting + and only has a parameter when set, and mode that changes a setting and + never has a parameter. For example "bI,k,l,imnPst". + - CHANLIMIT: Maximum number of channels allowed to join by channel prefix, + for example "#:10". + +Please see <http://www.irc.org/tech_docs/005.html> for details. + +The information exchanged using ISUPPORT can be used to detect configuration +incompatibilities (different maximum nickname length, for example) and +therefore to disconnect the peer prior to registering it in the network. + + +II.3 Exchange channel-modes, topics, and persistent channels + + Command: CHANINFO + Parameters: <channel> +<modes> [[<key> <limit>] <topic>] + Used by: servers only + +CHANINFO is used by servers to inform each other about a channel: its +modes, channel key, user limits and its topic. The parameter combination +<key> and <limit> is optional, as well as the <topic> parameter, so that +there are three possible forms of this command: + + CHANINFO <channel> +<modes> + CHANINFO <channel> +<modes> <topic> + CHANINFO <channel> +<modes> <key> <limit> <topic> + +If the channel already exists on the server receiving the CHANINFO command, +it only adopts the <modes> (or the <topic>) if there are no modes (or topic) +already set. It there are already values set the server ignores the +corresponding parameter. + +If the channel doesn't exists at all it will be created. + +The parameter <key> must be ignored if a channel has no key (the parameter +<modes> doesn't list the "k" channel mode). In this case <key> should +contain "*" because the parameter <key> is required by the CHANINFO syntax +and therefore can't be omitted. The parameter <limit> must be ignored when +a channel has no user limit (the parameter <modes> doesn't list the "l" +channel mode). In this case <limit> should be "0". + + +II.4 Update webchat/proxy client information + + Command: WEBIRC + Parameters: <password> <username> <hostname> <ip-address> [<ignored>] + Used by: unregistered clients only + +The WEBIRC command is used by some Web-to-IRC gateways to set the correct +user name and host name of users instead of their own. It must be the very +first command sent to the server, even before USER and NICK commands! + +The <password> must be set in the server configuration file to prevent +unauthorized clients to fake their identity; it is an arbitrary string. + +Optionally, a 5th parameter is accepted to comply with an IRCv3 extension, +see <https://github.com/ircv3/ircv3-ideas/issues/12>, but ignored. + + +II.5 Client character encoding conversion + + Command: CHARCONV + Parameters: <client-charset> + Used by: registered clients + Replies: RPL_IP_CHARCONV, ERR_IP_CHARCONV + +A client can set its character set encoding using the CHARCONV command: +after receiving such a command, the server translates all message data +received from the client using the set <client-charset> to the server +encoding (UTF-8), and all message data which is to be sent to the client +from the server encoding (UTF-8) to <client-charset>. + +The list of supported client character sets is implementation dependent. + +If a client sets its <client-charset> to the server encoding (UTF-8), +it disables all conversions; the connection behaves as if no CHARCONV +command has been sent at all in this session. + + +II.6 Update client "metadata" + + Command: METADATA + Parameters: <target> <key> <value> + Used by: servers only + +The METADATA command is used on server-links to update "metadata" information +of clients, like the hostname, the info text ("real name"), or the user name. + +The server updates its client database according to the received <key> and +<value> parameters, and passes the METADATA command on to all the other +servers in the network that support this command (see section II.1 "Register +new server link", <serverflag> "M"), even if it doesn't support the given +<key> itself: unknown <key> names are ignored silently! + +The following <key> names are defined: + + - "accountname": the account name of a client (can't be empty) + - "certfp": the certificate fingerprint of a client (can't be empty) + - "cloakhost": the cloaked hostname of a client + - "host": the hostname of a client (can't be empty) + - "info": info text ("real name") of a client + - "user": the user name of a client (can't be empty) + + +III. Numerics used by IRC+ Protocol +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The IRC+ protocol uses numerics in the range 800-899 which aren't used by +RFC 2812 and hopefully don't clash with other implementations ... + +Numerics 800-849 are used for status and success messages, and numerics +850-899 are failure and error messages. + + +III.1 IRC+ status and success numerics + +801 - RPL_IP_CHARCONV + %1 :Client encoding set" + + %1 client character set + + +III.2 IRC+ failure and error numerics + +851 - ERR_IP_CHARCONV + :Can't initialize client encoding diff --git a/deprecated-ngircd/doc/QuickStart.md b/deprecated-ngircd/doc/QuickStart.md new file mode 100644 index 0000000..abea9cd --- /dev/null +++ b/deprecated-ngircd/doc/QuickStart.md @@ -0,0 +1,126 @@ +# [ngIRCd](https://ngircd.barton.de) - Quick Start + +This *Quick Start* document explains how to configure ngIRCd, the lightweight +Internet Relay Chat (IRC) server, using some "real world" scenarios. + +## Introduction + +The ngIRCd daemon can be run without any configuration file using built-in +defaults. These defaults are probably sufficient for very simple single-node +setups, but most probably need further tweaking for more "advanced" setups. + +You can check the current settings by running `ngircd --configtest`. This +command not only shows the settings, it shows error, warning and hints, if it +detects any. + +Therefore it is definitely best practice to *always run this check* after +making any changes to the configuration file(s) and double-check that +everything was parsed as expected! + +### Configuration File and Drop-in Directory + +After installing ngIRCd, a sample configuration file should have been set up if +none existed 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`). +Run the command `ngircd --configtest` to check the name of the configuration +file which is used by default on your local system. + +In addition, ngIRCd supports configuration file snippets in a "drop-in" +directory which is configured with the `IncludeDir` variable in the `[Options]` +section and has a built-in default value (like `/etc/ngircd/ngircd.conf.d/`). +All configuration files matching the `*.conf` pattern are read-in from this +directory after the main `ngircd.conf` file. + +It is a good idea to not edit the default `ngircd.conf` file but to create one +ore more new files in this include directory, overriding the defaults as +needed. This way you don't get any clashes when updating ngIRCd to newer +releases. + +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. + +## Configuration File Syntax + +The configuration consists of sections and parameters. + +A section begins with the name of the section in square brackets (like +`[Example]`) and continues until the next section begins. Sections contain +parameters of the form `name = value`. + +Section and parameter names are not case sensitive. + +Please see the `ngircd.conf`(5) manual page for an in-depth description of the +configuration file, its syntax and all supported configuration options. + +The sample configuration file uses comments beginning with `#` *or* `;` -- this +is only for the better understanding of the file, both comment styles are +equal. The lines commented out with `;` show example or default settings, +whereas the lines using `#` are descriptions of the options. + +## Simple Single-Instance Server + +A good starting point is to configure a valid (and unique!) IRC server name +(which is *not* related to a host name, it is purely a unique *server ID* that +must contain at least one dot "."). + +This looks like this: + +``` ini +[Global] +Name = my.irc.server +``` + +This results in the following *warning* in the logs when starting the daemon: +`No administrative information configured but required by RFC!` -- which works, +but is a bit ugly. So let's fix that by adding some *admin info*: + +``` ini +[Global] +Name = irc.example.net +AdminInfo1 = Example IRC Server +AdminInfo2 = Anywhere On Earth +AdminEMail = admin@irc.example.net +``` + +*Please Note*: The server `Name` looks like a DNS host name, but it is not: in +fact it is not related to your server's fully qualified domain name (FQDN) in +any way and can be an arbitrary string -- but it *must* contain at least +one dot (".") character! + +## Add a Local IRC Operator + +Some IRC commands, like `REHASH` which reloads the server configuration on the +fly, require the user to authenticate to the daemon to become an *IRC +Operator* first. + +So let's configure an *Operator* account in the configuration file (in +addition to what we configured above): + +``` ini +[Operator] +# ID of the operator (may be different of the nickname) +Name = BigOp +# Password of the IRC operator +Password = secret +# Optional Mask from which /OPER will be accepted +;Mask = *!ident@somewhere.example.com +``` + +Now you can use the IRC command `OPER BigOp secret` to get *IRC Operator* +status on that server. + +Please choose a sensible password, and keep in mind that the *name* is not +related to the *nickname* used by the user at all! + +We don't make use of the `Mask` setting in the example above (commented out +with the `;` character), but it is a good idea to enable it whenever possible! + +And you can have as many *Operator blocks* as you like, configuring multiple +different IRC Operators. + +## Configuring SSL/TLS Encryption + +Please see the file `SSL.md` for details. diff --git a/deprecated-ngircd/doc/README-AUX.txt b/deprecated-ngircd/doc/README-AUX.txt new file mode 100644 index 0000000..b90c681 --- /dev/null +++ b/deprecated-ngircd/doc/README-AUX.txt @@ -0,0 +1,67 @@ + + ngIRCd - Next Generation IRC Server + + (c)2001-2005 Alexander Barton, + alex@barton.de, http://www.barton.de/ + + ngIRCd is free software and published under the + terms of the GNU General Public License. + + + -- README-AUX.txt -- + + +Since version 0.2.2-pre Apple's A/UX belongs to the officially supported +platforms. It is not restricted in any way. + +Since version 0.5.0 ngIRCd's source compiles with the native A/UX c +compiler. GNU C isn't a must-have anymore. + +The following software packages are needed: + + - GNU sed + Source: + http://www.rezepte-im-web.de/appleux/sed-3.02.tar.gz + http://arthur.barton.de/pub/unix/aux/tools/sed-3.02.tar.gz + + A/UX comes with /bin/sed which isn't supporting all functions needed + by GNU automake/autoconf. + + Warning: When installing GNU sed please make sure that A/UX doesn't + use the old one anymore which means set the $PATH or replace /bin/sed + at all. + + - libUTIL.a + Source: + ftp://ftp.mayn.de/pub/really_old_stuff/apple/apple_unix/Sys_stuff/libUTIL-2.1.tar.gz> + http://arthur.barton.de/pub/unix/aux/libraries/libUTIL-2.1.tar.gz + + This library contains functions that are common on other UNIX + systems but not on A/UX e.g. memmove(), strerror() and strdup(). + + +After installation of these packages just do a "./configure" and "make" to +compile ngIRCd on A/UX. + + +A few hints in case of errors: + + - Either there's an 'install' on your system which is completely broken + (so 'configure' uses its own shell script) or use a fully functionable one. + There's at least one binary "out there" causing problems. The one + of the GNU fileutils works fine: + http://arthur.barton.de/pub/unix/aux/tools/fileutils-4.0.tar.gz + + - The precompiled binary of the old 'bash' shouldn't be installed within + /bin (better do this in /usr/local/bin) because 'configure' would + choose it as its shell which wouldn't work. + + - Because of limitations of /bin/sh on A/UX it can't be used to create + the 'config.status' script. Better rename /bin/sh to /bin/sh.AUX and + replace it by a symbolic link to /bin/ksh (ln -s /bin/ksh /bin/sh as + root). + These procedure shouldn't cause you into problems and is recommended + even if you don't use ngIRCd. + +-- +$Id: README-AUX.txt,v 1.10 2006/07/23 12:19:57 alex Exp $ diff --git a/deprecated-ngircd/doc/README-BeOS.txt b/deprecated-ngircd/doc/README-BeOS.txt new file mode 100644 index 0000000..9e8df38 --- /dev/null +++ b/deprecated-ngircd/doc/README-BeOS.txt @@ -0,0 +1,53 @@ + + ngIRCd - Next Generation IRC Server + + (c)2001-2003 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. + + -- README-BeOS.txt -- + + + +-------------------------------------------------------------+ + | This text is only available in german at the moment, sorry! | + | Contributors for this text or the BeOS port are welcome :-) | + +-------------------------------------------------------------+ + + +BeOS gehoert im Moment (noch?) nicht zu den offiziell unterstuetzten Plat- +formen: der ngIRCd enthaelt zwar bereits einige Anpassungen an BeOS und +compiliert auch, jedoch bricht er bei jedem Connect-Versuch eines Clients +mit diesem Fehler ab: + + select(): Bad file descriptor! + +Es sieht leider so aus, als ob das select() von BeOS nicht mit File-Handles +von Pipes verschiedener Prozesse umgehen kann: sobald der Resolver asynchron +gestartet wird, also Pipe-Handles im select() vorhanden sind, fuehrt das zu +obiger Meldung. + +Theoretische "Loesung"/Workaround: +Den Resolver unter BeOS nicht verwenden, sondern mit IP-Adressen arbeiten. +Nachteil: der ngIRCd koennte sich nicht zu Servern verbinden, die dynamische +Adressen benutzen -- dazu muesste er den Namen aufloesen. Ansonsten sollte +es eigentlich zu keinen Beeintraechtigungen kommen ... + +Also: wenn es jemand implementieren will ... ;-)) + +Vielleicht mache ich es auch irgendwann mal selber. Mal sehen. + +2002-05-19: +Ich habe gerade damit ein wenig gespielt und den Source hier so geaendert, +dass unter BeOS keine Resolver-Subprozesse mehr erzeugt werden, sondern mit +den "rohen" IP-Adressen gearbeitet wird. Das funktioniert so weit auch, +allerdings verschluckt sich BeOS nun bei anderen Funktionen, so zum Beispiel +bei close(), wenn ein Socket eines Clients geschlossen werden soll!? +Sehr komisch. +Wer Interesse daran hat, das weiter zu verfolgen, der moege sich bitte mit +mir in Verbindung setzen (alex@barton.de), ich maile gerne meine Patches zu. +Fuer eine Aenderung im CVS ist es aber meiner Meinung nach noch zu frueh ... + +-- +$Id: README-BeOS.txt,v 1.7 2003/05/15 21:47:57 alex Exp $ diff --git a/deprecated-ngircd/doc/README-Interix.txt b/deprecated-ngircd/doc/README-Interix.txt new file mode 100644 index 0000000..f24f38d --- /dev/null +++ b/deprecated-ngircd/doc/README-Interix.txt @@ -0,0 +1,44 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2012 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- README-Interix.txt -- + + +ngIRCd release 15 has successfully been tested on Microsoft Windows XP +Professional using the Services for UNIX (SFU) version 3.5 and Microsoft +Windows 7 with the bundled Subsystem for UNIX Applications (SUA). + +SFU are supported on Windows 2000, Windows 2000 Server, Windows XP, and +Windows Server 2003. SUA is supported on Windows Server 2003 R2, Windows +Server 2008 & 2008 R2, Windows Vista, and Windows 7 -- so ngIRCd should be +able to run on all of these platforms. + +But please note that two things: + +1. Don't use the poll() IO API + +The poll() API function is not fully implemented by SFU/SUA and therefore +can't be used by ngIRCd -- which normally would be the default. Please see +<http://www.suacommunity.com/faqs.aspx> section 4.25 for details: + + "If you do try to use the poll() API your program will block on the + API call forever. You must direct your program to build using the + select() API." + +So when running the ./configure script, you HAVE TO DISABLE poll() support: + + ./configure --without-poll + +ngIRCd then defaults to using the select() API function which works fine. + +2. Use GNU make(1) + +Starting with ngIRCd 18, our build system doesn't work with the default +make(1) binary of Interix, you should use GNU make instead (tested with +version 3.82 built from source). + diff --git a/deprecated-ngircd/doc/RFC.txt b/deprecated-ngircd/doc/RFC.txt new file mode 100644 index 0000000..1524852 --- /dev/null +++ b/deprecated-ngircd/doc/RFC.txt @@ -0,0 +1,32 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2017 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- RFC.txt -- + + +The Internet Relay Chat (IRC) protocol is documented in these Request for +Comments (RFCs), which you can get via <http://www.faqs.org/rfcs/> or +<https://www.ietf.org/rfc.html> for example. + + 1459 Oikarinen, J. & D. Reed, "Internet Relay Chat Protocol", + May 1993, [IRC]. + + 2810 Kalt, C., "Internet Relay Chat: Architecture", + April 2000, [IRC-ARCH]. + + 2811 Kalt, C., "Internet Relay Chat: Channel Management", + April 2000, [IRC-CHAN]. + + 2812 Kalt, C., "Internet Relay Chat: Client Protocol", + April 2000, [IRC-CLIENT]. + + 2813 Kalt, C., "Internet Relay Chat: Server Protocol", + April 2000, [IRC-SERVER]. + + 7194 Hartmann, R., "Default Port for Internet Relay Chat (IRC) via TLS/SSL", + August 2014. diff --git a/deprecated-ngircd/doc/SSL.md b/deprecated-ngircd/doc/SSL.md new file mode 100644 index 0000000..c457e60 --- /dev/null +++ b/deprecated-ngircd/doc/SSL.md @@ -0,0 +1,81 @@ +# [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 +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 unauthenticated 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 or accept +incoming *server* connections, 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! diff --git a/deprecated-ngircd/doc/Services.txt b/deprecated-ngircd/doc/Services.txt new file mode 100644 index 0000000..f945bbf --- /dev/null +++ b/deprecated-ngircd/doc/Services.txt @@ -0,0 +1,152 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2011 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- Services.txt -- + + +ngIRCd doesn't implement a "special IRC services interface", but services +acting as a "regular servers" ("pseudo servers") are supported, either +using the IRC protocol as defined in RFC 1459 or RFC 2812. + +Support for Services has been tested using + - Anope 1.9.8 or later (<http://www.anope.org/>) + - Atheme 7.0.2 or later (<https://atheme.org/>) + - "IRC Services" 5.1.x by Andrew Church (<http://achurch.org/services/>) + +This document describes setting up ngIRCd and these services. + +Please let us know if you are successfully using other IRC service packages or +which problems you encounter -- thanks! + + +Setting up ngIRCd +~~~~~~~~~~~~~~~~~ + +The "pseudo server" handling the IRC services is configured as a regular +remote server in the ngircd.conf(5). In addition the variable "ServiceMask" +should be set, enabling this ngIRCd to recognize the "pseudo users" as IRC +services instead of regular IRC users. + +Example: + + [GLOBAL] + Name = server.irc.net + Ports = 6667 + + [SERVER] + Name = services.irc.net + MyPassword = 123abc + PeerPassword = 123abc + ServiceMask = *Serv + + +Setting up Anope 1.9.x & 2.x +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Anope 1.9.8 or later (<http://www.anope.org/>) can be used with ngIRCd using +the "ngircd" protocol module. + +At least the following settings have to be tweaked, in addition to all the +settings marked as required by Anope: + +In conf/services.conf: + + define + { + name = "services.host" + value = "services.irc.net" + } + + uplink + { + host = "server.irc.net" + port = 6667 + password = "123abc" + } + + # Load ngIRCd protocol module + module + { + name = "ngircd" + } + + networkinfo + { + # Must be set to the "MaxNickLength" setting of ngIRCd! + nicklen = 9 + + # When not using "strict mode", which is the default: + userlen = 20 + + chanlen = 50 + } + +In conf/nickserv.conf: + + module + { + name = "nickserv" + + # not required if you are running ngIRCd with a higher nickname limit + # ("MaxNickLength") than 11 characters, but REQUIRED by default! + guestnickprefix = "G-" + } + + +Setting up Atheme 7.0.2 or later +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Atheme 7.0.2 or later (<https://atheme.org/>) may be used with ngIRCd using +the "ngircd" protocol module. + +The following settings need to be in atheme.conf: + + loadmodule "modules/protocol/ngircd"; + + serverinfo { + name = "services.irc.net"; + } + + uplink "server.irc.net" { + password = "123abc"; + port = 6667; + }; + +The documentation of Atheme can be found in the doc/ directory of the +Atheme source distribution. + + +Setting up IRC Services 5.1.x +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +IRC Services 5.1.3 and above can be used with ngIRCd using the "rfc1459" +protocol module. + +Please note that versions up to and including 5.1.3 contain a bug that +sometimes causes IRC Services to hang on startup. There are two workarounds: + a) send the services process a HUP signal ("killall -HUP ircservices") + b) apply this patch to the IRC Services source tree: + <http://arthur.barton.de/pub/ngircd/contrib/IRCServices513-FlushBuffer.patch> + +At least the following settings have to be tweaked, in addition to all the +settings marked as required by IRC Services: + +In ircservices.conf: + + Variable Example value + + RemoteServer server.irc.net 6667 "123abc" + ServerName "services.irc.net" + LoadModule protocol/rfc1459 + +In modules.conf: + + Module protocol/rfc1459 + +The documentation of IRC Services can be found here: +<http://www.ircservices.za.net/docs/> diff --git a/deprecated-ngircd/doc/sample-ngircd.conf.tmpl b/deprecated-ngircd/doc/sample-ngircd.conf.tmpl new file mode 100644 index 0000000..f02c535 --- /dev/null +++ b/deprecated-ngircd/doc/sample-ngircd.conf.tmpl @@ -0,0 +1,426 @@ +# +# This is a sample configuration file for the ngIRCd IRC daemon, which must +# be customized to the local preferences and needs. +# +# Comments are started with "#" or ";". +# +# A lot of configuration options in this file start with a ";". You have +# to remove the ";" in front of each variable to actually set a value! +# The disabled variables are shown with example values for completeness only +# and the daemon is using compiled-in default settings. +# +# Use "ngircd --configtest" (see manual page ngircd(8)) to validate that the +# server interprets the configuration file as expected! +# +# Please see ngircd.conf(5) for a complete list of configuration options +# and their descriptions. +# + +[Global] + # The [Global] section of this file is used to define the main + # configuration of the server, 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! + + # Server name in the IRC network, must contain at least one dot + # (".") 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! + ;AdminInfo1 = Description + ;AdminInfo2 = Location + ;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. 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. 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: + # "0.0.0.0" or (if compiled with IPv6 support) "::,0.0.0.0" + # so the server listens on all IP addresses of the system by default. + ;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: 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. + ;MotdPhrase = "Hello world!" + + # The name of the IRC network to which this server belongs. This name + # is optional, should only contain ASCII characters, and can't contain + # spaces. It is only used to inform clients. The default is empty, + # so no network name is announced to clients. + ;Network = aIRCnetwork + + # Global password for all users needed to connect to the server. + # (Default: not set) + ;Password = abc + + # This tells ngIRCd to write its current process ID to a file. + # Note that the pidfile is written AFTER chroot and switching the + # user ID, e.g. the directory the pidfile resides in must be + # writable by the ngIRCd user and exist in the chroot directory. + ;PidFile = /var/run/ngircd/ngircd.pid + + # Ports on which the server should listen. There may be more than + # one port, separated with ",". (Default: 6667) + ;Ports = 6667, 6668, 6669 + + # Group ID under which the ngIRCd should run; you can use the name + # of the group or the numerical ID. ATTENTION: For this to work the + # server must have been started with root privileges! + ;ServerGID = 65534 + + # User ID under which the server should run; you can use the name + # of the user or the numerical ID. ATTENTION: For this to work the + # server must have been started with root privileges! In addition, + # the configuration and MOTD files must be readable by this user, + # otherwise RESTART and REHASH won't work! + ;ServerUID = 65534 + +[Limits] + # Define some limits and timeouts for this ngIRCd instance. Default + # values should be safe, but it is wise to double-check :-) + + # The server tries every <ConnectRetry> seconds to establish a link + # to not yet (or no longer) connected servers. + ;ConnectRetry = 60 + + # Number of seconds after which the whole daemon should shutdown when + # no connections are left active after handling at least one client + # (0: never, which is the default). + # This can be useful for testing or when ngIRCd is started using + # "socket activation" with systemd(8), for example. + ;IdleTimeout = 0 + + # Maximum number of simultaneous in- and outbound connections the + # server is allowed to accept (0: unlimited): + ;MaxConnections = 0 + + # Maximum number of simultaneous connections from a single IP address + # the server will accept (0: unlimited): + ;MaxConnectionsIP = 5 + + # Maximum number of channels a user can be member of (0: no limit): + ;MaxJoins = 10 + + # Maximum length of an user nickname (Default: 9, as in RFC 2812). + # Please note that all servers in an IRC network MUST use the same + # maximum nickname length! + ;MaxNickLength = 9 + + # Maximum penalty time increase in seconds, per penalty event. Set to -1 + # for no limit (the default), 0 to disable penalties altogether. The + # daemon doesn't use penalty increases higher than 2 seconds during + # normal operation, so values greater than 1 rarely make sense. + ;MaxPenaltyTime = -1 + + # Maximum number of channels returned in response to a /list + # command (0: unlimited): + ;MaxListSize = 100 + + # After <PingTimeout> seconds of inactivity the server will send a + # PING to the peer to test whether it is alive or not. + ;PingTimeout = 120 + + # If a client fails to answer a PING with a PONG within <PongTimeout> + # seconds, it will be disconnected by the server. + ;PongTimeout = 20 + +[Options] + # Optional features and configuration options to further tweak the + # behavior of ngIRCd. If you want to get started quickly, you most + # probably don't have to make changes here -- they are all optional. + + # List of allowed channel types (channel prefixes) for newly created + # channels on the local server. By default, all supported channel + # types are allowed. Set this variable to the empty string to disallow + # creation of new channels by local clients at all. + ;AllowedChannelTypes = #&+ + + # Are remote IRC operators allowed to control this server, e.g. + # use commands like CONNECT, SQUIT, DIE, ...? + ;AllowRemoteOper = no + + # A directory to chroot in when everything is initialized. It + # doesn't need to be populated if ngIRCd is compiled as a static + # binary. By default ngIRCd won't use the chroot() feature. + # ATTENTION: For this to work the server must have been started + # with root privileges! + ;ChrootDir = /var/empty + + # Set this hostname for every client instead of the real one. + # Use %x to add the hashed value of the original hostname. + ;CloakHost = cloaked.host + + # Use this hostname for hostname cloaking on clients that have the + # user mode "+x" set, instead of the name of the server. + # Use %x to add the hashed value of the original hostname. + # If this variable is empty, regular users cannot set mode "+x" themselves. + ;CloakHostModeX = cloaked.user + + # The Salt for cloaked hostname hashing. When undefined a random + # hash is generated after each server start. + ;CloakHostSalt = abcdefghijklmnopqrstuvwxyz + + # Set every clients' user name to their nickname + ;CloakUserToNick = yes + + # Try to connect to other IRC servers using IPv4 and IPv6, if possible. + ;ConnectIPv6 = yes + ;ConnectIPv4 = yes + + # Default user mode(s) to set on new local clients. Please note that + # only modes can be set that the client could set using regular MODE + # commands, you can't set "a" (away) for example! Default: none. + ;DefaultUserModes = i + + # Do DNS lookups when a client connects to the server. + ;DNS = yes + + # Do IDENT lookups if ngIRCd has been compiled with support for it. + # Users identified using IDENT are registered without the "~" character + # prepended to their user name. + ;Ident = yes + + # 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) + # by censoring some information like idle time, logon time, etc. + ;MorePrivacy = no + + # Normally ngIRCd doesn't send any messages to a client until it is + # registered. Enable this option to let the daemon send "NOTICE *" + # messages to clients while connecting. + ;NoticeBeforeRegistration = no + + # Should IRC Operators be allowed to use the MODE command even if + # they are not(!) channel-operators? + ;OperCanUseMode = no + + # Should IRC Operators get AutoOp (+o) in persistent (+P) channels? + ;OperChanPAutoOp = yes + + # Mask IRC Operator mode requests as if they were coming from the + # server? (This is a compatibility hack for ircd-irc2 servers) + ;OperServerMode = no + + # Use PAM if ngIRCd has been compiled with support for it. + # Users identified using PAM are registered without the "~" character + # prepended to their user name. + ;PAM = yes + + # When PAM is enabled, all clients are required to be authenticated + # using PAM; connecting to the server without successful PAM + # authentication isn't possible. + # If this option is set, clients not sending a password are still + # allowed to connect: they won't become "identified" and keep the "~" + # character prepended to their supplied user name. + # Please note: To make some use of this behavior, it most probably + # isn't useful to enable "Ident", "PAM" and "PAMIsOptional" at the + # same time, because you wouldn't be able to distinguish between + # Ident'ified and PAM-authenticated users: both don't have a "~" + # character prepended to their respective user names! + ;PAMIsOptional = no + + # When PAM is enabled, this value determines the used PAM + # configuration. + # This setting allows to run multiple ngIRCd instances with + # different PAM configurations on each instance. + # If you set it to "ngircd-foo", PAM will use + # /etc/pam.d/ngircd-foo instead of the default + # /etc/pam.d/ngircd. + ;PAMServiceName = ngircd + + # Let ngIRCd send an "authentication PING" when a new client connects, + # and register this client only after receiving the corresponding + # "PONG" reply. + ;RequireAuthPing = no + + # Silently drop all incoming CTCP requests. + ;ScrubCTCP = no + + # Syslog "facility" to which ngIRCd should send log messages. + # Possible values are system dependent, but most probably auth, daemon, + # user and local1 through local7 are possible values; see syslog(3). + # Default is "local5" for historical reasons, you probably want to + # change this to "daemon", for example. + ;SyslogFacility = local1 + + # Password required for using the WEBIRC command used by some + # Web-to-IRC gateways. If not set/empty, the WEBIRC command can't + # be used. (Default: not set) + ;WebircPassword = xyz + +;[SSL] + # SSL-related configuration options. Please note that this section + # 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. + # (Default: not set; so no certificates are trusted) + ;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 + + # Select cipher suites allowed for SSL/TLS connections. This defaults + # to HIGH:!aNULL:@STRENGTH (OpenSSL) or SECURE128 (GnuTLS). + # See 'man 1ssl ciphers' (OpenSSL) or 'man 3 gnutls_priority_init' + # (GnuTLS) for details. + # For OpenSSL: + ;CipherList = HIGH:!aNULL:@STRENGTH:!SSLv3 + # For GnuTLS: + ;CipherList = SECURE128:-VERS-SSL3.0 + + # Diffie-Hellman parameters + ;DHFile = :ETCDIR:/ssl/dhparams.pem + + # SSL Server Key + ;KeyFile = :ETCDIR:/ssl/server-key.pem + + # password to decrypt SSLKeyFile (OpenSSL only) + ;KeyFilePassword = secret + + # Additional Listen Ports that expect SSL/TLS encrypted connections + ;Ports = 6697, 9999 + +[Operator] + # [Operator] sections are used to define IRC Operators. There may be + # more than one [Operator] block, one for each local operator. + + # ID of the operator (may be different of the nickname) + ;Name = TheOper + + # Password of the IRC operator + ;Password = ThePwd + + # Optional Mask from which /OPER will be accepted + ;Mask = *!ident@somewhere.example.com + +[Operator] + # More [Operator] sections, if you like ... + +[Server] + # Other servers are configured in [Server] sections. If you + # configure a port for the connection, then this ngircd tries to + # connect to the other server on the given port; if not it waits + # for the other server to connect. + # There may be more than one server block, one for each server. + # + # Server Groups: + # The ngIRCd allows "server groups": You can assign an "ID" to every + # server with which you want this ngIRCd to link. If a server of a + # group won't answer, the ngIRCd tries to connect to the next server + # in the given group. But the ngircd never tries to connect to two + # servers with the same group ID. + + # IRC name of the remote server, must match the "Name" variable in + # the [Global] section of the other server (when using ngIRCd). + ;Name = irc2.example.net + + # Internet host name or IP address of the peer (only required when + # this server should establish the connection). + ;Host = connect-to-host.example.net + + # IP address to use as _source_ address for the connection. if + # unspecified, ngircd will let the operating system pick an address. + ;Bind = 10.0.0.1 + + # Port of the server to which the ngIRCd should connect. If you + # assign no port the ngIRCd waits for incoming connections. + ;Port = 6667 + + # Own password for the connection. This password has to be configured + # as "PeerPassword" on the other server. + ;MyPassword = MySecret + + # Foreign password for this connection. This password has to be + # configured as "MyPassword" on the other server. + ;PeerPassword = PeerSecret + + # Group of this server (optional) + ;Group = 123 + + # Set the "Passive" option to "yes" if you don't want this ngIRCd to + # connect to the configured peer (same as leaving the "Port" variable + # empty). The advantage of this option is that you can actually + # configure a port an use the IRC command CONNECT more easily to + # manually connect this specific server later. + ;Passive = no + + # 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 (","). + # REGULAR SERVERS DON'T NEED this parameter, so leave it empty + # (which is the default). + # When you are connecting IRC services which mask as a IRC server + # and which use "virtual users" to communicate with, for example + # "NickServ" and "ChanServ", you should set this parameter to + # something like "*Serv" or "NickServ,ChanServ,XyzServ". + ;ServiceMask = *Serv,Global + +[Server] + # More [Server] sections, if you like ... + +[Channel] + # Pre-defined channels can be configured in [Channel] sections. + # Such channels are created by the server when starting up and even + # persist when there are no more members left. + # Persistent channels are marked with the mode 'P', which can be set + # and unset by IRC operators like other modes on the fly. + # There may be more than one [Channel] block, one for each channel. + + # Name of the channel + ;Name = #TheName + + # Topic for this channel + ;Topic = a great topic + + # Initial channel modes, as used in "MODE" commands. Modifying lists + # (ban list, invite list, exception list) is supported. + # This option can be specified multiple times, evaluated top to bottom. + ;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 + +[Channel] + # More [Channel] sections, if you like ... + +# -eof- diff --git a/deprecated-ngircd/doc/src/Doxyfile b/deprecated-ngircd/doc/src/Doxyfile new file mode 100644 index 0000000..6d9ccb5 --- /dev/null +++ b/deprecated-ngircd/doc/src/Doxyfile @@ -0,0 +1,93 @@ +# +# ngIRCd -- The Next Generation IRC Daemon +# Copyright (c)2001-2010 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. +# +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for ngIRCd. +# + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +DOXYFILE_ENCODING = UTF-8 + +PROJECT_NAME = ngIRCd +PROJECT_BRIEF = "Lightweight Internet Relay Chat server" +PROJECT_LOGO = "../../contrib/ngIRCd-Logo.gif" + +OUTPUT_DIRECTORY = . +STRIP_FROM_PATH = ../.. + +JAVADOC_AUTOBRIEF = YES +OPTIMIZE_OUTPUT_FOR_C = YES +TYPEDEF_HIDES_STRUCT = YES + +TAB_SIZE = 8 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +EXTRACT_ALL = YES +EXTRACT_STATIC = YES + +SHOW_DIRECTORIES = YES + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = YES + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +INPUT = ../../src +INPUT_ENCODING = UTF-8 +RECURSIVE = YES + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +SOURCE_BROWSER = YES +STRIP_CODE_COMMENTS = NO +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES + +#--------------------------------------------------------------------------- +# Output formats +#--------------------------------------------------------------------------- + +GENERATE_HTML = YES +HTML_FOOTER = footer.inc.html +HTML_DYNAMIC_SECTIONS = YES + +GENERATE_DOCSET = NO +GENERATE_HTMLHELP = NO +GENERATE_LATEX = NO +GENERATE_RTF = NO +GENERATE_MAN = NO +GENERATE_XML = NO +GENERATE_AUTOGEN_DEF = NO +GENERATE_PERLMOD = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +PREDEFINED = DEBUG ZLIB PAM ZEROCONF CONN_MODULE __client_c__ + +# -eof- diff --git a/deprecated-ngircd/doc/src/Makefile.am b/deprecated-ngircd/doc/src/Makefile.am new file mode 100644 index 0000000..0d27b7e --- /dev/null +++ b/deprecated-ngircd/doc/src/Makefile.am @@ -0,0 +1,25 @@ +# +# ngIRCd -- The Next Generation IRC Daemon +# Copyright (c)2001-2011 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. +# + +EXTRA_DIST = Doxyfile footer.inc.html + +maintainer-clean-local: + rm -f Makefile Makefile.in + +distclean-local: + rm -rf html + +srcdoc: + @doxygen --version >/dev/null 2>&1 \ + || ( echo; echo "Error: \"doxygen\" not found!"; echo; exit 1 ) + doxygen + +# -eof- diff --git a/deprecated-ngircd/doc/src/footer.inc.html b/deprecated-ngircd/doc/src/footer.inc.html new file mode 100644 index 0000000..6189afb --- /dev/null +++ b/deprecated-ngircd/doc/src/footer.inc.html @@ -0,0 +1,12 @@ + +<hr class="footer"> +<p style="text-align: center"> + ngIRCd + <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> +</html> diff --git a/deprecated-ngircd/man/Makefile.am b/deprecated-ngircd/man/Makefile.am new file mode 100644 index 0000000..077d0ea --- /dev/null +++ b/deprecated-ngircd/man/Makefile.am @@ -0,0 +1,32 @@ +# +# ngIRCd -- The Next Generation IRC Daemon +# Copyright (c)2001-2012 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. +# + +TEMPLATE_MANS = ngircd.conf.5.tmpl ngircd.8.tmpl + +SUFFIXES = .tmpl . + +.tmpl: + $(AM_V_GEN)sed \ + -e "s@:SBINDIR:@${sbindir}@" \ + -e "s@:BINDIR:@${bindir}@" \ + -e "s@:ETCDIR:@${sysconfdir}@" \ + <$< >$@ + +man_MANS = ngircd.conf.5 ngircd.8 + +CLEANFILES = $(man_MANS) + +EXTRA_DIST = $(TEMPLATE_MANS) + +maintainer-clean-local: + rm -f Makefile Makefile.in + +# -eof- diff --git a/deprecated-ngircd/man/ngircd.8.tmpl b/deprecated-ngircd/man/ngircd.8.tmpl new file mode 100644 index 0000000..9df6dac --- /dev/null +++ b/deprecated-ngircd/man/ngircd.8.tmpl @@ -0,0 +1,147 @@ +.\" +.\" ngircd(8) manual page template +.\" +.TH ngircd 8 "May 2024" ngIRCd "ngIRCd Manual" +.SH NAME +ngIRCd \- the "next generation" IRC daemon +.SH SYNOPSIS +.B ngircd +[ +.I Options +] +.SH DESCRIPTION +.BR ngIRCd +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 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 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 +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). +.SH OPTIONS +The default behavior of +.BR ngircd +is to read its standard configuration file (see below), to detach from the +controlling terminal and to wait for clients. +.PP +You can use these options to modify this default: +.TP +\fB\-f\fR \fIfile\fR, \fB\-\-config\fR \fIfile\fR +Use +.I file +as configuration file. +.TP +\fB\-n\fR, \fB\-\-nodaemon\fR +Don't fork a child and don't detach from controlling terminal. +All log messages go to the console and you can use CTRL-C to +terminate the server. +.TP +\fB\-p\fR, \fB\-\-passive\fR +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. +.SH FILES +.I :ETCDIR:/ngircd.conf +.RS +The system wide default configuration file. +.RE +.I :ETCDIR:/ngircd.motd +.RS +Default "message of the day" (MOTD). +.RE +.SH SIGNALS +The daemon understands the following signals: +.TP +\fBTERM\fR +Shut down all connections and terminate the daemon. +.TP +\fBHUP\fR +Shut down all listening sockets, re-read the configuration file and +re-initialize the daemon. +.SH HINTS +It is +.I always wise +to use "ngircd \-\-configtest" to validate the configuration of ngIRCd after +making changes to the configuration files! +.SH DEBUGGING +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 +\fB\-d\fR, \fB\-\-debug\fR +Enable debug mode and log extra messages. +.TP +\fB\-s\fR, \fB\-\-sniffer\fR +Enable IRC protocol sniffer, which logs all sent and received IRC commands to +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. +.TP +\fBUSR2\fR +Dump internal server state to the console/syslog when debug mode is on (use +command line option \-\-debug or signal USR1). +.SH AUTHORS +Alexander Barton, <alex@barton.de> +.br +Florian Westphal, <fw@strlen.de> +.PP +Homepage: http://ngircd.barton.de/ +.SH "SEE ALSO" +.BR ngircd.conf (5), +.BR ircd (8) +.\" +.\" -eof- diff --git a/deprecated-ngircd/man/ngircd.conf.5.tmpl b/deprecated-ngircd/man/ngircd.conf.5.tmpl new file mode 100644 index 0000000..d0d73f7 --- /dev/null +++ b/deprecated-ngircd/man/ngircd.conf.5.tmpl @@ -0,0 +1,604 @@ +.\" +.\" ngircd.conf(5) manual page template +.\" +.TH ngircd.conf 5 "Sep 2025" ngIRCd "ngIRCd Manual" +.SH NAME +ngircd.conf \- configuration file of ngIRCd +.SH SYNOPSIS +.B :ETCDIR:/ngircd.conf +.SH DESCRIPTION +.BR ngircd.conf +is the configuration file of the +.BR ngircd (8) +Internet Relay Chat (IRC) daemon, which must be customized to the local +preferences and needs. +.PP +Most variables can be modified while the ngIRCd daemon is already running: +It will reload its configuration file when a HUP signal or REHASH command +is received. +.SH "FILE FORMAT" +The file consists of sections and parameters. A section begins with the name +of the section in square brackets and continues until the next section +begins. +.PP +Sections contain parameters of the form +.PP +.RS +.I name += +.I value +.RE +.PP +Empty lines and any line beginning with a semicolon (';') or a hash ('#') +character are treated as a comment and will be ignored. Leading and trailing +whitespaces are trimmed before any processing takes place. +.PP +The file format is line-based - that means, each non-empty newline-terminated +line represents either a comment, a section name, or a parameter. +.PP +Section and parameter names are not case sensitive. +.PP +There are three types of variables: +.I booleans, +.I text strings, +and +.I numbers. +Boolean values are +.I true +if they are "yes", "true", or any non-null integer. Text strings are used 1:1 +without leading and following spaces; there is no way to quote strings. And +for numbers all decimal integer values are valid. +.PP +In addition, some string or numerical variables accept lists of values, +separated by commas (","). +.SH "SECTION OVERVIEW" +The file can contain blocks of seven types: [Global], [Limits], [Options], +[SSL], [Operator], [Server], and [Channel]. +.PP +The main configuration of the server is stored in the +.I [Global] +section, like the server name, administrative information and the ports on +which the server should be listening. The variables in this section have to be +adjusted to the local requirements most of the time, whereas all the variables +in the other sections can be left on their defaults very often. +.PP +Options in the +.I [Limits] +block are used to tweak different limits and timeouts of the daemon, like the +maximum number of clients allowed to connect to this server. Variables in the +.I [Options] +section can be used to enable or disable specific features of ngIRCd, like +support for IDENT, PAM, IPv6, and protocol and cloaking features. The +.I [SSL] +block contains all SSL-related configuration variables. These three sections +are all optional. +.PP +IRC operators of this server are defined in +.I [Operator] +blocks. Links to remote servers are configured in +.I [Server] +sections. And +.I [Channel] +blocks are used to configure pre-defined ("persistent") IRC channels. +.PP +There can be more than one [Operator], [Server] and [Channel] section per +configuration file, one for each operator, server, and channel. [Global], +[Limits], [Options], and [SSL] sections can occur multiple times, too, but +each variable overwrites itself, only the last assignment is relevant. +.SH [GLOBAL] +The +.I [Global] +section is used to define the main configuration of the server, +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) +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. 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 +command. This information is not required by the server but by RFC! +.TP +\fBHelpFile\fR (string) +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. 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. 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. +If unset, the defaults value is "0.0.0.0" or, if ngIRCd was compiled +with IPv6 support, "::,0.0.0.0". So the server listens on all configured +IP addresses and interfaces by default. +.TP +\fBMotdFile\fR (string) +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. 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. +.TP +\fBNetwork\fR (string) +The name of the IRC network to which this server belongs. This name is +optional, should only contain ASCII characters, and can't contain spaces. +It is only used to inform clients. The default is empty, so no network +name is announced to clients. +.TP +\fBPassword\fR (string) +Global password for all users needed to connect to the server. The default is +empty, so no password is required. Please note: This feature is not available +if ngIRCd is using PAM! +.TP +\fBPidFile\fR (string) +This tells ngIRCd to write its current process ID to a file. Note that the +"PID file" is written AFTER chroot and switching the user ID, therefore the +directory the file resides in must be writable by the ngIRCd user and exist +in the chroot directory (if configured, see above). +.TP +\fBPorts\fR (list of numbers) +Port number(s) on which the server should listen for unencrypted connections. +There may be more than one port, separated with commas (","). Default: 6667. +.TP +\fBServerGID\fR (string or number) +Group ID under which the ngIRCd daemon should run; you can use the name of the +group or the numerical ID. +.PP +.RS +.B Attention: +.br +For this to work the server must have been started with root privileges! +.RE +.TP +\fBServerUID\fR (string or number) +User ID under which the ngIRCd daemon should run; you can use the name of the +user or the numerical ID. +.PP +.RS +.B Attention: +.br +For this to work the server must have been started with root privileges! In +addition, the configuration and MOTD files must be readable by this user, +otherwise RESTART and REHASH won't work! +.RE +.SH [LIMITS] +This section is used to define some limits and timeouts for this ngIRCd +instance. Default values should be safe, but it is wise to double-check :-) +.TP +\fBConnectRetry\fR (number) +The server tries every <ConnectRetry> seconds to establish a link to not yet +(or no longer) connected servers. Default: 60. +.TP +\fBIdleTimeout\fR (number) +Number of seconds after which the whole daemon should shutdown when no +connections are left active after handling at least one client (0: never). This +can be useful for testing or when ngIRCd is started using "socket activation" +with systemd(8), for example. Default: 0. +.TP +\fBMaxConnections\fR (number) +Maximum number of simultaneous in- and outbound connections the server is +allowed to accept (0: unlimited). Default: 0. +.TP +\fBMaxConnectionsIP\fR (number) +Maximum number of simultaneous connections from a single IP address that +the server will accept (0: unlimited). This configuration options lowers +the risk of denial of service attacks (DoS). Default: 5. +.TP +\fBMaxJoins\fR (number) +Maximum number of channels a user can be member of (0: no limit). +Default: 10. +.TP +\fBMaxNickLength\fR (number) +Maximum length of an user nickname (Default: 9, as in RFC 2812). Please +note that all servers in an IRC network MUST use the same maximum nickname +length! +.TP +\fBMaxPenaltyTime\fR (number) +Maximum penalty time increase in seconds, per penalty event. Set to -1 for no +limit (the default), 0 to disable penalties altogether. ngIRCd doesn't use +penalty increases higher than 2 seconds during normal operation, so values +greater than 1 rarely make sense. +.TP +\fBMaxListSize\fR (number) +Maximum number of channels returned in response to a LIST command. Default: 100. +.TP +\fBPingTimeout\fR (number) +After <PingTimeout> seconds of inactivity the server will send a PING to +the peer to test whether it is alive or not. Default: 120. +.TP +\fBPongTimeout\fR (number) +If a client fails to answer a PING with a PONG within <PongTimeout> +seconds, it will be disconnected by the server. Default: 20. +.SH [OPTIONS] +Optional features and configuration options to further tweak the behavior of +ngIRCd are configured in this section. If you want to get started quickly, you +most probably don't have to make changes here -- they are all optional. +.TP +\fBAllowedChannelTypes\fR (string) +List of allowed channel types (channel prefixes) for newly created channels +on the local server. By default, all supported channel types are allowed. +Set this variable to the empty string to disallow creation of new channels +by local clients at all. Default: #&+ +.TP +\fBAllowRemoteOper\fR (boolean) +If this option is active, IRC operators connected to remote servers are allowed +to control this local server using administrative commands, for example like +CONNECT, DIE, SQUIT etc. Default: no. +.TP +\fBChrootDir\fR (string) +A directory to chroot in when everything is initialized. It doesn't need +to be populated if ngIRCd is compiled as a static binary. By default ngIRCd +won't use the chroot() feature. +.PP +.RS +.B Attention: +.br +For this to work the server must have been started with root privileges! +.RE +.TP +\fBCloakHost\fR (string) +Set this hostname for every client instead of the real one. Default: empty, +don't change. Use %x to add the hashed value of the original hostname. +.TP +\fBCloakHostModeX\fR (string) +Use this hostname for hostname cloaking on clients that have the user mode +"+x" set, instead of the name of the server. Default: empty, use the name +of the server. Use %x to add the hashed value of the original hostname. +If this variable is empty, regular users cannot set mode "+x" themselves. +.TP +\fBCloakHostSalt\fR (string) +The Salt for cloaked hostname hashing. When undefined a random hash is +generated after each server start. +.TP +\fBCloakUserToNick\fR (boolean) +Set every clients' user name and real name to their nickname and hide the one +supplied by the IRC client. Default: no. +.TP +\fBConnectIPv4\fR (boolean) +Set this to no if you do not want ngIRCd to connect to other IRC servers using +the IPv4 protocol. This allows the usage of ngIRCd in IPv6-only setups. +Default: yes. +.TP +\fBConnectIPv6\fR (boolean) +Set this to no if you do not want ngIRCd to connect to other IRC servers using +the IPv6 protocol. +Default: yes. +.TP +\fBDefaultUserModes\fR (string) +Default user mode(s) to set on new local clients. Please note that only modes +can be set that the client could set using regular MODE commands, you can't +set "a" (away) for example! +Default: none. +.TP +\fBDNS\fR (boolean) +If set to false, ngIRCd will not make any DNS lookups when clients connect. +If you configure the daemon to connect to other servers, ngIRCd may still +perform a DNS lookup if required. +Default: yes. +.TP +\fBIdent\fR (boolean) +If ngIRCd is compiled with IDENT support this can be used to disable IDENT +lookups at run time. +Users identified using IDENT are registered without the "~" character +prepended to their user name. +Default: yes. +.TP +\fBIncludeDir\fR (string) +Directory containing configuration snippets (*.conf), that should be read in +after parsing the current 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. +.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 +PART/QUIT messages (that are sometimes used to inform everyone about which +client software is being used). WHOWAS requests are also silently ignored, +and NAMES output doesn't list any clients for non-members. +This option is most useful when ngIRCd is being used together with +anonymizing software such as TOR or I2P and one does not wish to make it +too easy to collect statistics on the users. +Default: no. +.TP +\fBNoticeBeforeRegistration\fR (boolean) +Normally ngIRCd doesn't send any messages to a client until it is registered. +Enable this option to let the daemon send "NOTICE *" messages to clients +while connecting. Default: no. +.TP +\fBOperCanUseMode\fR (boolean) +Should IRC Operators be allowed to use the MODE command even if they are +not(!) channel-operators? Default: no. +.TP +\fBOperChanPAutoOp\fR (boolean) +Should IRC Operators get AutoOp (+o) in persistent (+P) channels? +Default: yes. +.TP +\fBOperServerMode\fR (boolean) +If \fBOperCanUseMode\fR is enabled, this may lead the compatibility problems +with Servers that run the ircd-irc2 Software. This Option "masks" mode +requests by non-chanops as if they were coming from the server. Default: no; +only enable it if you have ircd-irc2 servers in your IRC network. +.TP +\fBPAM\fR (boolean) +If ngIRCd is compiled with PAM support this can be used to disable all calls +to the PAM library at runtime; all users connecting without password are +allowed to connect, all passwords given will fail. +Users identified using PAM are registered without the "~" character +prepended to their user name. +Default: yes. +.TP +\fBPAMIsOptional\fR (boolean) +When PAM is enabled, all clients are required to be authenticated using PAM; +connecting to the server without successful PAM authentication isn't possible. +If this option is set, clients not sending a password are still allowed to +connect: they won't become "identified" and keep the "~" character prepended +to their supplied user name. +Please note: +To make some use of this behavior, it most probably isn't useful to enable +"Ident", "PAM" and "PAMIsOptional" at the same time, because you wouldn't be +able to distinguish between Ident'ified and PAM-authenticated users: both +don't have a "~" character prepended to their respective user names! +Default: no. +.TP +\fBPAMServiceName\fR (string) +When PAM is enabled, this value determines the used PAM configuration. +This setting allows running multiple ngIRCd instances with different +PAM configurations on each instance. If you set it to "ngircd-foo", +PAM will use /etc/pam.d/ngircd-foo instead of the default +/etc/pam.d/ngircd. +Default: ngircd. +.TP +\fBRequireAuthPing\fR (boolean) +Let ngIRCd send an "authentication PING" when a new client connects, and +register this client only after receiving the corresponding "PONG" reply. +Default: no. +.TP +\fBScrubCTCP\fR (boolean) +If set to true, ngIRCd will silently drop all CTCP requests sent to it from +both clients and servers. It will also not forward CTCP requests to any +other servers. CTCP requests can be used to query user clients about which +software they are using and which versions said software is. CTCP can also be +used to reveal clients IP numbers. ACTION CTCP requests are not blocked, +this means that /me commands will not be dropped, but please note that +blocking CTCP will disable file sharing between users! +Default: no. +.TP +\fBSyslogFacility\fR (string) +Syslog "facility" to which ngIRCd should send log messages. Possible +values are system dependent, but most probably "auth", "daemon", "user" +and "local1" through "local7" are possible values; see syslog(3). +Default is "local5" for historical reasons, you probably want to +change this to "daemon", for example. +.TP +\fBWebircPassword\fR (string) +Password required for using the WEBIRC command used by some Web-to-IRC +gateways. If not set or empty, the WEBIRC command can't be used. +Default: not set. +.SH [SSL] +All SSL-related configuration variables are located in the +.I [SSL] +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. Default: not set, so no certificates are trusted. +.TP +\fBCertFile\fR (string) +SSL Certificate file of the private server key. +.TP +\fBCipherList\fR (string) +Select cipher suites allowed for SSL/TLS connections. This defaults to +"HIGH:!aNULL:@STRENGTH:!SSLv3" (OpenSSL) or "SECURE128:-VERS-SSL3.0" (GnuTLS). +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 +present, it will be generated on startup when ngIRCd was compiled with GnuTLS +support (this may take some time). If ngIRCd was compiled with OpenSSL, then +(Ephemeral)-Diffie-Hellman Key Exchanges and several Cipher Suites will not be +available. +.TP +\fBKeyFile\fR (string) +Filename of SSL Server Key to be used for SSL connections. This is required +for SSL/TLS support. +.TP +\fBKeyFilePassword\fR (string) +OpenSSL only: Password to decrypt the private key file. +.TP +\fBPorts\fR (list of numbers) +Same as \fBPorts\fR , except that ngIRCd will expect incoming connections +to be SSL/TLS encrypted. Common port numbers for SSL-encrypted IRC are 6669 +and 6697. Default: none. +.SH [OPERATOR] +.I [Operator] +sections are used to define IRC Operators. There may be more than one +.I [Operator] +block, one for each local operator. +.TP +\fBName\fR (string) +ID of the operator (may be different of the nickname). +.TP +\fBPassword\fR (string) +Password of the IRC operator. +.TP +\fBMask\fR (string) +Mask that is to be checked before an /OPER for this account is accepted. +Example: nick!ident@*.example.com +.SH [SERVER] +Other servers are configured in +.I [Server] +sections. If you configure a port for the connection, then this ngIRCd +tries to connect to the other server on the given port (active); +if not, it waits for the other server to connect (passive). +.PP +ngIRCd supports "server groups": You can assign an "ID" to every server +with which you want this ngIRCd to link, and the daemon ensures that at +any given time only one direct link exists to servers with the same ID. +So if a server of a group won't answer, ngIRCd tries to connect to the next +server in the given group (="with the same ID"), but never tries to connect +to more than one server of this group simultaneously. +.PP +There may be more than one +.I [Server] +block. +.TP +\fBName\fR (string) +IRC name of the remote server. +.TP +\fBHost\fR (string) +Internet host name (or IP address) of the peer. +.TP +\fBBind\fR (string) +IP address to use as source IP for the outgoing connection. Default is +to let the operating system decide. +.TP +\fBPort\fR (number) +Port of the remote server to which ngIRCd should connect (active). +If no port is assigned to a configured server, the daemon only waits for +incoming connections (passive, default). +.TP +\fBMyPassword\fR (string) +Own password for this connection. This password has to be configured as +\fBPeerPassword\fR on the other server. Must not have ':' as first character. +.TP +\fBPeerPassword\fR (string) +Foreign password for this connection. This password has to be configured as +\fBMyPassword\fR on the other server. +.TP +\fBGroup\fR (number) +Group of this server (optional). +.TP +\fBPassive\fR (boolean) +Disable automatic connection even if port value is specified. Default: false. +You can use the IRC Operator command CONNECT later on to create the link. +.TP +\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 +by commas (","). REGULAR SERVERS DON'T NEED this parameter, so leave it empty +(which is the default). +.PP +.RS +When you are connecting IRC services which mask as a IRC server and which use +"virtual users" to communicate with, for example "NickServ" and "ChanServ", +you should set this parameter to something like "*Serv", "*Serv,OtherNick", +or "NickServ,ChanServ,XyzServ". +.SH [CHANNEL] +Pre-defined channels can be configured in +.I [Channel] +sections. Such channels are created by the server when starting up and even +persist when there are no more members left. +.PP +Persistent channels are marked with the mode 'P', which can be set and unset +by IRC operators like other modes on the fly. +.PP +There may be more than one +.I [Channel] +block. +.TP +\fBName\fR (string) +Name of the channel, including channel prefix ("#" or "&"). +.TP +\fBTopic\fR (string) +Topic for this channel. +.TP +\fBModes\fR (string) +Initial channel modes, as used in "MODE" commands. Modifying lists (ban list, +invite list, exception list) is supported. +.PP +.RS +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 +syntax (without spaces!): +.PP +.RS +.RS +.I user +: +.I nick +: +.I key +.RE +.PP +.I user +and +.I nick +can contain the wildcard character "*". +.br +.I key +is an arbitrary password. +.PP +Valid examples are: +.PP +.RS +*:*:KeY +.br +*:nick:123 +.br +~user:*:xyz +.RE +.PP +The key file is read on each JOIN command when this channel has a key +(channel mode +k). Access is granted, if a) the channel key set using the +MODE +k command or b) one of the lines in the key file match. +.PP +.B Please note: +.br +The file is not reopened on each access, so you can modify and overwrite it +without problems, but moving or deleting the file will have not effect until +the daemon re-reads its configuration! +.RE +.SH HINTS +It's wise to use "ngircd \-\-configtest" to validate the configuration file +after changing it. See +.BR ngircd (8) +for details. +.SH AUTHOR +Alexander Barton, <alex@barton.de> +.br +Florian Westphal, <fw@strlen.de> +.PP +Homepage: http://ngircd.barton.de/ +.SH "SEE ALSO" +.BR ngircd (8) +.\" +.\" -eof- diff --git a/deprecated-ngircd/scripts/build-docker.sh b/deprecated-ngircd/scripts/build-docker.sh new file mode 100644 index 0000000..e7e0d15 --- /dev/null +++ b/deprecated-ngircd/scripts/build-docker.sh @@ -0,0 +1,8 @@ +sudo rm -rf rootfs +mkdir rootfs +sh ./scripts/create_rootfs.sh ngircd rootfs/ +cp ngircd rootfs/ +cp config.ini rootfs/ +sudo docker build -t localhost/ngircd . +sudo docker save localhost/ngircd | gzip > ngircd-docker-image.tar.gz +sudo docker rmi localhost/ngircd diff --git a/deprecated-ngircd/scripts/create_rootfs.sh b/deprecated-ngircd/scripts/create_rootfs.sh new file mode 100755 index 0000000..4cf1740 --- /dev/null +++ b/deprecated-ngircd/scripts/create_rootfs.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +copy_with_path() { + if [ "$#" -ne 2 ]; then + echo "Usage: copy_with_path_creation <source_file> <destination_base_path>" + return 1 + fi + + local source_file="$1" + local destination_base_path="$2" + + local source_dir=$(dirname "$source_file") + + local destination_dir="${destination_base_path}${source_dir}" + + if mkdir -p "$destination_dir"; then + echo "Created directory: $destination_dir" + if cp "$source_file" "$destination_dir/"; then + echo "Copied file: $source_file to $destination_dir/" + return 0 + else + echo "Error: Failed to copy file $source_file to $destination_dir/" + return 1 + fi + else + echo "Error: Failed to create directory $destination_dir" + return 1 + fi +} + +if [ "$#" -ne 2 ]; then + echo "Usage: copyldd <target_exec> <dest_dir>" + exit 1 +fi + +for f in $(ldd $1 | grep "=>" | awk '{print $3}') ; do + copy_with_path $f $2 +done + +cp -r $2/usr/lib64 $2/ diff --git a/deprecated-ngircd/src/Makefile.am b/deprecated-ngircd/src/Makefile.am new file mode 100644 index 0000000..e04ebe1 --- /dev/null +++ b/deprecated-ngircd/src/Makefile.am @@ -0,0 +1,19 @@ +# +# ngIRCd -- The Next Generation IRC Daemon +# Copyright (c)2001,2002 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 +# 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. +# +# $Id: Makefile.am,v 1.8 2008/02/26 22:04:15 fw Exp $ +# + +SUBDIRS = portab tool ipaddr ngircd testsuite + +maintainer-clean-local: + rm -f Makefile Makefile.in config.h config.h.in stamp-h.in + +# -eof- diff --git a/deprecated-ngircd/src/ipaddr/Makefile.ng b/deprecated-ngircd/src/ipaddr/Makefile.ng new file mode 100644 index 0000000..ecfce29 --- /dev/null +++ b/deprecated-ngircd/src/ipaddr/Makefile.ng @@ -0,0 +1,21 @@ +# +# ipaddr/Makefile.am +# (c) 2008 Florian Westphal <fw@strlen.de>, public domain. +# + +__ng_Makefile_am_template__ + +EXTRA_DIST = Makefile.ng + +AM_CPPFLAGS = -I$(srcdir)/../portab + +noinst_LIBRARIES = libngipaddr.a + +libngipaddr_a_SOURCES = ng_ipaddr.c + +noinst_HEADERS = ng_ipaddr.h + +maintainer-clean-local: + rm -f Makefile Makefile.in Makefile.am + +# -eof- diff --git a/deprecated-ngircd/src/ipaddr/ng_ipaddr.c b/deprecated-ngircd/src/ipaddr/ng_ipaddr.c new file mode 100644 index 0000000..37f75b6 --- /dev/null +++ b/deprecated-ngircd/src/ipaddr/ng_ipaddr.c @@ -0,0 +1,179 @@ +/* + * (c) 2008 Florian Westphal <fw@strlen.de>, public domain. + */ + +#include "portab.h" + +/** + * @file + * Functions for AF_ agnostic ipv4/ipv6 handling. + */ + +#include <assert.h> +#include <stdio.h> +#include <string.h> + +#ifdef HAVE_GETADDRINFO +#include <netdb.h> +#include <sys/types.h> +#endif + +#include "ng_ipaddr.h" + +GLOBAL bool +ng_ipaddr_init(ng_ipaddr_t *addr, const char *ip_str, UINT16 port) +{ +#ifdef HAVE_WORKING_GETADDRINFO + int ret; + char portstr[64]; + struct addrinfo *res0; + struct addrinfo hints; + + assert(ip_str); + + memset(&hints, 0, sizeof(hints)); +#ifdef AI_NUMERICHOST + hints.ai_flags = AI_NUMERICHOST; +#endif +#ifndef WANT_IPV6 /* do not convert ipv6 addresses */ + hints.ai_family = AF_INET; +#endif + + /* some getaddrinfo implementations require that ai_socktype is set. */ + hints.ai_socktype = SOCK_STREAM; + + /* silly, but ngircd stores UINT16 in server config, not string */ + snprintf(portstr, sizeof(portstr), "%u", (unsigned int) port); + + ret = getaddrinfo(ip_str, portstr, &hints, &res0); + if (ret != 0) + return false; + + assert(sizeof(*addr) >= (size_t)res0->ai_addrlen); + if (sizeof(*addr) >= (size_t)res0->ai_addrlen) + memcpy(addr, res0->ai_addr, res0->ai_addrlen); + else + ret = -1; + freeaddrinfo(res0); + return ret == 0; +#else /* HAVE_GETADDRINFO */ + assert(ip_str); + memset(addr, 0, sizeof *addr); +#ifdef HAVE_sockaddr_in_len + addr->sin4.sin_len = sizeof(addr->sin4); +#endif + addr->sin4.sin_family = AF_INET; +# ifdef HAVE_INET_ATON + if (inet_aton(ip_str, &addr->sin4.sin_addr) == 0) + return false; +# else + addr->sin4.sin_addr.s_addr = inet_addr(ip_str); + if (addr->sin4.sin_addr.s_addr == (unsigned) -1) + return false; +# endif + ng_ipaddr_setport(addr, port); + return true; +#endif /* HAVE_GETADDRINFO */ +} + + +GLOBAL void +ng_ipaddr_setport(ng_ipaddr_t *a, UINT16 port) +{ +#ifdef WANT_IPV6 + int af; + + assert(a != NULL); + + af = a->sa.sa_family; + + assert(af == AF_INET || af == AF_INET6); + + switch (af) { + case AF_INET: + a->sin4.sin_port = htons(port); + break; + case AF_INET6: + a->sin6.sin6_port = htons(port); + break; + } +#else /* WANT_IPV6 */ + assert(a != NULL); + assert(a->sin4.sin_family == AF_INET); + a->sin4.sin_port = htons(port); +#endif /* WANT_IPV6 */ +} + + + +GLOBAL bool +ng_ipaddr_ipequal(const ng_ipaddr_t *a, const ng_ipaddr_t *b) +{ + assert(a != NULL); + assert(b != NULL); +#ifdef WANT_IPV6 + if (a->sa.sa_family != b->sa.sa_family) + return false; + assert(ng_ipaddr_salen(a) == ng_ipaddr_salen(b)); + switch (a->sa.sa_family) { + case AF_INET6: + return IN6_ARE_ADDR_EQUAL(&a->sin6.sin6_addr, &b->sin6.sin6_addr); + case AF_INET: + return memcmp(&a->sin4.sin_addr, &b->sin4.sin_addr, sizeof(a->sin4.sin_addr)) == 0; + } + return false; +#else + assert(a->sin4.sin_family == AF_INET); + assert(b->sin4.sin_family == AF_INET); + return memcmp(&a->sin4.sin_addr, &b->sin4.sin_addr, sizeof(a->sin4.sin_addr)) == 0; +#endif +} + + +#ifdef WANT_IPV6 +GLOBAL const char * +ng_ipaddr_tostr(const ng_ipaddr_t *addr) +{ + static char strbuf[NG_INET_ADDRSTRLEN]; + + strbuf[0] = 0; + + ng_ipaddr_tostr_r(addr, strbuf); + return strbuf; +} + + +/* str must be at least NG_INET_ADDRSTRLEN bytes long */ +GLOBAL bool +ng_ipaddr_tostr_r(const ng_ipaddr_t *addr, char *str) +{ +#ifdef HAVE_GETNAMEINFO + const struct sockaddr *sa = (const struct sockaddr *) addr; + int ret; + + *str = 0; + + ret = getnameinfo(sa, ng_ipaddr_salen(addr), + str, NG_INET_ADDRSTRLEN, NULL, 0, NI_NUMERICHOST); + /* + * avoid leading ':'. + * causes mis-interpretation of client host in e.g. /WHOIS + */ + if (*str == ':') { + char tmp[NG_INET_ADDRSTRLEN] = "0"; + ret = getnameinfo(sa, ng_ipaddr_salen(addr), + tmp + 1, (socklen_t)sizeof(tmp) - 1, + NULL, 0, NI_NUMERICHOST); + if (ret == 0) + strlcpy(str, tmp, NG_INET_ADDRSTRLEN); + } + assert (ret == 0); + return ret == 0; +#else + abort(); /* WANT_IPV6 depends on HAVE_GETNAMEINFO */ +#endif +} + +#endif /* WANT_IPV6 */ + +/* -eof- */ diff --git a/deprecated-ngircd/src/ipaddr/ng_ipaddr.h b/deprecated-ngircd/src/ipaddr/ng_ipaddr.h new file mode 100644 index 0000000..f8409de --- /dev/null +++ b/deprecated-ngircd/src/ipaddr/ng_ipaddr.h @@ -0,0 +1,134 @@ +/* + * (c) 2008 Florian Westphal <fw@strlen.de>, public domain. + */ + +#ifndef NG_IPADDR_HDR +#define NG_IPADDR_HDR + +#include "portab.h" + +/** + * @file + * Functions for AF_ agnostic ipv4/ipv6 handling (header). + */ + +#include <assert.h> +#include <string.h> +#include <sys/socket.h> +#include <netinet/in.h> + +#ifdef HAVE_ARPA_INET_H +# include <arpa/inet.h> +#else +# define PF_INET AF_INET +#endif + + +#ifdef WANT_IPV6 +#define NG_INET_ADDRSTRLEN INET6_ADDRSTRLEN +#else +#define NG_INET_ADDRSTRLEN 16 +#endif + + +#ifdef WANT_IPV6 +typedef union { + struct sockaddr sa; + struct sockaddr_in sin4; + struct sockaddr_in6 sin6; +} ng_ipaddr_t; +#else +/* assume compiler can't deal with typedef struct {... */ +struct NG_IP_ADDR_DONTUSE { + struct sockaddr_in sin4; +}; +typedef struct NG_IP_ADDR_DONTUSE ng_ipaddr_t; +#endif + + +static inline int +ng_ipaddr_af(const ng_ipaddr_t *a) +{ + assert(a != NULL); +#ifdef WANT_IPV6 + return a->sa.sa_family; +#else + assert(a->sin4.sin_family == 0 || a->sin4.sin_family == AF_INET); + return a->sin4.sin_family; +#endif +} + + +static inline socklen_t +ng_ipaddr_salen(const ng_ipaddr_t *a) +{ + assert(a != NULL); +#ifdef WANT_IPV6 + assert(a->sa.sa_family == AF_INET || a->sa.sa_family == AF_INET6); + if (a->sa.sa_family == AF_INET6) + return (socklen_t)sizeof(a->sin6); +#endif + assert(a->sin4.sin_family == AF_INET); + return (socklen_t)sizeof(a->sin4); +} + + +static inline UINT16 +ng_ipaddr_getport(const ng_ipaddr_t *a) +{ +#ifdef WANT_IPV6 + int af = a->sa.sa_family; + + assert(a != NULL); + assert(af == AF_INET || af == AF_INET6); + + if (af == AF_INET6) + return ntohs(a->sin6.sin6_port); +#endif /* WANT_IPV6 */ + + assert(a != NULL); + assert(a->sin4.sin_family == AF_INET); + return ntohs(a->sin4.sin_port); +} + +/* + * init a ng_ipaddr_t object. + * @param addr: pointer to ng_ipaddr_t to initialize. + * @param ip_str: ip address in dotted-decimal (ipv4) or hexadecimal (ipv6) notation + * @param port: transport layer port number to use. + */ +GLOBAL bool ng_ipaddr_init PARAMS((ng_ipaddr_t *addr, const char *ip_str, UINT16 port)); + +/* set sin4/sin6_port, depending on a->sa_family */ +GLOBAL void ng_ipaddr_setport PARAMS((ng_ipaddr_t *a, UINT16 port)); + +/* return true if a and b have the same IP address. If a and b have different AF, return false. */ +GLOBAL bool ng_ipaddr_ipequal PARAMS((const ng_ipaddr_t *a, const ng_ipaddr_t *b)); + + +#ifdef WANT_IPV6 +/* convert struct sockaddr to string, returns pointer to static buffer */ +GLOBAL const char *ng_ipaddr_tostr PARAMS((const ng_ipaddr_t *addr)); + +/* convert struct sockaddr to string. dest must be NG_INET_ADDRSTRLEN bytes long */ +GLOBAL bool ng_ipaddr_tostr_r PARAMS((const ng_ipaddr_t *addr, char *dest)); +#else +static inline const char* +ng_ipaddr_tostr(const ng_ipaddr_t *addr) +{ + assert(addr != NULL); + return inet_ntoa(addr->sin4.sin_addr); +} + +static inline bool +ng_ipaddr_tostr_r(const ng_ipaddr_t *addr, char *d) +{ + assert(addr != NULL); + assert(d != NULL); + strlcpy(d, inet_ntoa(addr->sin4.sin_addr), NG_INET_ADDRSTRLEN); + return true; +} +#endif +#endif + +/* -eof- */ diff --git a/deprecated-ngircd/src/portab/Makefile.ng b/deprecated-ngircd/src/portab/Makefile.ng new file mode 100644 index 0000000..9be5f56 --- /dev/null +++ b/deprecated-ngircd/src/portab/Makefile.ng @@ -0,0 +1,41 @@ +# +# ngIRCd -- The Next Generation IRC Daemon +# 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 +# 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. +# + +__ng_Makefile_am_template__ + +EXTRA_DIST = Makefile.ng + +noinst_LIBRARIES = libngportab.a + +libngportab_a_SOURCES = \ + strdup.c \ + strlcpy.c \ + strndup.c \ + strtok_r.c \ + vsnprintf.c \ + waitpid.c + +check_PROGRAMS = portabtest + +portabtest_SOURCES = portabtest.c + +portabtest_LDFLAGS = -L. + +portabtest_LDADD = -lngportab + +noinst_HEADERS = portab.h + +maintainer-clean-local: + rm -f Makefile Makefile.in Makefile.am + +TESTS = portabtest + +# -eof- diff --git a/deprecated-ngircd/src/portab/portab.h b/deprecated-ngircd/src/portab/portab.h new file mode 100644 index 0000000..e0ec3e1 --- /dev/null +++ b/deprecated-ngircd/src/portab/portab.h @@ -0,0 +1,184 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + * Copyright (c)2001-2014 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. + */ + +#ifndef __PORTAB__ +#define __PORTAB__ + +/** + * @file + * Portability functions and declarations (header) + */ + +#include "config.h" + +/* remove assert() macro at compile time if DEBUG is not set. */ + +#ifndef DEBUG +# define NDEBUG +#endif + +/* compiler features */ + +#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 7)) +# define PUNUSED(x) __attribute__ ((unused)) x +# define UNUSED __attribute__ ((unused)) +#else +# define PUNUSED(x) x +# define UNUSED +#endif + +#ifndef PARAMS +# if PROTOTYPES +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +/* datatypes */ + +#include <sys/types.h> + +#ifdef HAVE_STDDEF_H +# include <stddef.h> +#endif + +#ifdef HAVE_INTTYPES_H +# include <inttypes.h> +# define NGIRC_GOT_INTTYPES +#else +# ifdef HAVE_STDINT_H +# include <stdint.h> +# define NGIRC_GOT_INTTYPES +# endif +#endif + +#ifndef PROTOTYPES +# ifndef signed +# define signed +# endif +#endif + +typedef void POINTER; + +#ifdef NGIRC_GOT_INTTYPES +typedef uint8_t UINT8; +typedef uint16_t UINT16; +typedef uint32_t UINT32; +#else +typedef unsigned char UINT8; +typedef unsigned short UINT16; +typedef unsigned int UINT32; +#endif + +#ifdef HAVE_STDBOOL_H +# include <stdbool.h> +#else +typedef unsigned char bool; +# define true (bool)1 +# define false (bool)0 +#endif + +#ifndef NULL +# ifdef PROTOTYPES +# define NULL (void *)0 +# else +# define NULL 0L +# endif +#endif + +#ifdef NeXT +# define S_IRUSR 0000400 /* read permission, owner */ +# define S_IWUSR 0000200 /* write permission, owner */ +# define S_IRGRP 0000040 /* read permission, group */ +# define S_IROTH 0000004 /* read permission, other */ +# define ssize_t int +#endif + +#undef GLOBAL +#ifdef GLOBAL_INIT +#define GLOBAL +#else +#define GLOBAL extern +#endif + +/* target constants */ + +#ifndef HOST_OS +# define HOST_OS "unknown" +#endif + +#ifndef HOST_CPU +# define HOST_CPU "unknown" +#endif + +#ifndef HOST_VENDOR +# define HOST_VENDOR "unknown" +#endif + +#ifdef __HAIKU__ +# define SINGLE_USER_OS +#endif + +/* configure options */ + +#ifndef HAVE_socklen_t +typedef int socklen_t; /* for Mac OS X, amongst others */ +#endif + +#ifndef HAVE_SNPRINTF +extern int snprintf PARAMS(( char *str, size_t count, const char *fmt, ... )); +#endif + +#ifndef HAVE_STRLCAT +extern size_t strlcat PARAMS(( char *dst, const char *src, size_t size )); +#endif + +#ifndef HAVE_STRLCPY +extern size_t strlcpy PARAMS(( char *dst, const char *src, size_t size )); +#endif + +#ifndef HAVE_STRDUP +extern char * strdup PARAMS(( const char *s )); +#endif + +#ifndef HAVE_STRNDUP +extern char * strndup PARAMS((const char *s, size_t maxlen)); +#endif + +#ifndef HAVE_STRTOK_R +extern char * strtok_r PARAMS((char *str, const char *delim, char **saveptr)); +#endif + +#ifndef HAVE_VSNPRINTF +#include <stdarg.h> +extern int vsnprintf PARAMS(( char *str, size_t count, const char *fmt, va_list args )); +#endif + +#ifndef HAVE_GAI_STRERROR +# define gai_strerror(r) "unknown error" +#endif + +#ifndef PACKAGE_NAME +# define PACKAGE_NAME PACKAGE +#endif + +#ifndef PACKAGE_VERSION +# define PACKAGE_VERSION VERSION +#endif + +#ifndef SYSCONFDIR +# define SYSCONFDIR "/etc" +#endif + +#endif + +/* -eof- */ diff --git a/deprecated-ngircd/src/portab/portabtest.c b/deprecated-ngircd/src/portab/portabtest.c new file mode 100644 index 0000000..5ad37b9 --- /dev/null +++ b/deprecated-ngircd/src/portab/portabtest.c @@ -0,0 +1,206 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + * Copyright (c)2001-2014 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. + */ + +#include "portab.h" + +/** + * @file + * Test program for portab.h and friends ;-) + */ + +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +int allow_severity = 0, deny_severity = 0; + +static void +Panic(char *Reason) +{ + /* Oops, something failed!? */ + fprintf(stderr, "Oops, test for %s failed!?\n", Reason); + exit(1); +} /* Panic */ + +static void +Check_snprintf(void) +{ + char str[5]; + + snprintf(str, sizeof(str), "%s", "1234567890"); + if (str[4] != '\0') + Panic("snprintf NULL byte"); + if (strlen(str) != 4) + Panic("snprintf string length"); +} + +static void +Check_strdup(void) +{ + char *ptr; + + ptr = strdup("1234567890"); + if (!ptr) + Panic("strdup"); + if (ptr[10] != '\0') + Panic("strdup NULL byte"); + if (strlen(ptr) != 10) + Panic("strdup string length"); + free(ptr); +} + +static void +Check_strndup(void) +{ + char *ptr; + + ptr = strndup("1234567890", 5); + if (!ptr) + Panic("strndup"); + if (ptr[5] != '\0') + Panic("strndup NULL byte"); + if (strlen(ptr) != 5) + Panic("strndup string length"); + free(ptr); +} + +static void +Check_strlcpy(void) +{ + char str[5]; + + if (strlcpy(str, "1234567890", sizeof(str)) != 10) + Panic("strlcpy return code"); + if (str[4] != '\0') + Panic("strlcpy NULL byte"); + if (strlen(str) != 4) + Panic("strlcpy string length"); +} + +static void +Check_strlcat(void) +{ + char str[5]; + + if (strlcpy(str, "12", sizeof(str)) != 2) + Panic("strlcpy for strlcat"); + if (strlcat(str, "1234567890", sizeof(str)) != 12) + Panic("strlcat return code"); + if (str[4] != '\0') + Panic("strlcat NULL byte"); + if (strlen(str) != 4) + Panic("strlcat string length"); +} + +static void +Check_strtok_r(void) +{ + char *str, *ptr, *last; + + ptr = strdup("12,abc"); + str = ptr; + + ptr = strtok_r(ptr, ",", &last); + if (!ptr) + Panic("strtok_r result #1"); + if (strcmp(ptr, "12") != 0) + Panic("strtok_r token #1"); + + ptr = strtok_r(NULL, ",", &last); + if (!ptr) + Panic("strtok_r result #2"); + if (strcmp(ptr, "abc") != 0) + Panic("strtok_r token #2"); + + ptr = strtok_r(NULL, ",", &last); + if (ptr) + Panic("strtok_r result #3"); + + free(str); +} + +#ifdef PROTOTYPES +static void +Check_vsnprintf(const int Len, const char *Format, ...) +#else +static void +Check_vsnprintf(Len, Format, va_alist) +const int Len; +const char *Format; +va_dcl +#endif +{ + char str[5]; + va_list ap; + int r; + +#ifdef PROTOTYPES + va_start(ap, Format); +#else + va_start(ap); +#endif + r = vsnprintf(str, sizeof(str), Format, ap); + va_end(ap); + if (r != Len) { + /* C99 states that vsnprintf() "returns the number of + * characters that would have been printed if the n were + * unlimited", but according to the Linux manual page "glibc + * until 2.0.6 would return -1 when the output was truncated", + * and other implementations (libUTIL on A/UX) even return the + * number of characters processed ... so we only test our own + * implementation and warn on errors otherwise :-/ */ +#ifdef HAVE_VSNPRINTF + fprintf(stderr, + "\n ** WARNING: The vsnprintf() function of this system isn't standard\n"); + fprintf(stderr, + " ** conformant and returns a WRONG result: %d (should be %d)! The test\n", + r, Len); + fprintf(stderr, + " ** result has been ignored but may lead to errors during execution!\n\n"); +#else + Panic("vsnprintf return code"); +#endif + } + if (str[4] != '\0') + Panic("vsnprintf NULL byte"); + if (strlen(str) != 4) + Panic("vsnprintf string length"); +} + +GLOBAL int +main(void) +{ + /* validate datatypes */ + if (false != 0) + Panic("false"); + if (true != 1) + Panic("true"); + if (sizeof(UINT8) != 1) + Panic("UINT8"); + if (sizeof(UINT16) != 2) + Panic("UINT16"); + if (sizeof(UINT32) != 4) + Panic("UINT32"); + + /* check functions */ + Check_snprintf(); + Check_strdup(); + Check_strndup(); + Check_strlcpy(); + Check_strlcat(); + Check_strtok_r(); + Check_vsnprintf(2+10, "%s%s", "ab", "1234567890"); + + return 0; +} + +/* -eof- */ diff --git a/deprecated-ngircd/src/portab/strdup.c b/deprecated-ngircd/src/portab/strdup.c new file mode 100644 index 0000000..adb19e7 --- /dev/null +++ b/deprecated-ngircd/src/portab/strdup.c @@ -0,0 +1,34 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + */ + +#include "portab.h" + +/** + * @file + * strdup() implementation. Public domain. + */ + +#ifndef HAVE_STRDUP + +#include <string.h> +#include <stdlib.h> +#include <sys/types.h> + +GLOBAL char * +strdup(const char *s) +{ + char *dup; + size_t len = strlen(s); + size_t alloc = len + 1; + + if (len >= alloc) + return NULL; + dup = malloc(alloc); + if (dup) + strlcpy(dup, s, alloc ); + + return dup; +} + +#endif diff --git a/deprecated-ngircd/src/portab/strlcpy.c b/deprecated-ngircd/src/portab/strlcpy.c new file mode 100644 index 0000000..1f86a93 --- /dev/null +++ b/deprecated-ngircd/src/portab/strlcpy.c @@ -0,0 +1,72 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + * Copyright (c)2001-2014 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. + */ + +#include "portab.h" + +/** + * @file + * strlcpy() and strlcat() replacement functions. + * + * See <http://www.openbsd.org/papers/strlcpy-paper.ps> for details. + * + * Code partially borrowed from compat.c of rsync, written by Andrew + * Tridgell (1998) and Martin Pool (2002): + * <http://cvs.samba.org/cgi-bin/cvsweb/rsync/lib/compat.c> + */ + +#include <string.h> +#include <sys/types.h> + +#ifndef HAVE_STRLCAT + +GLOBAL size_t +strlcat( char *dst, const char *src, size_t size ) +{ + /* Like strncat() but does not 0 fill the buffer and + * always null terminates. */ + + size_t len1 = strlen( dst ); + size_t len2 = strlen( src ); + size_t ret = len1 + len2; + + if( size && ( len1 < size - 1 )) { + if( len2 >= size - len1 ) + len2 = size - len1 - 1; + memcpy( dst + len1, src, len2 ); + dst[len1 + len2] = 0; + } + return ret; +} /* strlcat */ + +#endif + +#ifndef HAVE_STRLCPY + +GLOBAL size_t +strlcpy( char *dst, const char *src, size_t size ) +{ + /* Like strncpy but does not 0 fill the buffer and + * always null terminates. */ + + size_t len = strlen( src ); + size_t ret = len; + + if( size > 0 ) { + if( len >= size ) len = size - 1; + memcpy( dst, src, len ); + dst[len] = 0; + } + return ret; +} /* strlcpy */ + +#endif + +/* -eof- */ diff --git a/deprecated-ngircd/src/portab/strndup.c b/deprecated-ngircd/src/portab/strndup.c new file mode 100644 index 0000000..d63b972 --- /dev/null +++ b/deprecated-ngircd/src/portab/strndup.c @@ -0,0 +1,34 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + */ + +#include "portab.h" + +/** + * @file + * strndup() implementation. Public domain. + */ + +#ifndef HAVE_STRNDUP + +#include <string.h> +#include <stdlib.h> +#include <sys/types.h> + +GLOBAL char * +strndup(const char *s, size_t maxlen) +{ + char *dup; + size_t len = strlen(s); + + if (len > maxlen) + len = maxlen; + len++; + dup = malloc(len); + if (dup) + strlcpy(dup, s, len); + + return dup; +} + +#endif diff --git a/deprecated-ngircd/src/portab/strtok_r.c b/deprecated-ngircd/src/portab/strtok_r.c new file mode 100644 index 0000000..4d00772 --- /dev/null +++ b/deprecated-ngircd/src/portab/strtok_r.c @@ -0,0 +1,36 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + */ + +#include "portab.h" + +/** + * @file + * Implementation of strtok_r() + */ + +#ifndef HAVE_STRTOK_R + +#include <string.h> + +char * +strtok_r(char *str, const char *delim, char **saveptr) +{ + char *tmp; + + if (!str) + str = *saveptr; + str += strspn(str, delim); + if (*str == 0) + return NULL; + + tmp = str + strcspn(str, delim); /* get end of token */ + if (*tmp) { /* another delimiter */ + *tmp = 0; + tmp++; + } + *saveptr = tmp; + return str; +} + +#endif diff --git a/deprecated-ngircd/src/portab/vsnprintf.c b/deprecated-ngircd/src/portab/vsnprintf.c new file mode 100644 index 0000000..d3b2a88 --- /dev/null +++ b/deprecated-ngircd/src/portab/vsnprintf.c @@ -0,0 +1,799 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + * Copyright (c)2001,2002 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 + * 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. + */ + +#include "portab.h" + +/** + * @file + * snprintf() and vsnprintf() replacement functions + */ + +/* + * snprintf.c: Copyright Patrick Powell 1995 + * This code is based on code written by Patrick Powell (papowell@astart.com) + * It may be used for any purpose as long as this notice remains intact + * on all source code distributions + * + * Original: Patrick Powell Tue Apr 11 09:48:21 PDT 1995 + * A bombproof version of doprnt (dopr) included. + * Sigh. This sort of thing is always nasty do deal with. Note that + * the version here does not include floating point... + * + * snprintf() is used instead of sprintf() as it does limit checks + * for string length. This covers a nasty loophole. + * + * The other functions are there to prevent NULL pointers from + * causing nast effects. + * + * More Recently: + * Brandon Long <blong@fiction.net> 9/15/96 for mutt 0.43 + * This was ugly. It is still ugly. I opted out of floating point + * numbers, but the formatter understands just about everything + * from the normal C string format, at least as far as I can tell from + * the Solaris 2.5 printf(3S) man page. + * + * Brandon Long <blong@fiction.net> 10/22/97 for mutt 0.87.1 + * Ok, added some minimal floating point support, which means this + * probably requires libm on most operating systems. Don't yet + * support the exponent (e,E) and sigfig (g,G). Also, fmtint() + * was pretty badly broken, it just wasn't being exercised in ways + * which showed it, so that's been fixed. Also, formatted the code + * to mutt conventions, and removed dead code left over from the + * original. Also, there is now a builtin-test, just compile with: + * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm + * and run snprintf for results. + * + * Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i + * The PGP code was using unsigned hexadecimal formats. + * Unfortunately, unsigned formats simply didn't work. + * + * Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8 + * The original code assumed that both snprintf() and vsnprintf() were + * missing. Some systems only have snprintf() but not vsnprintf(), so + * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF. + * + * Andrew Tridgell <tridge@samba.org>, October 1998 + * fixed handling of %.0f + * added test for HAVE_LONG_DOUBLE + * + * tridge@samba.org, idra@samba.org, April 2001 + * got rid of fcvt code (twas buggy and made testing harder) + * added C99 semantics + * + * Alexander Barton, <alex@barton.de>, 2002-05-19 + * removed [v]asprintf() and C99 tests: not needed by ngIRCd. + */ + +#ifdef HAVE_STRING_H +#include <string.h> +#endif +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif +#ifdef HAVE_CTYPE_H +#include <ctype.h> +#endif +#include <sys/types.h> +#include <stdarg.h> +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + +#if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) +/* only include stdio.h if we are not re-defining snprintf or vsnprintf */ +#include <stdio.h> +/* make the compiler happy with an empty file */ +void dummy_snprintf PARAMS(( void )); +void dummy_snprintf PARAMS(( void )) { } +#else + +#ifdef HAVE_LONG_DOUBLE +#define LDOUBLE long double +#else +#define LDOUBLE double +#endif + +#ifdef HAVE_LONG_LONG +#define LLONG long long +#else +#define LLONG long +#endif + +static size_t dopr PARAMS((char *buffer, size_t maxlen, const char *format, + va_list args)); +static void fmtstr PARAMS((char *buffer, size_t *currlen, size_t maxlen, + char *value, int flags, int min, int max)); +static void fmtint PARAMS((char *buffer, size_t *currlen, size_t maxlen, + long value, int base, int min, int max, int flags)); +static void fmtfp PARAMS((char *buffer, size_t *currlen, size_t maxlen, + LDOUBLE fvalue, int min, int max, int flags)); +static void dopr_outch PARAMS((char *buffer, size_t *currlen, size_t maxlen, + char c)); + +/* + * dopr(): poor man's version of doprintf + */ + +/* format read states */ +#define DP_S_DEFAULT 0 +#define DP_S_FLAGS 1 +#define DP_S_MIN 2 +#define DP_S_DOT 3 +#define DP_S_MAX 4 +#define DP_S_MOD 5 +#define DP_S_CONV 6 +#define DP_S_DONE 7 + +/* format flags - Bits */ +#define DP_F_MINUS (1 << 0) +#define DP_F_PLUS (1 << 1) +#define DP_F_SPACE (1 << 2) +#define DP_F_NUM (1 << 3) +#define DP_F_ZERO (1 << 4) +#define DP_F_UP (1 << 5) +#define DP_F_UNSIGNED (1 << 6) + +/* Conversion Flags */ +#define DP_C_SHORT 1 +#define DP_C_LONG 2 +#define DP_C_LDOUBLE 3 +#define DP_C_LLONG 4 + +#define char_to_int(p) ((p)- '0') +#ifndef MAX +#define MAX(p,q) (((p) >= (q)) ? (p) : (q)) +#endif + +static size_t +dopr(char *buffer, size_t maxlen, const char *format, va_list args) +{ + char ch; + LLONG value; + LDOUBLE fvalue; + char *strvalue; + int min; + int max; + int state; + int flags; + int cflags; + size_t currlen; + + state = DP_S_DEFAULT; + currlen = flags = cflags = min = 0; + max = -1; + ch = *format++; + + while (state != DP_S_DONE) { + if (ch == '\0') + state = DP_S_DONE; + + switch(state) { + case DP_S_DEFAULT: + if (ch == '%') + state = DP_S_FLAGS; + else + dopr_outch (buffer, &currlen, maxlen, ch); + ch = *format++; + break; + case DP_S_FLAGS: + switch (ch) { + case '-': + flags |= DP_F_MINUS; + ch = *format++; + break; + case '+': + flags |= DP_F_PLUS; + ch = *format++; + break; + case ' ': + flags |= DP_F_SPACE; + ch = *format++; + break; + case '#': + flags |= DP_F_NUM; + ch = *format++; + break; + case '0': + flags |= DP_F_ZERO; + ch = *format++; + break; + default: + state = DP_S_MIN; + break; + } + break; + case DP_S_MIN: + if (isdigit((unsigned char)ch)) { + min = 10*min + char_to_int (ch); + ch = *format++; + } else if (ch == '*') { + min = va_arg (args, int); + ch = *format++; + state = DP_S_DOT; + } else { + state = DP_S_DOT; + } + break; + case DP_S_DOT: + if (ch == '.') { + state = DP_S_MAX; + ch = *format++; + } else { + state = DP_S_MOD; + } + break; + case DP_S_MAX: + if (isdigit((unsigned char)ch)) { + if (max < 0) + max = 0; + max = 10*max + char_to_int (ch); + ch = *format++; + } else if (ch == '*') { + max = va_arg (args, int); + ch = *format++; + state = DP_S_MOD; + } else { + state = DP_S_MOD; + } + break; + case DP_S_MOD: + switch (ch) { + case 'h': + cflags = DP_C_SHORT; + ch = *format++; + break; + case 'l': + cflags = DP_C_LONG; + ch = *format++; + if (ch == 'l') { /* It's a long long */ + cflags = DP_C_LLONG; + ch = *format++; + } + break; + case 'L': + cflags = DP_C_LDOUBLE; + ch = *format++; + break; + default: + break; + } + state = DP_S_CONV; + break; + case DP_S_CONV: + switch (ch) { + case 'd': + case 'i': + if (cflags == DP_C_SHORT) + value = va_arg (args, int); + else if (cflags == DP_C_LONG) + value = va_arg (args, long int); + else if (cflags == DP_C_LLONG) + value = va_arg (args, LLONG); + else + value = va_arg (args, int); + fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); + break; + case 'o': + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (long)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); + break; + case 'u': + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (LLONG)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); + break; + case 'X': + flags |= DP_F_UP; + case 'x': + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (LLONG)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); + break; + case 'f': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + /* um, floating point? */ + fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); + break; + case 'E': + flags |= DP_F_UP; + case 'e': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + break; + case 'G': + flags |= DP_F_UP; + case 'g': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + break; + case 'c': + dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); + break; + case 's': + strvalue = va_arg (args, char *); + if (max == -1) { + max = strlen(strvalue); + } + if (min > 0 && max >= 0 && min > max) max = min; + fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); + break; + case 'p': + strvalue = va_arg (args, void *); + fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); + break; + case 'n': + if (cflags == DP_C_SHORT) { + short int *num; + num = va_arg (args, short int *); + *num = currlen; + } else if (cflags == DP_C_LONG) { + long int *num; + num = va_arg (args, long int *); + *num = (long int)currlen; + } else if (cflags == DP_C_LLONG) { + LLONG *num; + num = va_arg (args, LLONG *); + *num = (LLONG)currlen; + } else { + int *num; + num = va_arg (args, int *); + *num = currlen; + } + break; + case '%': + dopr_outch (buffer, &currlen, maxlen, ch); + break; + case 'w': + /* not supported yet, treat as next char */ + ch = *format++; + break; + default: + /* Unknown, skip */ + break; + } + ch = *format++; + state = DP_S_DEFAULT; + flags = cflags = min = 0; + max = -1; + break; + case DP_S_DONE: + break; + default: + /* hmm? */ + break; /* some picky compilers need this */ + } + } + if (maxlen != 0) { + if (currlen < maxlen - 1) + buffer[currlen] = '\0'; + else if (maxlen > 0) + buffer[maxlen - 1] = '\0'; + } + + return currlen; +} + +static void +fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, + int min, int max) +{ + int padlen, strln; /* amount to pad */ + int cnt = 0; + +#ifdef DEBUG_SNPRINTF + printf("fmtstr min=%d max=%d s=[%s]\n", min, max, value); +#endif + if (value == 0) { + value = "<NULL>"; + } + + for (strln = 0; value[strln]; ++strln); /* strlen */ + padlen = min - strln; + if (padlen < 0) + padlen = 0; + if (flags & DP_F_MINUS) + padlen = -padlen; /* Left Justify */ + + while ((padlen > 0) && (cnt < max)) { + dopr_outch (buffer, currlen, maxlen, ' '); + --padlen; + ++cnt; + } + while (*value && (cnt < max)) { + dopr_outch (buffer, currlen, maxlen, *value++); + ++cnt; + } + while ((padlen < 0) && (cnt < max)) { + dopr_outch (buffer, currlen, maxlen, ' '); + ++padlen; + ++cnt; + } +} + +/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */ + +static void +fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base, + int min, int max, int flags) +{ + int signvalue = 0; + unsigned long uvalue; + char convert[20]; + int place = 0; + int spadlen = 0; /* amount to space pad */ + int zpadlen = 0; /* amount to zero pad */ + int caps = 0; + + if (max < 0) + max = 0; + + uvalue = value; + + if(!(flags & DP_F_UNSIGNED)) { + if( value < 0 ) { + signvalue = '-'; + uvalue = -value; + } else { + if (flags & DP_F_PLUS) /* Do a sign (+/i) */ + signvalue = '+'; + else if (flags & DP_F_SPACE) + signvalue = ' '; + } + } + + if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ + + do { + convert[place++] = + (caps? "0123456789ABCDEF":"0123456789abcdef") + [uvalue % (unsigned)base ]; + uvalue = (uvalue / (unsigned)base ); + } while(uvalue && (place < 20)); + if (place == 20) place--; + convert[place] = 0; + + zpadlen = max - place; + spadlen = min - MAX (max, place) - (signvalue ? 1 : 0); + if (zpadlen < 0) zpadlen = 0; + if (spadlen < 0) spadlen = 0; + if (flags & DP_F_ZERO) { + zpadlen = MAX(zpadlen, spadlen); + spadlen = 0; + } + if (flags & DP_F_MINUS) + spadlen = -spadlen; /* Left Justifty */ + +#ifdef DEBUG_SNPRINTF + printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", + zpadlen, spadlen, min, max, place); +#endif + + /* Spaces */ + while (spadlen > 0) { + dopr_outch (buffer, currlen, maxlen, ' '); + --spadlen; + } + + /* Sign */ + if (signvalue) + dopr_outch (buffer, currlen, maxlen, signvalue); + + /* Zeros */ + if (zpadlen > 0) { + while (zpadlen > 0) { + dopr_outch (buffer, currlen, maxlen, '0'); + --zpadlen; + } + } + + /* Digits */ + while (place > 0) + dopr_outch (buffer, currlen, maxlen, convert[--place]); + + /* Left Justified spaces */ + while (spadlen < 0) { + dopr_outch (buffer, currlen, maxlen, ' '); + ++spadlen; + } +} + +static LDOUBLE +abs_val(LDOUBLE value) +{ + LDOUBLE result = value; + + if (value < 0) + result = -value; + + return result; +} + +static LDOUBLE +POW10(int exp) +{ + LDOUBLE result = 1; + + while (exp) { + result *= 10; + exp--; + } + + return result; +} + +static LLONG +ROUND(LDOUBLE value) +{ + LLONG intpart; + + intpart = (LLONG)value; + value = value - intpart; + if (value >= 0.5) intpart++; + + return intpart; +} + +/* a replacement for modf that doesn't need the math library. Should + be portable, but slow */ +static double +my_modf(double x0, double *iptr) +{ + int i; + long l; + double x = x0; + double f = 1.0; + + for (i=0;i<100;i++) { + l = (long)x; + if (l <= (x+1) && l >= (x-1)) break; + x *= 0.1; + f *= 10.0; + } + + if (i == 100) { + /* yikes! the number is beyond what we can handle. What do we do? */ + (*iptr) = 0; + return 0; + } + + if (i != 0) { + double i2; + double ret; + + ret = my_modf(x0-l*f, &i2); + (*iptr) = l*f + i2; + return ret; + } + + (*iptr) = l; + return x - (*iptr); +} + + +static void +fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue, + int min, int max, int flags) +{ + int signvalue = 0; + double ufvalue; + char iconvert[311]; + char fconvert[311]; + int iplace = 0; + int fplace = 0; + int padlen = 0; /* amount to pad */ + int zpadlen = 0; + int caps = 0; + int index; + double intpart; + double fracpart; + double temp; + + /* + * AIX manpage says the default is 0, but Solaris says the default + * is 6, and sprintf on AIX defaults to 6 + */ + if (max < 0) + max = 6; + + ufvalue = abs_val (fvalue); + + if (fvalue < 0) { + signvalue = '-'; + } else { + if (flags & DP_F_PLUS) { /* Do a sign (+/i) */ + signvalue = '+'; + } else { + if (flags & DP_F_SPACE) + signvalue = ' '; + } + } + + /* + * Sorry, we only support 16 digits past the decimal because of our + * conversion method + */ + if (max > 16) + max = 16; + + /* We "cheat" by converting the fractional part to integer by + * multiplying by a factor of 10 + */ + + temp = ufvalue; + my_modf(temp, &intpart); + + fracpart = ROUND((POW10(max)) * (ufvalue - intpart)); + + if (fracpart >= POW10(max)) { + intpart++; + fracpart -= POW10(max); + } + + + /* Convert integer part */ + do { + temp = intpart; + my_modf(intpart*0.1, &intpart); + temp = temp*0.1; + index = (int) ((temp -intpart +0.05)* 10.0); + /* index = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */ + /* printf ("%llf, %f, %x\n", temp, intpart, index); */ + iconvert[iplace++] = + (caps? "0123456789ABCDEF":"0123456789abcdef")[index]; + } while (intpart && (iplace < 311)); + if (iplace == 311) iplace--; + iconvert[iplace] = 0; + + /* Convert fractional part */ + if (fracpart) + { + do { + temp = fracpart; + my_modf(fracpart*0.1, &fracpart); + temp = temp*0.1; + index = (int) ((temp -fracpart +0.05)* 10.0); + /* index = (int) ((((temp/10) -fracpart) +0.05) *10); */ + /* printf ("%lf, %lf, %ld\n", temp, fracpart, index); */ + fconvert[fplace++] = + (caps? "0123456789ABCDEF":"0123456789abcdef")[index]; + } while(fracpart && (fplace < 311)); + if (fplace == 311) fplace--; + } + fconvert[fplace] = 0; + + /* -1 for decimal point, another -1 if we are printing a sign */ + padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); + zpadlen = max - fplace; + if (zpadlen < 0) zpadlen = 0; + if (padlen < 0) + padlen = 0; + if (flags & DP_F_MINUS) + padlen = -padlen; /* Left Justifty */ + + if ((flags & DP_F_ZERO) && (padlen > 0)) { + if (signvalue) { + dopr_outch (buffer, currlen, maxlen, signvalue); + --padlen; + signvalue = 0; + } + while (padlen > 0) { + dopr_outch (buffer, currlen, maxlen, '0'); + --padlen; + } + } + while (padlen > 0) { + dopr_outch (buffer, currlen, maxlen, ' '); + --padlen; + } + if (signvalue) + dopr_outch (buffer, currlen, maxlen, signvalue); + + while (iplace > 0) + dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); + +#ifdef DEBUG_SNPRINTF + printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen); +#endif + + /* + * Decimal point. This should probably use locale to find the correct + * char to print out. + */ + if (max > 0) { + dopr_outch (buffer, currlen, maxlen, '.'); + + while (fplace > 0) + dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); + } + + while (zpadlen > 0) { + dopr_outch (buffer, currlen, maxlen, '0'); + --zpadlen; + } + + while (padlen < 0) { + dopr_outch (buffer, currlen, maxlen, ' '); + ++padlen; + } +} + +static void +dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) +{ + if (*currlen < maxlen) { + buffer[(*currlen)] = c; + } + (*currlen)++; +} + +#if !defined(HAVE_VSNPRINTF) +int +vsnprintf (char *str, size_t count, const char *fmt, va_list args) +{ + return dopr(str, count, fmt, args); +} +#endif + +#if !defined(HAVE_SNPRINTF) +#ifdef PROTOTYPES +int +snprintf(char *str, size_t count, const char *fmt, ...) +#else +int +snprintf(str, count, fmt, va_alist) +char *str; +size_t count; +const char *fmt; +va_dcl +#endif +{ + size_t ret; + va_list ap; + + va_start(ap, fmt); + ret = vsnprintf(str, count, fmt, ap); + va_end(ap); + return ret; +} +#endif + +#endif + +/* -eof- */ diff --git a/deprecated-ngircd/src/portab/waitpid.c b/deprecated-ngircd/src/portab/waitpid.c new file mode 100644 index 0000000..921dd3d --- /dev/null +++ b/deprecated-ngircd/src/portab/waitpid.c @@ -0,0 +1,30 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + */ + +#include "portab.h" + +/** + * @file + * waitpid() implementation. Public domain. + * Written by Steven D. Blackford for the NeXT system. + */ + +#ifndef HAVE_WAITPID + +#include <string.h> +#include <stdlib.h> +#include <sys/types.h> + +GLOBAL int +waitpid(pid, stat_loc, options) +int pid, *stat_loc, options; +{ + for (;;) { + int wpid = wait(stat_loc); + if (wpid == pid || wpid == -1) + return wpid; + } +} + +#endif diff --git a/deprecated-ngircd/src/testsuite/Makefile.ng b/deprecated-ngircd/src/testsuite/Makefile.ng new file mode 100644 index 0000000..f866e60 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/Makefile.ng @@ -0,0 +1,143 @@ +# +# ngIRCd -- The Next Generation IRC Daemon +# Copyright (c)2001-2014 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. +# + +__ng_Makefile_am_template__ + +AM_CPPFLAGS = -I$(srcdir)/../portab + +EXTRA_DIST = \ + Makefile.ng README functions.inc getpid.sh \ + start-server.sh stop-server.sh tests.sh stress-server.sh \ + test-loop.sh wait-tests.sh \ + channel-test.e connect-test.e check-idle.e invite-test.e \ + join-test.e kick-test.e message-test.e misc-test.e mode-test.e \ + opless-channel-test.e server-link-test.e who-test.e whois-test.e \ + stress-A.e stress-B.e \ + server-login-test.e \ + start-server1 stop-server1 ngircd-test1.conf \ + start-server2 stop-server2 ngircd-test2.conf \ + start-server3 stop-server3 ngircd-test3.conf \ + reload-server3 reload-server.sh prep-server3 cleanup-server3 switch-server3 \ + connect-ssl-cert1-test.e connect-ssl-cert2-test.e \ + ssl/cert-my-first-domain-tld.pem ssl/cert-my-second-domain-tld.pem \ + ssl/dhparams-my-first-domain-tld.pem ssl/dhparams-my-second-domain-tld.pem \ + ssl/key-my-first-domain-tld.pem ssl/key-my-second-domain-tld.pem + +all: + +clean-local: + rm -rf logs tests *-test ngircd-test*.log procs.tmp tests-skipped.lst \ + T-ngircd1 ngircd-test1.motd T-ngircd2 ngircd-test2.motd T-ngircd3 ngircd-test3.motd + +maintainer-clean-local: + rm -f Makefile Makefile.in Makefile.am + +check_SCRIPTS = ngircd-TEST-Binary tests.sh + +ngircd-TEST-Binary: + cp ../ngircd/ngircd T-ngircd1 + cp ../ngircd/ngircd T-ngircd2 + cp ../ngircd/ngircd T-ngircd3 + [ -f getpid.sh ] || ln -s $(srcdir)/getpid.sh . + rm -f tests-skipped.lst + +connect-test: tests.sh + rm -f connect-test + ln -s $(srcdir)/tests.sh connect-test + +connect-ssl-cert1-test: tests.sh + rm -f connect-ssl-cert1-test + ln -s $(srcdir)/tests.sh connect-ssl-cert1-test + +connect-ssl-cert2-test: tests.sh + rm -f connect-ssl-cert2-test + ln -s $(srcdir)/tests.sh connect-ssl-cert2-test + +channel-test: tests.sh + rm -f channel-test + ln -s $(srcdir)/tests.sh channel-test + +invite-test: tests.sh + rm -f invite-test + ln -s $(srcdir)/tests.sh invite-test + +join-test: tests.sh + rm -f join-test + ln -s $(srcdir)/tests.sh join-test + +kick-test: tests.sh + rm -f kick-test + ln -s $(srcdir)/tests.sh kick-test + +message-test: tests.sh + rm -f message-test + ln -s $(srcdir)/tests.sh message-test + +misc-test: tests.sh + rm -f misc-test + ln -s $(srcdir)/tests.sh misc-test + +mode-test: tests.sh + rm -f mode-test + ln -s $(srcdir)/tests.sh mode-test + +opless-channel-test: tests.sh + rm -f opless-channel-test + ln -s $(srcdir)/tests.sh opless-channel-test + +server-link-test: tests.sh + rm -f server-link-test + ln -s $(srcdir)/tests.sh server-link-test + +server-login-test: tests.sh + rm -f server-login-test + ln -s $(srcdir)/tests.sh server-login-test + +who-test: tests.sh + rm -f who-test + ln -s $(srcdir)/tests.sh who-test + +whois-test: tests.sh + rm -f whois-test + ln -s $(srcdir)/tests.sh whois-test + +TESTS = start-server1 \ + connect-test \ + start-server2 \ + channel-test \ + invite-test \ + join-test \ + kick-test \ + message-test \ + misc-test \ + mode-test \ + opless-channel-test \ + who-test \ + whois-test \ + server-link-test \ + server-login-test \ + stop-server2 \ + stress-server.sh \ + stop-server1 + +if HAVE_SSL +TESTS += \ + prep-server3 \ + start-server3 \ + connect-ssl-cert1-test \ + switch-server3 \ + reload-server3 \ + connect-ssl-cert2-test \ + cleanup-server3 \ + stop-server3 +endif + +# -eof- diff --git a/deprecated-ngircd/src/testsuite/README b/deprecated-ngircd/src/testsuite/README new file mode 100644 index 0000000..33855fb --- /dev/null +++ b/deprecated-ngircd/src/testsuite/README @@ -0,0 +1,100 @@ + + 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. + + -- README for the Test Suite -- + + +I. Overview +~~~~~~~~~~~ + +The purpose of the "test suite" contained in this directory is to detect +bugs and incompatibilities in ngIRCd introduced during coding and after +building ngIRCd on a specific platform. + +To run the "standard" tests call "make check" (which runs "make check" in +all the source directories, testing the "portab" library as well for example) +or "make testsuite" (which only runs the tests in this directory). Both will +build ngIRCd (if required) and run some tests on it. These tests should be +portable and run on all supported platforms without errors. + +NOTE #1: most tests of this suite depend on the external tools expect(1) +and telnet(1), so make sure you have them installed. If not, the tests will +not fail but simply be skipped. + +NOTE #2: the two test servers started by this test suite are configured to +run on port 6789 and 6790; so it will fail if one or both of these ports +are already used by some other daemons! + + +II. Shell Scripts +~~~~~~~~~~~~~~~~ + +getpid.sh <name> + + This script is used to detect the PID of the running process with + the given name in a portable manner. The result is echoed on the + console. It is a helper script for some other scripts of this suite. + +start-server.sh [<id>] + + start-server.sh starts up the test binary, "T-ngircd<id>" (the default + for <id> is 1) with configuration file "ngircd-test<id>.conf" and the + console output redirected to "ngircd-test<id>.log". + The script first makes sure that getpid.sh is available and working, + and that no other instance of the test binary is already running. + The exit code is 0 if the test binary could be started. + +stop-server.sh [<id>] + + This script uses getpid.sh to detect a running test binary + "T-ngircd<id>" and then shuts it down using the TERM signal. + The exit code is 0 if the test binary could be stopped. + +stress-server.sh [<clientCount> [<maxConcurrent>]] + + stress-server.sh starts <clientCount> clients that "stress" the + running test server (id 1); but no more than <maxConcurrent> clients + are started at the same moment. + +tests.sh + + Most of the tests scripts are symlinked to tests.sh, which in turn + uses expect(1) to run the respective script <name>.e and checks + its exit code. + +test-loop.sh [<loops> [<wait>]] + + This script runs all the tests <loops> times (default: 5) and pauses + <wait> seconds (default: 5) between runs. + It isn't used by "make check" or "make testsuite". + +wait-tests.sh [<max>] + + stress-server.sh uses this script to ensure that no more than <max> + clients are connected to the test server (id 1). + + +III. Scripts for expect(1) +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +channel-test.e +check-idle.e +connect-test.e +invite-test.e +join-test.e +kick-test.e +message-test.e +misc-test.e +mode-test.e +opless-channel-test.e +server-link-test.e +stress-A.e +stress-B.e +who-test.e +whois-test.e diff --git a/deprecated-ngircd/src/testsuite/channel-test.e b/deprecated-ngircd/src/testsuite/channel-test.e new file mode 100644 index 0000000..5e0afab --- /dev/null +++ b/deprecated-ngircd/src/testsuite/channel-test.e @@ -0,0 +1,107 @@ +# ngIRCd test suite +# Channel test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick nick\r" +send "user user . . :User\r" +expect { + timeout { exit 1 } + "376" +} + +send "join #channel\r" +expect { + timeout { exit 1 } + "@* JOIN :#channel" +} +expect { + timeout { exit 1 } + "366" +} + +send "topic #channel :Test-Topic\r" +expect { + timeout { exit 1 } + "@* TOPIC #channel :Test-Topic" +} + +send "who #channel\r" +expect { + timeout { exit 1 } + "352 nick #channel" +} +expect { + timeout { exit 1 } + "* nick H@ :0 User" +} +expect { + timeout { exit 1 } + "315 nick #channel" +} + +send "names #channel\r" +expect { + timeout { exit 1 } + "353 nick = #channel :@nick" +} +expect { + timeout { exit 1 } + "366 nick #channel" +} + +send "list\r" +expect { + timeout { exit 1 } + "322 nick #channel 1 :Test-Topic" +} +expect { + timeout { exit 1 } + "323 nick :End of LIST" +} + +send "part #channel :bye bye\r" +expect { + timeout { exit 1 } + "@* PART #channel :bye bye" +} + +send "join #channel\r" +expect { + timeout { exit 1 } + "@* JOIN :#channel" +} +expect { + timeout { exit 1 } + "366" +} + +send "join #channel2\r" +expect { + timeout { exit 1 } + "@* JOIN :#channel2" +} +expect { + timeout { exit 1 } + "366" +} + +send "join 0\r" +expect { + timeout { exit 1 } + "@* PART #channel2 :" +} +expect { + timeout { exit 1 } + "@* PART #channel :" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/check-idle.e b/deprecated-ngircd/src/testsuite/check-idle.e new file mode 100644 index 0000000..3c37e80 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/check-idle.e @@ -0,0 +1,31 @@ +# ngIRCd test suite +# Idle test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick IdleTest\r" +send "user idle . . :Idle-Test\r" +expect { + timeout { exit 1 } + "433 * IdleTest :Nickname already in use" { exit 99 } + "376" +} + +send "lusers\r" +expect { + timeout { exit 1 } + "251 IdleTest :There are 1 users and 0 services on 1 servers" { set r 0 } + "251 IdleTest :There are" { set r 99 } +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} + +exit $r diff --git a/deprecated-ngircd/src/testsuite/cleanup-server3 b/deprecated-ngircd/src/testsuite/cleanup-server3 new file mode 100755 index 0000000..a80fe73 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/cleanup-server3 @@ -0,0 +1,2 @@ +#!/bin/sh +rm ssl/cert.pem ssl/key.pem ssl/dhparams.pem diff --git a/deprecated-ngircd/src/testsuite/connect-ssl-cert1-test.e b/deprecated-ngircd/src/testsuite/connect-ssl-cert1-test.e new file mode 100644 index 0000000..37abb76 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/connect-ssl-cert1-test.e @@ -0,0 +1,21 @@ +# ngIRCd test suite +# Server connect test + +spawn openssl s_client -quiet -connect 127.0.0.1:6790 +expect { + timeout { exit 1 } + "*CN*=*my.first.domain.tld" +} + +sleep 2 +send "oper\r" +expect { + timeout { exit 1 } + "451" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/connect-ssl-cert2-test.e b/deprecated-ngircd/src/testsuite/connect-ssl-cert2-test.e new file mode 100644 index 0000000..0e67d75 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/connect-ssl-cert2-test.e @@ -0,0 +1,21 @@ +# ngIRCd test suite +# Server connect test + +spawn openssl s_client -quiet -connect 127.0.0.1:6790 +expect { + timeout { exit 1 } + "*CN*=*my.second.domain.tld" +} + +sleep 2 +send "oper\r" +expect { + timeout { exit 1 } + "451" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/connect-test.e b/deprecated-ngircd/src/testsuite/connect-test.e new file mode 100644 index 0000000..f3015d8 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/connect-test.e @@ -0,0 +1,20 @@ +# ngIRCd test suite +# Server connect test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "oper\r" +expect { + timeout { exit 1 } + "451" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/functions.inc b/deprecated-ngircd/src/testsuite/functions.inc new file mode 100644 index 0000000..e03499e --- /dev/null +++ b/deprecated-ngircd/src/testsuite/functions.inc @@ -0,0 +1,28 @@ +#!/bin/sh +# +# ngIRCd Test Suite +# Copyright (c)2002-2004 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 +# 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. +# +# $Id: functions.inc,v 1.1 2004/09/06 22:04:06 alex Exp $ +# + +# test how to call echo to get output without newline +echo -n | grep -- -n >/dev/null 2>&1 +if [ $? -eq 0 ]; then + ECHO_N=""; ECHO_C="\c" +else + ECHO_N="-n"; ECHO_C="" +fi + +echo_n() +{ + echo $ECHO_N "$*$ECHO_C" +} + +# -eof- diff --git a/deprecated-ngircd/src/testsuite/getpid.sh b/deprecated-ngircd/src/testsuite/getpid.sh new file mode 100755 index 0000000..7a3dbe3 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/getpid.sh @@ -0,0 +1,67 @@ +#!/bin/sh +# ngIRCd Test Suite +# +# Try to detect the PID of a running process of the current user. +# + +set -u + +# did we get a name? +if [ $# -ne 1 ]; then + echo "Usage: $0 <name>" >&2 + exit 1 +fi + +UNAME=`uname` + +# Use pgrep(1) whenever possible +if [ -x /usr/bin/pgrep ]; then + case "$UNAME" in + "FreeBSD") + PGREP_FLAGS="-a" + ;; + *) + PGREP_FLAGS="" + esac + if [ -n "${LOGNAME:-}" ] || [ -n "${USER:-}" ]; then + # Try to narrow the search down to the current user ... + exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1" + else + # ... but neither LOGNAME nor USER were set! + exec /usr/bin/pgrep $PGREP_FLAGS -n "$1" + fi +fi + +# pidof(1) could be a good alternative on elder Linux systems +if [ -x /bin/pidof ]; then + exec /bin/pidof -s "$1" +fi + +# fall back to ps(1) and parse its output: +# detect flags for "ps" and "head" +PS_PIDCOL=1 +case "$UNAME" in + "A/UX"|"GNU"|"SunOS") + PS_FLAGS="-a"; PS_PIDCOL=2 + ;; + "Haiku") + PS_FLAGS="-o Id -o Team" + ;; + *) + # Linux (GNU coreutils), Free/Net/OpenBSD, ... + PS_FLAGS="-o pid,comm" +esac + +# search PID +ps $PS_FLAGS >procs.tmp +grep -v "$$" procs.tmp | grep "$1" | \ + awk "{print \$$PS_PIDCOL}" | \ + sort -nr >pids.tmp +pid=`head -1 pids.tmp` +rm -rf procs.tmp pids.tmp + +# validate PID +[ "$pid" -gt 1 ] >/dev/null 2>&1 || exit 1 + +echo $pid +exit 0 diff --git a/deprecated-ngircd/src/testsuite/invite-test.e b/deprecated-ngircd/src/testsuite/invite-test.e new file mode 100644 index 0000000..f3115a3 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/invite-test.e @@ -0,0 +1,114 @@ +# ngIRCd test suite +# INVITE test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick nick\r" +send "user user . . :User\r" +expect { + timeout { exit 1 } + "376" +} + +send "invite\r" +expect { + timeout { exit 1 } + "461" +} + +send "invite nick\r" +expect { + timeout { exit 1 } + "461" +} + +send "invite nick #channel\r" +expect { + timeout { exit 1 } + -re "INVITE nick :?#channel" +} +expect { + timeout { exit 1 } + -re "341 nick nick :?#channel" +} + +send "invite nosuchnic #TopicChannel\r" +expect { + timeout { exit 1 } + "401 nick nosuchnic :No such nick or channel name" +} + +send "invite nick #TopicChannel\r" +expect { + timeout { exit 1 } + "442 nick #TopicChannel :You are not on that channel" +} + +send "join #channel\r" +expect { + timeout { exit 1 } + -re "JOIN :?#channel" +} + +send "invite nick #channel\r" +expect { + timeout { exit 1 } + "443 nick nick #channel :is already on channel" +} + +send "mode #channel +i\r" +expect { + timeout { exit 1 } + "MODE #channel +i" +} + +send "mode #channel -o nick\r" +expect { + timeout { exit 1 } + "MODE #channel -o nick" +} + +send "invite nick #channel\r" +expect { + timeout { exit 1 } + "482 nick #channel :You are not channel operator" + #it would be reasonable to expect 443 here instead +} + +send "part #channel\r" +expect { + timeout { exit 1} + "@* PART #channel :" +} + +send "invite nick :parameter with spaces\r" +expect { + timeout { exit 1 } + "INVITE nick :parameter with spaces" +} +expect { + timeout { exit 1 } + "341 nick nick :parameter with spaces" +} + +send "away message\r" +expect { + timeout { exit 1 } + "306 nick :You have been marked as being away" +} + +send "INVITE nick #channel\r" +expect { + timeout { exit 1 } + -re "301 nick nick :?message" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/join-test.e b/deprecated-ngircd/src/testsuite/join-test.e new file mode 100644 index 0000000..7e6a29a --- /dev/null +++ b/deprecated-ngircd/src/testsuite/join-test.e @@ -0,0 +1,112 @@ +# ngIRCd test suite +# JOIN test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick nick\r" +send "user user . . :User\r" +expect { + timeout { exit 1 } + "376" +} + +send "JOIN\r" +expect { + timeout { exit 1} + "461" +} + +send "JOIN #InviteChannel\r" +expect { + timeout { exit 1 } + "473" +} + +send "JOIN #FullKeyed\r" +expect { + timeout { exit 1 } + "475" +} + +send "JOIN #FullKeyed WrongKey\r" +expect { + timeout { exit 1 } + "475" +} + +send "JOIN #FullKeyed Secret\r" +expect { + timeout { exit 1 } + "471" +} + +send "JOIN #TopicChannel\r" +expect { + timeout { exit 1 } + "@* JOIN :#TopicChannel" +} +expect { + timeout { exit 1 } + "332" +} + +send "JOIN 0\r" +send "JOIN #1,#2,#3,#4\r" +send "JOIN #5\r" +expect { + timeout { exit 1 } + "405" +} +send "JOIN 0\r" + +send "JoIn #MultiMode\r" +expect { + timeout { exit 1 } + "474 nick #MultiMode" +} + +send "OPer TestOp 123\r" +expect { + timeout { exit 1 } + "381" +} + +send "Mode #MultiMode -b nick!~user\r" +expect { + timeout { exit 1 } + "MODE #MultiMode -b nick!~user@*" +} + +send "jOiN #MULTIMODE\r" +expect { + timeout { exit 1 } + "@* JOIN :#MULTIMODE" +} +expect { + timeout { exit 1 } + "366" +} +send "ModE #MULTImode\r" +expect { + timeout { exit 1 } + "324 nick #MultiMode +Pnt" +} +send "mODe #multimode +b\r" +expect { + timeout { exit 1 } + "367 nick #MultiMode banned!~ghost@example.com ngircd.test.server" +} +expect { + timeout { exit 1 } + "368 nick #MultiMode" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/kick-test.e b/deprecated-ngircd/src/testsuite/kick-test.e new file mode 100644 index 0000000..a803879 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/kick-test.e @@ -0,0 +1,113 @@ +# ngIRCd test suite +# KICK test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick nick\r" +send "user user . . :User\r" +expect { + timeout { exit 1 } + "376" +} + +send "kick #Channel nick\r" +expect { + timeout { exit 1 } + "403" +} + +send "join #Channel\r" + +send "kick #Channel nick\r" +expect { + timeout { exit 1 } + "@* KICK #Channel nick :nick" +} + +send "join #Channel\r" + +send "kick #Channel nick :reason\r" +expect { + timeout { exit 1 } + "@* KICK #Channel nick :reason" +} + +send "join #Channel,#Channel2\r" + +send "kick #Channel,#Channel2 nick\r" +expect { + timeout { exit 1 } + "461" +} + +send "kick #Channel,#Channel2,#NoExists,#NoExists nick1,nick,nick3,nick :reason\r" +expect { + timeout { exit 1 } + "401" +} +expect { + timeout { exit 1 } + "@* KICK #Channel2 nick :reason" +} +expect { + timeout { exit 1 } + "401" +} +expect { + timeout { exit 1 } + "403" +} + +send "kick #Channel nick2,nick,nick3\r" +expect { + timeout { exit 1 } + "401" +} +expect { + timeout { exit 1 } + "@* KICK #Channel nick :nick" +} +expect { + timeout { exit 1 } + "401" +} + +send "kick #Channel ,,\r" +expect { + timeout { exit 1 } + "401" +} +expect { + timeout { exit 1 } + "401" +} + +send "kick ,, ,,,\r" +expect { + timeout { exit 1 } + "461" +} + +send "kick ,, ,,\r" +expect { + timeout { exit 1 } + "401" +} +expect { + timeout { exit 1 } + "401" +} +expect { + timeout { exit 1 } + "401" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/message-test.e b/deprecated-ngircd/src/testsuite/message-test.e new file mode 100644 index 0000000..28d4a93 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/message-test.e @@ -0,0 +1,152 @@ +# ngIRCd test suite +# PRIVMSG and NOTICE test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick nick\r" +send "user user . . :User\r" +expect { + timeout { exit 1 } + "376" +} + +send "privmsg nick :test\r" +expect { + timeout { exit 1 } + "@* PRIVMSG nick :test" +} + +send "privmsg nick\r" +expect { + timeout { exit 1 } + "412" +} + +send "privmsg\r" +expect { + timeout { exit 1 } + "411" +} + +send "privmsg nick,nick :test\r" +expect { + timeout { exit 1 } + "@* PRIVMSG nick :test" +} + +send "privmsg ,,,, :dummy\r" +send "privmsg ,,,nick,,&server,,, :test\r" +expect { + timeout { exit 1 } + "@* PRIVMSG nick :test" +} +expect { + timeout { exit 1 } + "404" +} + +send "privmsg Nick,#testChannel,nick :test\r" +expect { + timeout { exit 1 } + "@* PRIVMSG nick :test\r*401" +} + +send "privmsg doesnotexist :test\r" +expect { + timeout { exit 1 } + "401" +} + +send "privmsg ~UsEr@ngIRCd.Test.Server :test\r" +expect { + timeout { exit 1 } + "@* PRIVMSG nick :test" +} + +send "mode nick +b\r" +expect { + timeout { exit 1 } + "MODE nick :+b" +} +send "privmsg nick :test\r" +expect { + timeout { exit 1 } + "486" +} +send "mode nick -b\r" +expect { + timeout { exit 1 } + "MODE nick :-b" +} + +send "privmsg ~user\%127.0.0.1 :test\r" +expect { + timeout { exit 1 } + "@* PRIVMSG nick :test" +} + +send "privmsg Nick!~User@127.0.0.1 :test\r" +expect { + timeout { exit 1 } + "@* PRIVMSG nick :test" +} + +send "away :away\r" +expect { + timeout { exit 1 } + "306" +} + +send "privmsg nick :test\r" +expect { + timeout { exit 1 } + "301" +} + +send "away\r" +expect { + timeout { exit 1 } + "305" +} + +send "privmsg \$ngircd.test.server :test\r" +expect { + timeout { exit 1 } + "481" +} + +send "privmsg #*.de :test\r" +expect { + timeout { exit 1 } + "481" +} + +send "oper TestOp 123\r" + +send "privmsg \$ngircd.test.server :test\r" +expect { + timeout { exit 1 } + "@* PRIVMSG nick :test" +} + +send "privmsg \$*.test*.server :test\r" +expect { + timeout { exit 1 } + "@* PRIVMSG nick :test" +} + +send "privmsg \$noDotServer :test\r" +expect { + timeout { exit 1 } + "401" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/misc-test.e b/deprecated-ngircd/src/testsuite/misc-test.e new file mode 100644 index 0000000..8896624 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/misc-test.e @@ -0,0 +1,164 @@ +# ngIRCd test suite +# Misc test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick nick\r" +send "user user . . :User\r" +expect { + timeout { exit 1 } + "376" +} + +# RFC 2812 Section 3.4.1 + +send "motd\r" +expect { + timeout { exit 1 } + "375" +} +expect { + timeout { exit 1 } + "372" +} +expect { + timeout { exit 1 } + "376" +} + +send "motd ngircd.test.server\r" +expect { + timeout { exit 1 } + "375" +} +expect { + timeout { exit 1 } + "372" +} +expect { + timeout { exit 1 } + "376" +} + +send "motd doesnotexist\r" +expect { + timeout { exit 1 } + "402" +# note this is not specified in RFC 2812, but probably should be +} + +# RFC 2812 Section 3.4.3 + +send "version\r" +expect { + timeout { exit 1 } + "351" +} + +send "version ngircd.test.server\r" +expect { + timeout { exit 1 } + "351" +} + +send "version doesnotexist\r" +expect { + timeout { exit 1 } + "402" +} + +# RFC 2812 Section 3.4.6 + +send "time\r" +expect { + timeout { exit 1 } + "391" +} + +send "time ngircd.test.server\r" +expect { + timeout { exit 1 } + "391" +} + +send "time doesnotexist\r" +expect { + timeout { exit 1 } + "402" +} + +# RFC 2812 Section 3.4.10 + +send "info\r" +expect { + timeout { exit 1 } + "371" +} +expect { + timeout { exit 1 } + "374" +} + +# RFC 2812 Section 4.5 + +send "summon\r" +expect { + timeout { exit 1 } + "445" +} + +# RFC 2812 Section 4.6 + +send "users\r" +expect { + timeout { exit 1 } + "446" +} + +# RFC 2812 Section 4.8 + +send "userhost\r" +expect { + timeout { exit 1 } + "461" +} + +send "userhost nick\r" +expect { + timeout { exit 1 } + -re ":ngircd.test.server 302 nick :?nick=+.*@127.0.0.1" +} + +send "userhost doesnotexist\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 302 nick :\r" +} + +send "userhost nick doesnotexist nick doesnotexist\r" +expect { + timeout { exit 1 } + -re ":ngircd.test.server 302 nick :nick=+.*@127.0.0.1 nick=+.*@127.0.0.1" +} + +send "away :testing\r" +expect { + timeout { exit 1 } + "306 nick" +} + +send "userhost nick nick nick nick nick nick\r" +expect { + timeout { exit 1 } + -re ":ngircd.test.server 302 nick :nick=-.*@127.0.0.1 nick=-.*@127.0.0.1 nick=-.*@127.0.0.1 nick=-.*@127.0.0.1 nick=-.*@127.0.0.1\r" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/mode-test.e b/deprecated-ngircd/src/testsuite/mode-test.e new file mode 100644 index 0000000..668e57c --- /dev/null +++ b/deprecated-ngircd/src/testsuite/mode-test.e @@ -0,0 +1,175 @@ +# ngIRCd test suite +# MODE test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick nick\r" +send "user user . . :User\r" +expect { + timeout { exit 1 } + "376" +} + +send "mode nick +i\r" +expect { + timeout { exit 1 } + "@* MODE nick :+i" +} + +send "mode nick\r" +expect { + timeout { exit 1 } + "221 nick +i" +} + +send "mode nick -i\r" +expect { + timeout { exit 1 } + "@* MODE nick :-i" +} + +send "join #usermode\r" +expect { + timeout { exit 1 } + "@* JOIN :#usermode" +} +expect { + timeout { exit 1 } + "366" +} + +send "mode #usermode +v nick\r" +expect { + timeout { exit 1 } + "@* MODE #usermode +v nick\r" +} + +send "mode #usermode +h nick\r" +expect { + timeout { exit 1 } + "@* MODE #usermode +h nick\r" +} + +send "mode #usermode +a nick\r" +expect { + timeout { exit 1 } + "482 nick" +} + +send "mode #usermode +q nick\r" +expect { + timeout { exit 1 } + "482 nick" +} + +send "mode #usermode -vho nick nick nick\r" +expect { + timeout { exit 1 } + "@* MODE #usermode -vho nick nick nick" +} + +send "oper TestOp 123\r" +expect { + timeout { exit 1 } + "MODE nick :+o" +} +expect { + timeout { exit 1 } + "381 nick" +} + +send "mode nick\r" +expect { + timeout { exit 1 } + "221 nick +o" +} + +send "mode #usermode +a nick\r" +expect { + timeout { exit 1 } + "@* MODE #usermode +a nick" +} + +send "mode #usermode +q nick\r" +expect { + timeout { exit 1 } + "@* MODE #usermode +q nick" +} + +send "names #usermode\r" +expect { + timeout { exit 1 } + "353 nick = #usermode :~nick" +} +expect { + timeout { exit 1 } + "366 nick #usermode" +} + +send "part #usermode\r" +expect { + timeout { exit 1 } + "@* PART #usermode" +} + +send "join #channel\r" +expect { + timeout { exit 1 } + "@* JOIN :#channel" +} +expect { + timeout { exit 1 } + "366" +} + +send "mode #channel +tn\r" +expect { + timeout { exit 1 } + "@* MODE #channel +tn" +} + +send "mode #channel\r" +expect { + timeout { exit 1 } + "324 nick #channel +tn" +} + +send "mode #channel +v nick\r" +expect { + timeout { exit 1 } + "@* MODE #channel +v nick\r" +} + +send "mode #channel +I nick1\r" +expect { + timeout { exit 1 } + "@* MODE #channel +I nick1!*@*" +} + +send "mode #channel +b nick2@domain\r" +expect { + timeout { exit 1 } + "@* MODE #channel +b nick2!*@domain" +} + +send "mode #channel +I nick3!user\r" +expect { + timeout { exit 1 } + "@* MODE #channel +I nick3!user@*" +} + +send "mode #channel -vo nick nick\r" +expect { + timeout { exit 1 } + "@* MODE #channel -vo nick nick\r" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/ngircd-test1.conf b/deprecated-ngircd/src/testsuite/ngircd-test1.conf new file mode 100644 index 0000000..233238a --- /dev/null +++ b/deprecated-ngircd/src/testsuite/ngircd-test1.conf @@ -0,0 +1,72 @@ +# ngIRCd test suite +# configuration file for test server #1 + +[Global] + Name = ngircd.test.server + Info = ngIRCd Test-Server 1 + Listen = 127.0.0.1 + Ports = 6789 + MotdFile = ngircd-test1.motd + AdminEMail = admin@irc.server + +[Limits] + MaxConnectionsIP = 0 + MaxJoins = 4 + MaxPenaltyTime = 1 + +[Options] + OperCanUseMode = yes + Ident = no + IncludeDir = /var/empty + DNS = no + PAM = no + +[Operator] + Name = TestOp + Password = 123 + +[Server] + Name = ngircd.test.server2 + MyPassword = pwd1 + PeerPassword = pwd2 + +[Server] + Name = ngircd.test.server3 + MyPassword = pwd1 + PeerPassword = pwd3 + +[Channel] + Name = InviteChannel + Modes = i + +[Channel] + Name = #FullKeyed + Modes = lk + MaxUsers = 0 + Key = Secret + +[Channel] + Name = #TopicChannel + Modes = t + Topic = the topic + +[Channel] + Name = #SecretChannel + Modes = s + Topic = A secret Channel + +[Channel] + Name = &LocalChannel + Topic = A local Channel + +[Channel] + Name = +ModelessChannel + Topic = A modeless Channel + +[Channel] + Name = MultiMode + Modes = +n +b nick!~user + Modes = +t + Modes = +b banned!~ghost@example.com + +# -eof- diff --git a/deprecated-ngircd/src/testsuite/ngircd-test2.conf b/deprecated-ngircd/src/testsuite/ngircd-test2.conf new file mode 100644 index 0000000..40d881d --- /dev/null +++ b/deprecated-ngircd/src/testsuite/ngircd-test2.conf @@ -0,0 +1,35 @@ +# ngIRCd test suite +# configuration file for test server #2 + +[Global] + Name = ngircd.test.server2 + Info = ngIRCd Test-Server 2 + Listen = 127.0.0.1 + Ports = 6790 + MotdFile = ngircd-test2.motd + AdminEMail = admin@irc.server2 + +[Limits] + MaxConnectionsIP = 0 + MaxJoins = 4 + MaxPenaltyTime = 1 + +[Options] + OperCanUseMode = yes + Ident = no + IncludeDir = /var/empty + DNS = no + PAM = no + +[Operator] + Name = TestOp + Password = 123 + +[Server] + Name = ngircd.test.server + Host = 127.0.0.1 + Port = 6789 + MyPassword = pwd2 + PeerPassword = pwd1 + +# -eof- diff --git a/deprecated-ngircd/src/testsuite/ngircd-test3.conf b/deprecated-ngircd/src/testsuite/ngircd-test3.conf new file mode 100644 index 0000000..1117e37 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/ngircd-test3.conf @@ -0,0 +1,31 @@ +# ngIRCd test suite +# configuration file for test server #1 + +[Global] + Name = ngircd.test.server + Info = ngIRCd Test-Server 3 + Listen = 127.0.0.1 + Ports = 6789 + MotdFile = ngircd-test3.motd + AdminEMail = admin@irc.server + +[SSL] + CertFile = ssl/cert.pem + KeyFile = ssl/key.pem + DHFile = ssl/dhparams.pem + Ports = 6790 + + +[Limits] + MaxConnectionsIP = 0 + MaxJoins = 4 + MaxPenaltyTime = 1 + +[Options] + OperCanUseMode = yes + Ident = no + IncludeDir = /var/empty + DNS = no + PAM = no + +# -eof- diff --git a/deprecated-ngircd/src/testsuite/opless-channel-test.e b/deprecated-ngircd/src/testsuite/opless-channel-test.e new file mode 100644 index 0000000..cd4f9a0 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/opless-channel-test.e @@ -0,0 +1,33 @@ +# ngIRCd test suite +# Op-less channel test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick nick\r" +send "user user . . :User\r" +expect { + timeout { exit 1 } + "376" +} + +send "JOIN +Channel\r" +expect { + timeout { exit 1 } + "@* JOIN :+Channel" +} + +send "mode +Channel +t\r" +expect { + timeout { exit 1 } + "477" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/prep-server3 b/deprecated-ngircd/src/testsuite/prep-server3 new file mode 100755 index 0000000..c76b250 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/prep-server3 @@ -0,0 +1,7 @@ +#!/bin/sh -e +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -eu +mkdir -p ssl +cp "${srcdir}"/ssl/cert-my-first-domain-tld.pem ssl/cert.pem +cp "${srcdir}"/ssl/key-my-first-domain-tld.pem ssl/key.pem +cp "${srcdir}"/ssl/dhparams-my-first-domain-tld.pem ssl/dhparams.pem diff --git a/deprecated-ngircd/src/testsuite/reload-server.sh b/deprecated-ngircd/src/testsuite/reload-server.sh new file mode 100755 index 0000000..8d6fd2b --- /dev/null +++ b/deprecated-ngircd/src/testsuite/reload-server.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# ngIRCd Test Suite + +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u + +# read in functions +. "${srcdir}/functions.inc" + +if [ -n "$1" ]; then + id="$1"; shift +else + id="1" +fi + +echo_n "reloading server ${id} ..." + +# reload (sighup) test-server ... +pid=`./getpid.sh T-ngircd${id}` +if [ -z "$pid" ]; then + echo " failure: no running server found!?" + exit 1 +fi +kill -HUP $pid >/dev/null 2>&1; r=$? +if [ $r -eq 0 ]; then + sleep 2 + echo " ok". + kill -0 $pid && exit 0 +fi +echo " failure: server ${id} could not be reloaded!" +exit 1 diff --git a/deprecated-ngircd/src/testsuite/reload-server3 b/deprecated-ngircd/src/testsuite/reload-server3 new file mode 100755 index 0000000..da7b37e --- /dev/null +++ b/deprecated-ngircd/src/testsuite/reload-server3 @@ -0,0 +1,7 @@ +#!/bin/sh +# ngIRCd Test Suite + +[ -z "$srcdir" ] && srcdir=`dirname $0` +${srcdir}/reload-server.sh 3 + +# -eof- diff --git a/deprecated-ngircd/src/testsuite/server-link-test.e b/deprecated-ngircd/src/testsuite/server-link-test.e new file mode 100644 index 0000000..48230af --- /dev/null +++ b/deprecated-ngircd/src/testsuite/server-link-test.e @@ -0,0 +1,50 @@ +# ngIRCd test suite +# server-server link test + +spawn telnet 127.0.0.1 6790 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick nick\r" +send "user user . . :User\r" +expect { + timeout { exit 1 } + "376" +} + +send "version ngircd.test.server2\r" +expect { + timeout { exit 1 } + ":ngircd.test.server2 351" +} +send "version ngircd.test.server\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 351" +} + +send "whois ngircd.test.server nick\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 318" +} + +send "admin ngircd.test.server\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 259 nick :admin@irc.server" +} + +send "links\r" +expect { + timeout { exit 1 } + "364 nick ngircd.test.server ngircd.test.server2 :1" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/server-login-test.e b/deprecated-ngircd/src/testsuite/server-login-test.e new file mode 100644 index 0000000..bdf95e0 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/server-login-test.e @@ -0,0 +1,94 @@ +# ngIRCd test suite +# server-server login test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +# Register server +send "PASS pwd1 0210-IRC+ ngIRCd|testsuite0:CHLMSX P\r" +send "SERVER ngircd.test.server3 :Testsuite Server Emulation\r" +expect { + timeout { exit 1 } + ":ngircd.test.server PASS pwd3 0210-IRC+ ngIRCd|" +} +expect { + timeout { exit 1 } + ":ngircd.test.server SERVER ngircd.test.server 1 :" +} +expect { + timeout { exit 1 } + ":ngircd.test.server 005 " +} +expect { + timeout { exit 1 } + ":ngircd.test.server 376 " +} + +# End of handshake +send ":ngircd.test.server3 376 ngircd.test.server :End of MOTD command\r" + +# Receive existing channels +expect { + timeout { exit 1 } + ":ngircd.test.server CHANINFO +ModelessChannel +P :A modeless Channel" +} +expect { + timeout { exit 1 } + ":ngircd.test.server CHANINFO #SecretChannel +Ps :A secret Channel" +} +expect { + timeout { exit 1 } + ":ngircd.test.server CHANINFO #TopicChannel +Pt :the topic" +} +expect { + timeout { exit 1 } + ":ngircd.test.server CHANINFO #FullKeyed +Pkl Secret 0 :" +} +expect { + timeout { exit 1 } + ":ngircd.test.server CHANINFO #InviteChannel +Pi" +} +expect { + timeout { exit 1 } + ":ngircd.test.server PING :ngircd.test.server" +} + +# Emulate network burst +send ":ngircd.test.server3 NICK NickName 1 ~User localhost 1 + :Real Name\r" +send ":ngircd.test.server3 NJOIN #Channel :@NickName\r" + +# End of burst +send ":ngircd.test.server3 PONG :ngircd.test.server\r" + +# Test server-server link ... +send ":ngircd.test.server3 VERSION\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 351 ngircd.test.server3 " +} + +# Make sure our test client is still known in the network +send ":ngircd.test.server3 WHOIS NickName\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 311 ngircd.test.server3 NickName ~User localhost * :Real Name" +} +expect { + timeout { exit 1 } + ":ngircd.test.server 319 ngircd.test.server3 NickName :@#Channel" +} + +expect { + timeout { exit 1 } + ":ngircd.test.server 318 ngircd.test.server3 NickName :" +} + +# Logout +send ":ngircd.test.server3 QUIT\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/ssl/cert-my-first-domain-tld.pem b/deprecated-ngircd/src/testsuite/ssl/cert-my-first-domain-tld.pem new file mode 100644 index 0000000..1b3961d --- /dev/null +++ b/deprecated-ngircd/src/testsuite/ssl/cert-my-first-domain-tld.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEDDCCAnSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAeMRwwGgYDVQQDExNteS5m +aXJzdC5kb21haW4udGxkMB4XDTIwMDQyNDA4MjQyNVoXDTQ3MDkxMDA4MjQyNVow +HjEcMBoGA1UEAxMTbXkuZmlyc3QuZG9tYWluLnRsZDCCAaIwDQYJKoZIhvcNAQEB +BQADggGPADCCAYoCggGBAJ3HvAIDQxL/o7yoemMH5OZEXyFTQ/Q838UY0lXbWBb0 +Lsz9ft0UFtu/SSabHLLJHQME99IyleYiMwi0Y3oqDCVZp6eqeKS7MTRIot2D1m4T +QsK13dAvZOaEYPsltdsFDCP75s07tDp9aYYsHDsNhHu8LxUachmb3747/v1E1TGZ +T5BSnzGxEsQo1vzKKMpMbjct1d3zdQRB1o/r6BlaPykTAaB1DkM7GOOdtprhO/Sh +PbfXL+BHgldPbxboul7NTt1r2CfqFmz4Pi4PbCruv0HVG8N8egN6Jb80UuwOiCcM +BxY9uhCh6ZPoZ9ufmGALhkgD0rlt/sQfKQ0EImzx8cC/6zvSfJQ0WazLp/wCImkP +QZwKm/U6RMHWtthHg4pJRsYF5rL2+YMqebTcG655+fgQm9EI+ZcAqWIbnogGA046 +oS1X7805ogBo7OPMlJ19NjxOc3yS9dXlk6hEe0AKSCCusy4lI4gcGd2gwmAtXp3i +ZVkFBsUsmBe3x5sEAEVVyQIDAQABo1UwUzAMBgNVHRMBAf8EAjAAMBMGA1UdJQQM +MAoGCCsGAQUFBwMBMA8GA1UdDwEB/wQFAwMHoAAwHQYDVR0OBBYEFFst+QAEUdCP +V80/hmOEBKtjOMRLMA0GCSqGSIb3DQEBCwUAA4IBgQCOEIJgi0H1lc33dU8Na4// +CI3rOOYwFnSiiUe8A5n38LsU2ZrwwJmn60JgNdAmrNkXTI8qNTuTU6XIOAqq32FY +wdNqPt7wE7UDRMQeMDlLNo+lnuI1XrBxk9mEpfmyGeGqeIDIr5vlEWs4Snr73RC0 +iQBUD6qGdhZa/ABm342psSA4OxtjCn6mBBT/gSi8yCO0Po8yFvndGMe3kNQFwir4 +supxptzqFDCDOQOYSgUy2QT7wlFAqPdZWMSepdeoaBYrqBsvf9shWC0iChKJxnCp +SVZpoPysxuVyQMKjjzTJcNDwydMyIny4Z9rt+kkvgn/JDxIQe1+jJ8dJR+VWQeNe +we604uEsN0hWq1FkkMO8NQdbM4xipDciEanHunWvwFkXuIuc0aEpqIchU32O2wav +ck8ytssLLQDGaJLHx6iOB2MCi8HbS8U9xfrg8JJIFnxmnkKdI6x2akzYm+nqDxqQ +dGeoVJgegiamYlydkGskw04oGkD16H0LQwlzsDwgvP8= +-----END CERTIFICATE----- diff --git a/deprecated-ngircd/src/testsuite/ssl/cert-my-second-domain-tld.pem b/deprecated-ngircd/src/testsuite/ssl/cert-my-second-domain-tld.pem new file mode 100644 index 0000000..f8d8985 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/ssl/cert-my-second-domain-tld.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEDjCCAnagAwIBAgIBATANBgkqhkiG9w0BAQsFADAfMR0wGwYDVQQDExRteS5z +ZWNvbmQuZG9tYWluLnRsZDAeFw0yMDA0MjQwODIzNDBaFw00NzA5MTAwODIzNDBa +MB8xHTAbBgNVBAMTFG15LnNlY29uZC5kb21haW4udGxkMIIBojANBgkqhkiG9w0B +AQEFAAOCAY8AMIIBigKCAYEA4+442scsdqSf6O4UO/RskMzOX8BhDcSwrhGe97jd +CuQKUqS6OT1UoHK0DdMkxHlOMhifPzKxoBQlI/02l14tV//xNArKj4a+BZzNS1mp +3adjgTc3uRDQHmHVZUzH4VXhL2zZ1EXVaJULZVWJYAqMW8GOObs+Kwijo+zxBGRs +96Re9sg3XMkCUN+ZMoCpqoU4R/QiJ5z7B4AXS9CVcvczQKiULn1otP+UQQ4ABHlN +t8pZzR6P/WGy91PvGt5wWfpReGveP/Zl2tksVXXs0CQgteneblYVzj01MaobVW59 +/LGUpe0oQy2rtzQVX3DZkDoGwGh4lof2Af+xMjCbVL6oDbPPooXG8TJnDP3AVhMG +KIb+EhBUIEJnd/z6ZXTWbv0KQOt4wiVBzuXVBf7xxn/aH4+3kyrnj7CsUHXM4++x +KRZq7gaP7nRbN22rw+WCHnqvMfAGnS7/6AjKFUWxmNWxRXMX+ehsSbT/XQnQm88e +oUBLzQc4JrNSPklVJ82Qp19tAgMBAAGjVTBTMAwGA1UdEwEB/wQCMAAwEwYDVR0l +BAwwCgYIKwYBBQUHAwEwDwYDVR0PAQH/BAUDAwegADAdBgNVHQ4EFgQUdnjZogYk +7JK21Fj2NfYwrtJzK1EwDQYJKoZIhvcNAQELBQADggGBABDreWdgeyLMvqv1fO1f +zbkSxUp57XoQsX3G/1nUfjT2Zujxwvu8D9N74R3I/BsxVTiI4RL2LZj33q+eq0KX +LG/zBH2DEBheMmQtbMS6Ah+MTSlvG8SDlRRYPEVdYYtXOwskGNyIwcqNTr0j2Mrn +Zlre0VJQc5r94seoVCjCseio26I9qf0LW2QsGfk4vSMJlhTRkcbBjKABG8xGXv61 ++Hd4OFA0e/gOzFZFwDxWEsks5d8w6kzyipdGcCezBhlDi/qNCAex1GVTdUsCbGNS +9N2i1Cty01AJbrkfWwKCc/Xg/YV/9PVncoiwJSIILllmFvLPu0vRof8AX/4DxEkS +YFnN2x+qyukW+DfSnC3YSqyKdKtvB0U0Xf4tcHQfX2kHS/PqOIR6F9trY45ZlXoA +nQKf1vcsIJzHW1mi9SvyVgyp3HftPw5xIU15mHRHBfBEzkVNwZJxyCl6nd++4vMS +DmzpJPCT/a8rl1Jj5yyQ5zJp06Z7FbPpkT9kiAB5+U/vKw== +-----END CERTIFICATE----- diff --git a/deprecated-ngircd/src/testsuite/ssl/dhparams-my-first-domain-tld.pem b/deprecated-ngircd/src/testsuite/ssl/dhparams-my-first-domain-tld.pem new file mode 100644 index 0000000..011750b --- /dev/null +++ b/deprecated-ngircd/src/testsuite/ssl/dhparams-my-first-domain-tld.pem @@ -0,0 +1,77 @@ + +Recommended key length: 256 bits + +generator: + 39:76:54:fb:49:4c:58:2c:f6:62:3a:81:d1:1e:ef:55 + 97:da:5a:9c:f8:11:e4:23:26:91:e2:d4:14:94:14:e1 + d2:82:69:b6:f0:2e:af:08:cc:bc:21:0d:e5:a7:40:f9 + 8d:18:a2:52:6a:41:de:57:c7:17:0d:23:b9:36:3c:33 + ef:ff:0b:85:b1:a9:59:65:49:46:36:3b:57:e4:b7:91 + 4b:6c:56:1a:47:44:d8:5b:8a:bd:93:93:41:81:01:9d + 31:8d:3d:b8:a6:6c:7e:48:aa:86:b6:68:eb:66:0b:f3 + 42:58:c5:ef:65:75:9d:8d:0f:18:21:25:86:40:a6:fd + 23:15:58:82:57:df:b6:0d:e5:c9:f1:85:ef:ec:ae:4a + b4:1b:70:ac:f5:c8:75:57:d6:4b:17:ca:f1:a1:45:13 + c0:e7:2b:b9:26:92:c0:a1:c4:ba:87:4e:b7:37:2f:6c + 02:51:86:95:2d:f3:c1:7e:c1:f7:00:52:00:0d:43:f2 + aa:8d:af:f6:5a:4f:a8:65:a5:26:af:58:fa:5d:fb:77 + 42:e2:1e:19:f5:0f:8a:f2:9b:6b:9a:c0:2c:60:4f:45 + da:9c:54:97:67:6a:e3:62:b9:c1:a0:3d:bf:cb:aa:22 + 23:3b:08:bc:29:6a:a5:91:5e:76:1b:60:1d:c2:02:85 + 2e:c6:85:20:5a:6e:0b:84:e3:e3:88:4e:c5:48:f3:c8 + c1:71:b0:22:22:70:00:27:99:c6:dc:50:62:2d:be:55 + 65:af:60:d7:43:44:2f:97:72:a2:66:48:fa:ee:af:7a + 81:cc:77:97:95:61:74:37:44:f2:b9:8e:9a:90:e4:45 + 89:69:66:fe:52:fe:82:d2:de:4c:11:64:a2:c3:6e:00 + e4:a7:58:4f:e9:61:0d:d2:72:a1:fb:72:89:84:73:64 + de:1a:2c:0f:7e:46:5f:73:f6:67:3f:14:86:1c:90:bf + 49:d6:d1:3c:6a:6a:8b:42:29:22:02:47:c4:b9:bb:64 + + +prime: + 90:cb:d2:ec:9f:0c:6c:69:f5:c0:46:e1:9c:fc:4d:3b + ff:65:40:32:66:d5:fa:e0:ee:88:7d:35:ad:5e:1a:37 + 07:db:c0:ed:a4:b2:94:ed:41:b4:be:be:35:e3:36:ff + 04:c2:48:4d:f0:e9:d2:54:54:de:10:4b:1c:6b:0e:e6 + 8f:c1:8a:9f:9d:e2:f0:9e:35:52:b7:2a:29:5e:e1:95 + c0:e0:6e:2b:a9:eb:00:fb:fe:90:d9:aa:02:2d:52:e5 + 09:fe:5a:e9:5e:73:e1:94:d1:a5:a1:f5:3b:97:e8:53 + 67:ea:86:a7:f2:70:5c:31:7f:ed:23:f1:ce:01:62:e5 + 0c:7b:7c:18:67:ec:42:35:e8:d1:3d:e1:74:f9:77:02 + fb:8d:24:a7:bf:3a:38:36:cf:82:9e:90:b2:7c:c3:f3 + d3:e4:f1:55:ca:4b:1e:5e:50:b9:3b:d8:6a:6c:c2:51 + a9:a7:e2:86:02:ef:7b:c2:d1:80:e2:dd:e0:7c:e2:03 + e5:b1:e9:5b:45:c7:56:bb:37:56:9a:4a:0e:7e:b6:f6 + a5:95:ef:93:5f:f9:38:16:e3:73:b5:68:a7:98:15:a2 + 6c:ff:6b:2e:89:f7:9f:f8:a9:d7:ce:a4:9a:de:cb:42 + 90:40:7b:fe:6c:3a:e0:4c:42:fe:0c:af:4e:7f:37:be + fd:3b:31:17:f6:30:0d:52:a5:ca:19:c3:c6:a4:dc:48 + ec:59:02:6e:5a:80:b8:09:7d:3d:9a:00:32:7a:d7:fe + 84:38:12:22:7f:c6:97:88:91:05:7f:ba:74:2b:8c:36 + a0:e4:d7:1c:22:2f:0b:6a:cb:a8:71:40:d2:b1:ed:9f + 43:79:2f:a6:34:7d:c0:65:c4:04:fa:d4:5c:14:7c:4b + 6f:cb:b2:f8:f0:91:05:33:b7:23:58:e8:4d:ff:3f:ef + a4:f3:17:78:9b:5b:f6:f1:49:82:12:de:5d:f7:1d:47 + 1e:08:7f:ee:2d:10:68:f8:a5:97:03:9d:32:d2:9c:b7 + + + +-----BEGIN DH PARAMETERS----- +MIIDDQKCAYEAkMvS7J8MbGn1wEbhnPxNO/9lQDJm1frg7oh9Na1eGjcH28DtpLKU +7UG0vr414zb/BMJITfDp0lRU3hBLHGsO5o/Bip+d4vCeNVK3Kile4ZXA4G4rqesA ++/6Q2aoCLVLlCf5a6V5z4ZTRpaH1O5foU2fqhqfycFwxf+0j8c4BYuUMe3wYZ+xC +NejRPeF0+XcC+40kp786ODbPgp6QsnzD89Pk8VXKSx5eULk72GpswlGpp+KGAu97 +wtGA4t3gfOID5bHpW0XHVrs3VppKDn629qWV75Nf+TgW43O1aKeYFaJs/2suifef ++KnXzqSa3stCkEB7/mw64ExC/gyvTn83vv07MRf2MA1SpcoZw8ak3EjsWQJuWoC4 +CX09mgAyetf+hDgSIn/Gl4iRBX+6dCuMNqDk1xwiLwtqy6hxQNKx7Z9DeS+mNH3A +ZcQE+tRcFHxLb8uy+PCRBTO3I1joTf8/76TzF3ibW/bxSYIS3l33HUceCH/uLRBo ++KWXA50y0py3AoIBgDl2VPtJTFgs9mI6gdEe71WX2lqc+BHkIyaR4tQUlBTh0oJp +tvAurwjMvCEN5adA+Y0YolJqQd5XxxcNI7k2PDPv/wuFsalZZUlGNjtX5LeRS2xW +GkdE2FuKvZOTQYEBnTGNPbimbH5Iqoa2aOtmC/NCWMXvZXWdjQ8YISWGQKb9IxVY +glfftg3lyfGF7+yuSrQbcKz1yHVX1ksXyvGhRRPA5yu5JpLAocS6h063Ny9sAlGG +lS3zwX7B9wBSAA1D8qqNr/ZaT6hlpSavWPpd+3dC4h4Z9Q+K8ptrmsAsYE9F2pxU +l2dq42K5waA9v8uqIiM7CLwpaqWRXnYbYB3CAoUuxoUgWm4LhOPjiE7FSPPIwXGw +IiJwACeZxtxQYi2+VWWvYNdDRC+XcqJmSPrur3qBzHeXlWF0N0TyuY6akORFiWlm +/lL+gtLeTBFkosNuAOSnWE/pYQ3ScqH7comEc2TeGiwPfkZfc/ZnPxSGHJC/SdbR +PGpqi0IpIgJHxLm7ZAICAQA= +-----END DH PARAMETERS----- diff --git a/deprecated-ngircd/src/testsuite/ssl/dhparams-my-second-domain-tld.pem b/deprecated-ngircd/src/testsuite/ssl/dhparams-my-second-domain-tld.pem new file mode 100644 index 0000000..a158861 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/ssl/dhparams-my-second-domain-tld.pem @@ -0,0 +1,77 @@ + +Recommended key length: 256 bits + +generator: + da:16:f5:61:0c:09:de:cd:9b:be:b8:2b:c9:96:97:1b + fc:29:b2:a5:1b:ee:d3:36:bd:6c:73:7e:1c:2a:35:71 + 26:c6:54:b6:28:24:db:87:9d:fc:9e:26:28:e9:01:b8 + 85:f2:02:9b:6a:c3:f5:3a:85:ae:1d:8c:e9:e8:c4:41 + 3a:78:2f:9e:f0:2a:77:18:99:a6:91:2b:2b:8c:10:98 + 89:04:d9:03:5f:4f:77:d6:27:1d:5e:ee:a2:d0:b1:c8 + a7:64:b4:7a:67:5f:aa:3f:02:b0:d2:f7:cd:4c:7a:9d + 63:57:99:8c:89:17:3f:2d:2d:1d:f5:58:61:49:62:54 + 55:17:be:ea:43:03:44:d7:02:39:67:26:b3:7a:4f:00 + a3:a1:3b:d9:f3:aa:7a:c5:00:46:86:92:e2:2e:d8:09 + ee:ca:97:06:c5:33:e5:99:f3:4c:46:81:50:59:6b:60 + fb:a3:24:2a:f8:8f:e0:fb:a5:c3:9a:7d:f7:f2:d7:30 + e5:1b:fa:15:a0:ca:6d:f5:64:4f:20:a3:fb:f4:31:55 + b5:58:c4:6f:06:7d:5d:36:16:03:31:73:57:6b:39:c6 + 10:21:d9:f0:eb:74:43:2e:b0:da:ee:96:86:6e:0c:b5 + 08:78:af:3d:9b:66:71:bc:05:63:9d:aa:a6:2e:bc:c9 + c0:e4:a4:c6:60:e8:5d:d2:96:55:a3:72:4e:7a:ec:b2 + a8:23:b9:3f:7c:33:5d:f0:5f:29:57:cd:8e:9a:fd:7b + b6:83:7f:56:ba:64:bd:a8:1c:83:7f:ee:04:f1:bb:1f + 70:6d:08:46:a2:95:e6:6e:2a:54:44:d9:af:9d:22:a4 + 50:6d:88:65:de:05:89:99:75:7e:0c:12:d9:25:43:f7 + da:b6:41:f8:60:68:f7:6a:f6:a4:8d:8b:93:82:87:56 + c1:80:4d:e6:66:37:1e:22:5c:86:90:d1:8e:02:3a:18 + 34:84:6a:da:e5:4f:a5:4f:29:78:46:97:71:24:80:92 + + +prime: + f8:98:84:b9:b2:75:39:d5:da:14:fa:4a:03:96:57:78 + 95:4e:8c:ba:c3:89:de:36:2c:4a:2b:0a:31:08:09:89 + bb:f6:00:a1:0b:64:02:52:1e:3f:23:67:df:2c:97:7a + 7a:81:e0:b0:ae:00:bf:a6:8f:02:e1:62:d4:dc:9e:62 + 9a:27:f2:cf:4f:88:73:96:de:8a:61:1c:ac:3f:bb:f3 + 0d:be:5e:07:3b:6f:da:0c:10:03:b5:b2:5a:60:3e:c8 + 6f:aa:2c:3e:92:b9:ec:ee:08:29:90:c3:5e:8e:c1:a4 + a7:1a:ab:87:f8:70:13:e8:b1:2f:b5:79:c1:bb:8f:21 + 76:b4:1f:ba:91:62:f9:d3:3a:d7:c8:23:00:3e:fe:a5 + 49:51:f8:eb:9f:46:e3:7d:1a:d3:54:a1:3a:d1:4b:05 + ec:77:6e:80:dc:1b:22:e1:36:2a:a1:75:20:8c:48:bd + 53:a6:24:c0:b2:47:36:51:0d:69:b3:cc:e6:fe:8c:34 + 0e:1f:16:03:af:81:b7:62:11:a8:82:06:c2:70:00:23 + fe:0e:e0:fa:a1:e7:3d:cc:81:ae:76:f4:3e:66:84:df + 3f:63:ba:4e:aa:21:1d:5c:a2:a2:55:0e:53:31:40:7d + 7a:99:20:77:23:82:0c:a7:b3:1b:dd:13:fc:23:5f:6d + 58:6c:a7:1f:f6:1a:7c:2a:57:31:c1:10:7b:f1:54:a9 + 8c:49:7f:17:14:5f:a4:69:16:11:6c:7d:1d:eb:d4:88 + ab:6b:f8:8d:8b:be:0d:45:c7:7b:04:4f:a3:5f:f4:4f + 83:12:0c:00:73:5d:57:02:0c:95:b6:ce:70:60:52:80 + 05:79:55:ed:99:e3:0c:23:dc:23:cd:9b:d3:a5:8e:4d + 94:c8:61:2d:56:b1:15:19:ca:b2:2c:76:7c:89:04:44 + 18:5c:72:1e:03:9b:e0:dd:69:44:9f:68:0d:c4:2a:34 + 5e:bd:4f:6c:14:41:93:08:0d:4b:4d:de:97:41:9b:8d + + + +-----BEGIN DH PARAMETERS----- +MIIDDgKCAYEA+JiEubJ1OdXaFPpKA5ZXeJVOjLrDid42LEorCjEICYm79gChC2QC +Uh4/I2ffLJd6eoHgsK4Av6aPAuFi1NyeYpon8s9PiHOW3ophHKw/u/MNvl4HO2/a +DBADtbJaYD7Ib6osPpK57O4IKZDDXo7BpKcaq4f4cBPosS+1ecG7jyF2tB+6kWL5 +0zrXyCMAPv6lSVH4659G430a01ShOtFLBex3boDcGyLhNiqhdSCMSL1TpiTAskc2 +UQ1ps8zm/ow0Dh8WA6+Bt2IRqIIGwnAAI/4O4Pqh5z3Mga529D5mhN8/Y7pOqiEd +XKKiVQ5TMUB9epkgdyOCDKezG90T/CNfbVhspx/2GnwqVzHBEHvxVKmMSX8XFF+k +aRYRbH0d69SIq2v4jYu+DUXHewRPo1/0T4MSDABzXVcCDJW2znBgUoAFeVXtmeMM +I9wjzZvTpY5NlMhhLVaxFRnKsix2fIkERBhcch4Dm+DdaUSfaA3EKjRevU9sFEGT +CA1LTd6XQZuNAoIBgQDaFvVhDAnezZu+uCvJlpcb/CmypRvu0za9bHN+HCo1cSbG +VLYoJNuHnfyeJijpAbiF8gKbasP1OoWuHYzp6MRBOngvnvAqdxiZppErK4wQmIkE +2QNfT3fWJx1e7qLQscinZLR6Z1+qPwKw0vfNTHqdY1eZjIkXPy0tHfVYYUliVFUX +vupDA0TXAjlnJrN6TwCjoTvZ86p6xQBGhpLiLtgJ7sqXBsUz5ZnzTEaBUFlrYPuj +JCr4j+D7pcOafffy1zDlG/oVoMpt9WRPIKP79DFVtVjEbwZ9XTYWAzFzV2s5xhAh +2fDrdEMusNruloZuDLUIeK89m2ZxvAVjnaqmLrzJwOSkxmDoXdKWVaNyTnrssqgj +uT98M13wXylXzY6a/Xu2g39WumS9qByDf+4E8bsfcG0IRqKV5m4qVETZr50ipFBt +iGXeBYmZdX4MEtklQ/fatkH4YGj3avakjYuTgodWwYBN5mY3HiJchpDRjgI6GDSE +atrlT6VPKXhGl3EkgJICAgEA +-----END DH PARAMETERS----- diff --git a/deprecated-ngircd/src/testsuite/ssl/key-my-first-domain-tld.pem b/deprecated-ngircd/src/testsuite/ssl/key-my-first-domain-tld.pem new file mode 100644 index 0000000..667ffac --- /dev/null +++ b/deprecated-ngircd/src/testsuite/ssl/key-my-first-domain-tld.pem @@ -0,0 +1,182 @@ +Public Key Info: + Public Key Algorithm: RSA + Key Security Level: High (3072 bits) + +modulus: + 00:9d:c7:bc:02:03:43:12:ff:a3:bc:a8:7a:63:07:e4 + e6:44:5f:21:53:43:f4:3c:df:c5:18:d2:55:db:58:16 + f4:2e:cc:fd:7e:dd:14:16:db:bf:49:26:9b:1c:b2:c9 + 1d:03:04:f7:d2:32:95:e6:22:33:08:b4:63:7a:2a:0c + 25:59:a7:a7:aa:78:a4:bb:31:34:48:a2:dd:83:d6:6e + 13:42:c2:b5:dd:d0:2f:64:e6:84:60:fb:25:b5:db:05 + 0c:23:fb:e6:cd:3b:b4:3a:7d:69:86:2c:1c:3b:0d:84 + 7b:bc:2f:15:1a:72:19:9b:df:be:3b:fe:fd:44:d5:31 + 99:4f:90:52:9f:31:b1:12:c4:28:d6:fc:ca:28:ca:4c + 6e:37:2d:d5:dd:f3:75:04:41:d6:8f:eb:e8:19:5a:3f + 29:13:01:a0:75:0e:43:3b:18:e3:9d:b6:9a:e1:3b:f4 + a1:3d:b7:d7:2f:e0:47:82:57:4f:6f:16:e8:ba:5e:cd + 4e:dd:6b:d8:27:ea:16:6c:f8:3e:2e:0f:6c:2a:ee:bf + 41:d5:1b:c3:7c:7a:03:7a:25:bf:34:52:ec:0e:88:27 + 0c:07:16:3d:ba:10:a1:e9:93:e8:67:db:9f:98:60:0b + 86:48:03:d2:b9:6d:fe:c4:1f:29:0d:04:22:6c:f1:f1 + c0:bf:eb:3b:d2:7c:94:34:59:ac:cb:a7:fc:02:22:69 + 0f:41:9c:0a:9b:f5:3a:44:c1:d6:b6:d8:47:83:8a:49 + 46:c6:05:e6:b2:f6:f9:83:2a:79:b4:dc:1b:ae:79:f9 + f8:10:9b:d1:08:f9:97:00:a9:62:1b:9e:88:06:03:4e + 3a:a1:2d:57:ef:cd:39:a2:00:68:ec:e3:cc:94:9d:7d + 36:3c:4e:73:7c:92:f5:d5:e5:93:a8:44:7b:40:0a:48 + 20:ae:b3:2e:25:23:88:1c:19:dd:a0:c2:60:2d:5e:9d + e2:65:59:05:06:c5:2c:98:17:b7:c7:9b:04:00:45:55 + c9: + +public exponent: + 01:00:01: + +private exponent: + 45:26:8b:e4:c9:ef:34:bd:6b:d2:bc:78:5f:3c:cf:7a + 88:4e:b5:39:5c:18:08:31:fe:9d:21:5a:55:b6:e6:e0 + 80:3e:81:7f:7f:7f:55:81:5b:f5:c0:80:cc:f4:22:a6 + 9f:73:26:f6:2e:0b:7a:80:54:a3:a5:03:d0:3f:eb:70 + d7:39:5e:87:9d:36:7d:80:54:2c:dd:8c:7e:42:95:9d + c5:6d:b6:ed:8f:57:a6:3e:4d:98:7f:9a:08:79:04:5e + 4c:cb:13:5d:b1:a4:0c:da:78:4c:40:ba:e2:ba:ca:ec + bc:0e:5a:8e:6b:a1:83:aa:6d:22:b8:5f:e2:32:19:f9 + da:60:23:85:f7:ee:66:8e:28:64:09:08:c5:15:dc:a7 + 95:71:76:41:3f:79:72:b3:34:49:81:98:08:bc:7f:e0 + 0d:9f:71:e6:bb:a8:85:97:23:f3:34:5b:ef:09:2a:ef + 1c:30:9d:94:33:14:c4:30:65:f5:07:32:5a:b4:40:00 + 77:4e:93:b3:f4:6a:9d:9f:dc:6b:8f:0b:43:81:43:ff + d5:43:a9:93:68:f5:ab:2b:b9:8e:36:7b:13:0e:11:51 + 5f:aa:46:24:a7:3b:19:4d:31:e9:2a:a2:7b:d4:a8:68 + 38:9e:70:dd:68:9a:a0:f8:f3:27:40:b2:24:1b:80:93 + 7e:ae:d1:25:6e:90:7d:7f:52:84:a8:46:1b:54:c9:c7 + 9a:e5:a0:06:94:bd:d4:94:33:c7:25:f4:6c:13:e3:38 + e0:83:97:51:aa:52:25:06:d9:64:b2:dc:79:53:e5:37 + 0e:e4:33:e6:f4:bb:10:1a:66:11:9f:86:69:b0:2f:9c + b4:f8:89:e6:a4:a1:96:5e:14:3d:a4:24:51:21:98:17 + 28:46:79:85:75:e6:f4:79:26:8a:db:18:94:35:07:ab + de:5f:49:e5:88:02:95:13:d6:ac:ca:e6:4d:65:be:8f + a5:f5:27:da:a9:72:b0:d5:6d:9a:4d:45:b6:69:a4:4d + + +prime1: + 00:c2:19:9f:3e:b1:d3:f8:18:d0:79:56:3f:6d:d5:67 + 6b:0b:48:bd:4a:b6:c1:c9:1d:70:b5:ff:73:cf:bc:37 + 09:e9:b0:15:a6:6c:ff:bd:20:c9:ea:67:09:ce:f7:fe + d1:74:c3:d4:4b:87:38:47:9f:7b:b2:77:a3:a2:db:7d + 64:d2:77:dc:50:a3:56:2e:44:2a:1c:90:5d:f2:f9:e8 + 4f:84:43:83:a6:b2:48:c4:dc:26:bd:87:d3:e3:f3:be + 20:cb:7e:ce:ea:b7:93:1f:b9:6b:57:ee:73:d7:d6:08 + 35:b9:10:2f:60:03:e5:68:d5:5d:59:c7:e8:66:7a:51 + 6a:59:75:71:4a:be:1f:83:9c:01:bc:d0:5c:e5:7b:a6 + 5d:7f:f2:4a:e0:a2:31:58:c3:5d:c7:a5:2f:19:1e:10 + 56:c0:fb:83:35:84:c3:d7:ca:f7:3d:9f:1d:95:5e:3f + 7d:d9:9d:ef:15:a2:15:c2:ae:ff:92:74:db:92:ae:21 + 43: + +prime2: + 00:d0:18:f2:f7:da:77:4a:6f:60:a0:93:92:d6:7e:da + bf:86:19:df:70:f5:41:99:eb:13:49:6d:c2:79:7c:51 + 20:4f:b0:10:01:0d:87:17:90:87:78:41:22:95:f1:72 + 2b:78:97:c3:12:6a:ca:49:73:50:68:fa:d7:12:56:5e + d5:bc:3f:eb:e5:ec:55:82:1b:2d:c8:15:da:d4:63:81 + 0e:b3:45:bb:1f:52:9b:b6:3a:96:36:87:79:43:cd:58 + 5d:a4:11:f6:a4:77:5f:9e:df:26:b2:e1:5d:0a:8d:bf + 32:9d:52:1e:9b:21:66:ca:45:23:23:f4:04:71:23:9a + 4b:19:e3:10:ff:12:9c:90:b5:ae:80:3e:0e:a8:67:64 + 61:ff:4e:83:db:ae:34:22:94:58:b9:e1:c3:bf:c5:39 + d2:60:a0:b2:7e:e0:08:92:b7:f2:8c:28:69:2c:9c:97 + 59:b6:55:d9:0a:ff:c3:d3:b4:a6:eb:5a:55:35:59:26 + 03: + +coefficient: + 51:2c:52:fc:45:b3:05:bf:1b:ca:e3:12:a6:b1:20:8a + 52:98:d0:87:84:a0:a5:04:12:19:af:13:4c:8c:3c:d7 + 91:bb:c8:0d:cc:7e:14:89:4c:bf:05:c2:fe:f2:7e:29 + 5c:5a:3e:37:6e:9f:16:66:5f:93:83:87:c8:e9:3c:0e + de:00:44:18:3b:7a:76:d8:fb:32:b2:4b:db:af:c3:11 + 45:3e:55:ae:ac:94:a5:20:ba:11:d5:4f:01:64:a4:c3 + 70:af:4b:e9:23:a1:9e:b8:7a:3f:79:27:e1:2b:ff:a8 + ed:1f:7e:0c:27:11:6e:4d:8c:1f:37:90:a6:98:b9:e3 + 5a:a5:04:65:5e:36:a6:1b:2e:32:f3:14:0f:94:3b:88 + be:94:ee:5d:b0:0b:3f:3e:8b:9b:b6:60:5c:94:5c:88 + 01:54:90:07:8b:69:ab:fe:72:4d:6b:6a:6c:5f:c1:b9 + 5b:52:ef:c6:38:03:06:0c:25:78:73:d1:e1:db:54:46 + + +exp1: + 33:25:37:3d:f8:f3:c6:db:1b:0b:ed:fb:16:c0:f5:d8 + 52:07:df:c1:31:39:0c:fa:91:f9:93:0f:7c:3c:b7:30 + 08:80:da:a3:98:f3:26:6d:de:66:c2:b1:e5:f4:99:13 + ae:35:ef:d9:db:0e:ac:68:cc:da:71:06:10:62:cf:be + e2:6a:ad:06:1e:94:15:ea:e6:41:d2:94:be:f2:b5:11 + 46:e3:d7:6b:f4:6c:92:5b:04:66:4a:c5:3d:ba:bb:6d + be:d1:72:4a:8d:06:da:84:2c:51:e6:46:66:28:42:cf + 8d:2d:43:9e:84:48:4e:00:72:f1:b6:68:79:a0:5f:95 + ab:6e:f3:e4:63:06:c0:d2:39:ee:fb:e4:8e:9f:af:6d + d1:ca:11:8a:f1:92:19:36:99:9e:82:db:4f:3e:09:c6 + 22:61:e3:e8:15:4c:d9:ae:e4:c9:3b:05:3b:97:b3:19 + 41:5f:89:61:64:ed:60:f8:65:e5:bc:9f:23:1e:79:2b + + +exp2: + 5f:18:97:a7:d6:49:1f:55:e8:85:59:0b:08:44:6e:38 + 89:d2:b6:fe:4a:c5:d0:cd:d1:41:84:0c:14:32:50:6c + 80:9e:07:a2:43:89:51:a6:75:91:e9:ca:21:55:76:04 + 11:96:e0:c9:40:cd:f2:64:e5:01:24:68:36:74:0b:e0 + 86:a7:7b:68:d5:e8:79:8d:6c:0d:7c:97:44:e9:b7:e7 + 7c:db:47:d8:d7:8a:5a:eb:49:0b:e0:3a:f5:56:18:a4 + aa:3e:9f:44:a7:5c:a6:20:79:f1:d2:f5:0e:c6:99:f2 + 4a:5c:65:aa:24:c8:71:74:c8:cb:3c:4e:ef:59:02:c0 + 81:32:f7:e8:68:9b:ed:b1:68:ee:27:ed:d0:dd:76:cd + 25:bb:be:9c:1c:6e:ac:c2:b8:0d:31:f3:9f:66:44:b7 + 33:fb:1b:b6:c9:30:81:c3:d7:ee:5e:e5:39:42:d2:13 + 68:34:b0:fb:ca:c7:b5:ae:5f:7d:3c:09:a6:58:77:fb + + + +Public Key PIN: + pin-sha256:nCxZsiBRLBQ0Lz6/eXIc9kEBwXZg06i/XORB+NNXVrE= +Public Key ID: + sha256:9c2c59b220512c14342f3ebf79721cf64101c17660d3a8bf5ce441f8d35756b1 + sha1:5b2df9000451d08f57cd3f86638404ab6338c44b + +-----BEGIN RSA PRIVATE KEY----- +MIIG4gIBAAKCAYEAnce8AgNDEv+jvKh6Ywfk5kRfIVND9DzfxRjSVdtYFvQuzP1+ +3RQW279JJpscsskdAwT30jKV5iIzCLRjeioMJVmnp6p4pLsxNEii3YPWbhNCwrXd +0C9k5oRg+yW12wUMI/vmzTu0On1phiwcOw2Ee7wvFRpyGZvfvjv+/UTVMZlPkFKf +MbESxCjW/MooykxuNy3V3fN1BEHWj+voGVo/KRMBoHUOQzsY4522muE79KE9t9cv +4EeCV09vFui6Xs1O3WvYJ+oWbPg+Lg9sKu6/QdUbw3x6A3olvzRS7A6IJwwHFj26 +EKHpk+hn25+YYAuGSAPSuW3+xB8pDQQibPHxwL/rO9J8lDRZrMun/AIiaQ9BnAqb +9TpEwda22EeDiklGxgXmsvb5gyp5tNwbrnn5+BCb0Qj5lwCpYhueiAYDTjqhLVfv +zTmiAGjs48yUnX02PE5zfJL11eWTqER7QApIIK6zLiUjiBwZ3aDCYC1eneJlWQUG +xSyYF7fHmwQARVXJAgMBAAECggGARSaL5MnvNL1r0rx4XzzPeohOtTlcGAgx/p0h +WlW25uCAPoF/f39VgVv1wIDM9CKmn3Mm9i4LeoBUo6UD0D/rcNc5XoedNn2AVCzd +jH5ClZ3Fbbbtj1emPk2Yf5oIeQReTMsTXbGkDNp4TEC64rrK7LwOWo5roYOqbSK4 +X+IyGfnaYCOF9+5mjihkCQjFFdynlXF2QT95crM0SYGYCLx/4A2fcea7qIWXI/M0 +W+8JKu8cMJ2UMxTEMGX1BzJatEAAd06Ts/RqnZ/ca48LQ4FD/9VDqZNo9asruY42 +exMOEVFfqkYkpzsZTTHpKqJ71KhoOJ5w3WiaoPjzJ0CyJBuAk36u0SVukH1/UoSo +RhtUycea5aAGlL3UlDPHJfRsE+M44IOXUapSJQbZZLLceVPlNw7kM+b0uxAaZhGf +hmmwL5y0+InmpKGWXhQ9pCRRIZgXKEZ5hXXm9HkmitsYlDUHq95fSeWIApUT1qzK +5k1lvo+l9SfaqXKw1W2aTUW2aaRNAoHBAMIZnz6x0/gY0HlWP23VZ2sLSL1KtsHJ +HXC1/3PPvDcJ6bAVpmz/vSDJ6mcJzvf+0XTD1EuHOEefe7J3o6LbfWTSd9xQo1Yu +RCockF3y+ehPhEODprJIxNwmvYfT4/O+IMt+zuq3kx+5a1fuc9fWCDW5EC9gA+Vo +1V1Zx+hmelFqWXVxSr4fg5wBvNBc5XumXX/ySuCiMVjDXcelLxkeEFbA+4M1hMPX +yvc9nx2VXj992Z3vFaIVwq7/knTbkq4hQwKBwQDQGPL32ndKb2Cgk5LWftq/hhnf +cPVBmesTSW3CeXxRIE+wEAENhxeQh3hBIpXxcit4l8MSaspJc1Bo+tcSVl7VvD/r +5exVghstyBXa1GOBDrNFux9Sm7Y6ljaHeUPNWF2kEfakd1+e3yay4V0Kjb8ynVIe +myFmykUjI/QEcSOaSxnjEP8SnJC1roA+DqhnZGH/ToPbrjQilFi54cO/xTnSYKCy +fuAIkrfyjChpLJyXWbZV2Qr/w9O0putaVTVZJgMCgcAzJTc9+PPG2xsL7fsWwPXY +UgffwTE5DPqR+ZMPfDy3MAiA2qOY8yZt3mbCseX0mROuNe/Z2w6saMzacQYQYs++ +4mqtBh6UFermQdKUvvK1EUbj12v0bJJbBGZKxT26u22+0XJKjQbahCxR5kZmKELP +jS1DnoRITgBy8bZoeaBflatu8+RjBsDSOe775I6fr23RyhGK8ZIZNpmegttPPgnG +ImHj6BVM2a7kyTsFO5ezGUFfiWFk7WD4ZeW8nyMeeSsCgcBfGJen1kkfVeiFWQsI +RG44idK2/krF0M3RQYQMFDJQbICeB6JDiVGmdZHpyiFVdgQRluDJQM3yZOUBJGg2 +dAvghqd7aNXoeY1sDXyXROm353zbR9jXilrrSQvgOvVWGKSqPp9Ep1ymIHnx0vUO +xpnySlxlqiTIcXTIyzxO71kCwIEy9+hom+2xaO4n7dDdds0lu76cHG6swrgNMfOf +ZkS3M/sbtskwgcPX7l7lOULSE2g0sPvKx7WuX308CaZYd/sCgcBRLFL8RbMFvxvK +4xKmsSCKUpjQh4SgpQQSGa8TTIw815G7yA3MfhSJTL8Fwv7yfilcWj43bp8WZl+T +g4fI6TwO3gBEGDt6dtj7MrJL26/DEUU+Va6slKUguhHVTwFkpMNwr0vpI6GeuHo/ +eSfhK/+o7R9+DCcRbk2MHzeQppi541qlBGVeNqYbLjLzFA+UO4i+lO5dsAs/Poub +tmBclFyIAVSQB4tpq/5yTWtqbF/BuVtS78Y4AwYMJXhz0eHbVEY= +-----END RSA PRIVATE KEY----- diff --git a/deprecated-ngircd/src/testsuite/ssl/key-my-second-domain-tld.pem b/deprecated-ngircd/src/testsuite/ssl/key-my-second-domain-tld.pem new file mode 100644 index 0000000..8cfe8d0 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/ssl/key-my-second-domain-tld.pem @@ -0,0 +1,182 @@ +Public Key Info: + Public Key Algorithm: RSA + Key Security Level: High (3072 bits) + +modulus: + 00:e3:ee:38:da:c7:2c:76:a4:9f:e8:ee:14:3b:f4:6c + 90:cc:ce:5f:c0:61:0d:c4:b0:ae:11:9e:f7:b8:dd:0a + e4:0a:52:a4:ba:39:3d:54:a0:72:b4:0d:d3:24:c4:79 + 4e:32:18:9f:3f:32:b1:a0:14:25:23:fd:36:97:5e:2d + 57:ff:f1:34:0a:ca:8f:86:be:05:9c:cd:4b:59:a9:dd + a7:63:81:37:37:b9:10:d0:1e:61:d5:65:4c:c7:e1:55 + e1:2f:6c:d9:d4:45:d5:68:95:0b:65:55:89:60:0a:8c + 5b:c1:8e:39:bb:3e:2b:08:a3:a3:ec:f1:04:64:6c:f7 + a4:5e:f6:c8:37:5c:c9:02:50:df:99:32:80:a9:aa:85 + 38:47:f4:22:27:9c:fb:07:80:17:4b:d0:95:72:f7:33 + 40:a8:94:2e:7d:68:b4:ff:94:41:0e:00:04:79:4d:b7 + ca:59:cd:1e:8f:fd:61:b2:f7:53:ef:1a:de:70:59:fa + 51:78:6b:de:3f:f6:65:da:d9:2c:55:75:ec:d0:24:20 + b5:e9:de:6e:56:15:ce:3d:35:31:aa:1b:55:6e:7d:fc + b1:94:a5:ed:28:43:2d:ab:b7:34:15:5f:70:d9:90:3a + 06:c0:68:78:96:87:f6:01:ff:b1:32:30:9b:54:be:a8 + 0d:b3:cf:a2:85:c6:f1:32:67:0c:fd:c0:56:13:06:28 + 86:fe:12:10:54:20:42:67:77:fc:fa:65:74:d6:6e:fd + 0a:40:eb:78:c2:25:41:ce:e5:d5:05:fe:f1:c6:7f:da + 1f:8f:b7:93:2a:e7:8f:b0:ac:50:75:cc:e3:ef:b1:29 + 16:6a:ee:06:8f:ee:74:5b:37:6d:ab:c3:e5:82:1e:7a + af:31:f0:06:9d:2e:ff:e8:08:ca:15:45:b1:98:d5:b1 + 45:73:17:f9:e8:6c:49:b4:ff:5d:09:d0:9b:cf:1e:a1 + 40:4b:cd:07:38:26:b3:52:3e:49:55:27:cd:90:a7:5f + 6d: + +public exponent: + 01:00:01: + +private exponent: + 30:61:85:91:f2:cb:1e:57:ed:55:8d:0b:a0:7a:4e:7d + 21:ec:00:69:1e:70:c4:ba:58:08:87:7c:bf:b1:b3:b9 + 19:f3:d6:e1:6c:7a:f7:36:a3:82:52:98:e9:ea:06:71 + b1:b2:86:42:ec:e8:c5:38:e1:75:55:2f:3c:4c:12:45 + e6:9e:f5:54:01:11:1c:21:c3:a1:37:f6:71:8e:db:ec + c6:f3:4b:9c:39:5d:37:3f:eb:b6:57:2d:48:14:2d:9d + 81:ea:92:06:3b:d8:83:bd:77:50:c8:2a:43:c7:99:69 + 74:99:52:e9:ca:d5:69:9d:0a:93:a5:c9:2f:e3:ed:60 + e7:83:6c:96:4b:cc:a3:00:35:a6:18:11:35:72:6b:9a + b9:b3:39:78:bd:1a:8f:ca:01:a7:e7:1b:81:ee:b4:e3 + 59:a5:32:85:0e:2f:b5:3c:6b:de:a3:e4:4f:37:4e:f6 + d5:be:f3:68:ce:f8:e8:fb:14:c6:e1:26:2c:24:fd:3b + dd:4b:70:c1:20:aa:0b:b5:0d:16:a8:45:4c:97:e9:0b + 08:97:c3:e9:ae:bf:0b:f7:1c:b1:81:63:ea:f4:72:dd + b7:da:5d:ab:21:06:c9:e3:99:3e:6c:c7:15:ca:79:fb + 44:7b:77:06:69:d9:59:a2:3c:b0:96:7b:66:6f:48:0c + 42:87:9c:df:4b:3a:dc:15:1f:48:0a:eb:b0:b1:38:98 + 5b:6d:7f:34:ce:43:60:25:64:7c:8d:c0:d1:69:27:b8 + ac:33:85:be:26:65:98:9f:8a:eb:cf:9a:6b:d7:5b:a3 + 49:60:f9:ff:fb:5f:67:d9:08:20:a1:d8:d0:20:25:d5 + 62:f9:d6:07:82:f6:c6:a6:55:65:71:3f:b8:64:b4:bd + 35:a9:2d:62:6c:cb:2c:e1:96:f0:9e:40:39:03:3b:10 + 38:72:ac:af:6e:0a:ba:ea:f5:c1:c0:c6:86:60:58:a9 + 28:23:6c:dd:8a:f2:84:76:a5:db:ef:f9:29:b9:b4:81 + + +prime1: + 00:f5:32:7d:80:4d:14:b1:3d:a1:ef:1b:7f:22:87:9f + d4:3d:4d:ce:e2:11:96:29:0f:ea:0b:c4:24:9c:9a:fa + 8a:4c:9a:5e:cd:48:aa:ce:6d:c0:fd:d4:53:46:1f:06 + f4:4f:da:2c:e5:f1:cb:19:19:a3:a4:37:11:47:ed:3d + fc:4c:b8:f1:93:b8:d8:f7:6a:dd:5c:bd:51:4d:c6:09 + 27:bc:c9:9a:19:05:0a:e9:00:ec:72:75:7f:89:0d:63 + 65:e2:89:ac:ce:f1:78:20:0a:b8:fd:fd:a5:88:a7:7c + 38:1e:55:7d:16:23:6a:4d:dc:87:56:ef:ff:02:db:bd + 1b:61:60:b5:8f:7a:e1:d1:26:e3:2d:d5:21:bb:03:84 + e2:a8:34:d6:7f:16:61:3c:a2:55:e1:c4:8a:82:61:74 + e0:63:cb:53:fd:6d:6a:0d:f5:b5:55:e0:ef:83:2a:46 + 80:7f:85:57:60:d3:b6:c3:2b:ba:af:88:c8:b8:3c:2c + a1: + +prime2: + 00:ed:f8:fc:68:1c:ae:2e:6d:63:f1:8b:6f:85:5c:5b + ba:3e:68:f9:61:03:44:60:83:90:26:8e:4c:8b:e0:49 + c1:5a:a1:5c:e5:f1:67:43:0b:f6:b5:29:84:40:a8:0f + e8:bf:bf:62:7e:33:ca:86:a2:c4:47:3b:4a:d6:9c:09 + a0:bb:10:00:ec:e6:81:f2:bc:86:3f:58:4d:3a:a4:98 + 94:7e:5d:43:7d:33:3f:53:76:55:d1:73:a4:1f:fb:76 + 75:92:70:8e:82:68:d8:f4:f7:b7:36:fa:3e:cc:a7:7a + fc:a4:7b:8c:72:b4:83:d7:ce:d8:f8:b2:35:ce:36:59 + 7e:95:55:b8:c4:a9:44:26:a1:fe:be:f4:b9:67:bc:12 + c8:e7:c3:0b:8a:51:b6:5c:1b:77:58:1f:53:ac:30:41 + 43:5f:97:a2:fd:70:ac:4a:91:e0:bc:f6:4f:b1:06:47 + 2d:89:77:ae:59:e0:5a:e2:31:c7:d9:a6:10:b8:7e:13 + 4d: + +coefficient: + 2a:54:f9:93:b2:32:7a:c4:b6:41:0e:1a:8a:0e:d9:db + 4b:02:68:8d:15:10:84:42:ba:c9:35:e5:6d:ac:8e:ca + 47:5d:6f:fe:e4:81:c6:ce:ab:7c:b8:5a:59:12:96:a4 + 0b:af:fb:d0:d7:e2:92:60:1b:81:05:4f:43:4c:5c:98 + e1:84:a8:6e:bf:ad:cc:ac:de:26:d5:a8:58:09:45:ec + 38:d8:5d:ec:a7:39:46:88:d1:cc:ea:b9:13:5c:9d:bb + db:69:d0:a7:e4:0e:33:b1:71:eb:13:14:28:72:45:b0 + 71:05:2a:a1:45:26:6c:a1:35:bf:a8:b0:1d:01:80:d9 + af:66:71:3a:f4:e4:3c:fe:e8:68:2b:aa:64:a7:43:f3 + 7f:38:4b:51:a1:ed:73:69:52:30:25:b8:62:5b:c7:cd + 02:f5:6f:4a:21:94:cb:29:44:76:f0:f8:96:50:57:33 + 8c:eb:7b:08:70:fc:bc:fd:69:c1:3a:3a:82:5a:4c:15 + + +exp1: + 71:83:42:5e:97:50:b1:0d:1b:5e:9a:98:2c:e0:24:ba + 18:f7:60:83:80:28:c8:31:b9:e4:60:95:a2:7a:8c:ea + 61:b4:45:97:3b:c0:f7:78:10:14:72:ab:6a:97:0a:9d + 28:2a:95:06:8e:fd:bb:4d:07:59:0a:b5:51:5b:1f:8b + 21:e9:ac:cc:fa:92:57:58:7d:ca:65:4a:b2:7a:af:da + 59:a7:eb:53:11:e6:8f:20:02:56:aa:d6:b4:18:22:a0 + 14:54:30:50:4d:b1:93:03:e3:c8:92:18:84:3f:25:5e + c5:8c:46:30:6d:8c:d5:26:f6:f0:e4:82:66:4c:5c:2b + c4:d5:04:b8:bb:e6:b6:f1:0d:d3:36:0c:3b:8b:d1:85 + 2c:e1:e9:3b:44:9d:17:78:ff:d1:59:2f:d6:54:4f:cb + 61:e7:cb:a6:53:74:f9:a9:7a:9d:9b:58:c6:9c:57:af + 3d:59:f9:ad:b5:d5:b2:5d:18:3c:13:52:f9:17:c2:81 + + +exp2: + 10:56:1e:65:bb:4a:4d:cf:9e:a3:cf:51:a9:93:0c:8c + fd:89:d1:4c:d2:9f:98:0c:90:11:c5:85:05:b9:30:f7 + 00:14:c1:be:db:52:9e:6c:ac:d4:04:f4:9a:47:af:47 + e8:19:e8:56:07:92:28:a9:f5:d5:7a:01:8a:38:0e:05 + 25:b2:54:8d:ee:c9:0e:f3:d8:37:73:05:62:38:38:6d + 41:3b:7f:cd:91:7e:10:69:b8:3c:77:b6:d5:a7:3a:9b + 99:a0:f6:77:87:61:15:78:07:f0:d3:3f:0a:67:98:ee + cd:0f:da:35:69:a4:ff:64:a8:ca:71:d9:75:bd:8f:69 + 3c:31:35:4c:f2:dd:c5:d5:2b:1a:ca:cc:0b:8e:02:b0 + 1e:10:ea:b2:e5:27:22:ad:94:04:cd:a9:bd:d1:56:39 + 9c:cf:59:16:12:ed:10:f5:70:bb:28:21:92:62:7e:f2 + 66:54:7b:f8:99:89:43:ab:ed:2f:48:d2:2f:08:20:a5 + + + +Public Key PIN: + pin-sha256:NiuGB0c98aUqMKk4SVQIIwXNglOf+6m1LuVn6aQ2A1U= +Public Key ID: + sha256:362b8607473df1a52a30a9384954082305cd82539ffba9b52ee567e9a4360355 + sha1:7678d9a20624ec92b6d458f635f630aed2732b51 + +-----BEGIN RSA PRIVATE KEY----- +MIIG4gIBAAKCAYEA4+442scsdqSf6O4UO/RskMzOX8BhDcSwrhGe97jdCuQKUqS6 +OT1UoHK0DdMkxHlOMhifPzKxoBQlI/02l14tV//xNArKj4a+BZzNS1mp3adjgTc3 +uRDQHmHVZUzH4VXhL2zZ1EXVaJULZVWJYAqMW8GOObs+Kwijo+zxBGRs96Re9sg3 +XMkCUN+ZMoCpqoU4R/QiJ5z7B4AXS9CVcvczQKiULn1otP+UQQ4ABHlNt8pZzR6P +/WGy91PvGt5wWfpReGveP/Zl2tksVXXs0CQgteneblYVzj01MaobVW59/LGUpe0o +Qy2rtzQVX3DZkDoGwGh4lof2Af+xMjCbVL6oDbPPooXG8TJnDP3AVhMGKIb+EhBU +IEJnd/z6ZXTWbv0KQOt4wiVBzuXVBf7xxn/aH4+3kyrnj7CsUHXM4++xKRZq7gaP +7nRbN22rw+WCHnqvMfAGnS7/6AjKFUWxmNWxRXMX+ehsSbT/XQnQm88eoUBLzQc4 +JrNSPklVJ82Qp19tAgMBAAECggGAMGGFkfLLHlftVY0LoHpOfSHsAGkecMS6WAiH +fL+xs7kZ89bhbHr3NqOCUpjp6gZxsbKGQuzoxTjhdVUvPEwSReae9VQBERwhw6E3 +9nGO2+zG80ucOV03P+u2Vy1IFC2dgeqSBjvYg713UMgqQ8eZaXSZUunK1WmdCpOl +yS/j7WDng2yWS8yjADWmGBE1cmuaubM5eL0aj8oBp+cbge6041mlMoUOL7U8a96j +5E83TvbVvvNozvjo+xTG4SYsJP073UtwwSCqC7UNFqhFTJfpCwiXw+muvwv3HLGB +Y+r0ct232l2rIQbJ45k+bMcVynn7RHt3BmnZWaI8sJZ7Zm9IDEKHnN9LOtwVH0gK +67CxOJhbbX80zkNgJWR8jcDRaSe4rDOFviZlmJ+K68+aa9dbo0lg+f/7X2fZCCCh +2NAgJdVi+dYHgvbGplVlcT+4ZLS9NaktYmzLLOGW8J5AOQM7EDhyrK9uCrrq9cHA +xoZgWKkoI2zdivKEdqXb7/kpubSBAoHBAPUyfYBNFLE9oe8bfyKHn9Q9Tc7iEZYp +D+oLxCScmvqKTJpezUiqzm3A/dRTRh8G9E/aLOXxyxkZo6Q3EUftPfxMuPGTuNj3 +at1cvVFNxgknvMmaGQUK6QDscnV/iQ1jZeKJrM7xeCAKuP39pYinfDgeVX0WI2pN +3IdW7/8C270bYWC1j3rh0SbjLdUhuwOE4qg01n8WYTyiVeHEioJhdOBjy1P9bWoN +9bVV4O+DKkaAf4VXYNO2wyu6r4jIuDwsoQKBwQDt+PxoHK4ubWPxi2+FXFu6Pmj5 +YQNEYIOQJo5Mi+BJwVqhXOXxZ0ML9rUphECoD+i/v2J+M8qGosRHO0rWnAmguxAA +7OaB8ryGP1hNOqSYlH5dQ30zP1N2VdFzpB/7dnWScI6CaNj097c2+j7Mp3r8pHuM +crSD187Y+LI1zjZZfpVVuMSpRCah/r70uWe8EsjnwwuKUbZcG3dYH1OsMEFDX5ei +/XCsSpHgvPZPsQZHLYl3rlngWuIxx9mmELh+E00CgcBxg0Jel1CxDRtempgs4CS6 +GPdgg4AoyDG55GCVonqM6mG0RZc7wPd4EBRyq2qXCp0oKpUGjv27TQdZCrVRWx+L +IemszPqSV1h9ymVKsnqv2lmn61MR5o8gAlaq1rQYIqAUVDBQTbGTA+PIkhiEPyVe +xYxGMG2M1Sb28OSCZkxcK8TVBLi75rbxDdM2DDuL0YUs4ek7RJ0XeP/RWS/WVE/L +YefLplN0+al6nZtYxpxXrz1Z+a211bJdGDwTUvkXwoECgcAQVh5lu0pNz56jz1Gp +kwyM/YnRTNKfmAyQEcWFBbkw9wAUwb7bUp5srNQE9JpHr0foGehWB5IoqfXVegGK +OA4FJbJUje7JDvPYN3MFYjg4bUE7f82RfhBpuDx3ttWnOpuZoPZ3h2EVeAfw0z8K +Z5juzQ/aNWmk/2SoynHZdb2PaTwxNUzy3cXVKxrKzAuOArAeEOqy5ScirZQEzam9 +0VY5nM9ZFhLtEPVwuyghkmJ+8mZUe/iZiUOr7S9I0i8IIKUCgcAqVPmTsjJ6xLZB +DhqKDtnbSwJojRUQhEK6yTXlbayOykddb/7kgcbOq3y4WlkSlqQLr/vQ1+KSYBuB +BU9DTFyY4YSobr+tzKzeJtWoWAlF7DjYXeynOUaI0czquRNcnbvbadCn5A4zsXHr +ExQockWwcQUqoUUmbKE1v6iwHQGA2a9mcTr05Dz+6GgrqmSnQ/N/OEtRoe1zaVIw +JbhiW8fNAvVvSiGUyylEdvD4llBXM4zrewhw/Lz9acE6OoJaTBU= +-----END RSA PRIVATE KEY----- diff --git a/deprecated-ngircd/src/testsuite/start-server.sh b/deprecated-ngircd/src/testsuite/start-server.sh new file mode 100755 index 0000000..bc6eb7e --- /dev/null +++ b/deprecated-ngircd/src/testsuite/start-server.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# ngIRCd Test Suite + +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u + +# read in functions +. "${srcdir}/functions.inc" + +if [ -n "$1" ]; then + id="$1"; shift +else + id="1" +fi + +echo_n "starting server ${id} ..." + +# remove old logfiles, if this is the first server (ID 1) +[ "$id" = "1" ] && rm -rf logs *.log + +# check weather getpid.sh returns valid PIDs. If not, don't start up the +# test-server, because we won't be able to kill it at the end of the test. +./getpid.sh sh >/dev/null +if [ $? -ne 0 ]; then + echo " getpid.sh failed!" + exit 1 +fi + +# check if there is a test-server already running +./getpid.sh T-ngircd${id} >/dev/null 2>&1 +if [ $? -eq 0 ]; then + echo " failure: test-server ${id} already running!" + exit 1 +fi + +# generate MOTD for test-server +echo "This is an ngIRCd Test Server" >ngircd-test${id}.motd + +# glibc memory checking, see malloc(3) +MALLOC_CHECK_=3 +export MALLOC_CHECK_ + +# starting up test-server ... +./T-ngircd${id} -n -f "${srcdir}/ngircd-test${id}.conf" "$@" \ + >ngircd-test${id}.log 2>&1 & +sleep 1 + +# validate running test-server +r=1 +pid=`./getpid.sh T-ngircd${id}` +[ -n "$pid" ] && kill -0 $pid >/dev/null 2>&1; r=$? +[ $r -eq 0 ] && echo " ok." || echo " failure!" +exit $r diff --git a/deprecated-ngircd/src/testsuite/start-server1 b/deprecated-ngircd/src/testsuite/start-server1 new file mode 100755 index 0000000..ced37c4 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/start-server1 @@ -0,0 +1,6 @@ +#!/bin/sh +# ngIRCd Test Suite + +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u +"${srcdir}/start-server.sh" 1 diff --git a/deprecated-ngircd/src/testsuite/start-server2 b/deprecated-ngircd/src/testsuite/start-server2 new file mode 100755 index 0000000..ca05bcf --- /dev/null +++ b/deprecated-ngircd/src/testsuite/start-server2 @@ -0,0 +1,6 @@ +#!/bin/sh +# ngIRCd Test Suite + +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u +"${srcdir}/start-server.sh" 2 diff --git a/deprecated-ngircd/src/testsuite/start-server3 b/deprecated-ngircd/src/testsuite/start-server3 new file mode 100755 index 0000000..167040b --- /dev/null +++ b/deprecated-ngircd/src/testsuite/start-server3 @@ -0,0 +1,6 @@ +#!/bin/sh +# ngIRCd Test Suite + +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u +"${srcdir}/start-server.sh" 3 diff --git a/deprecated-ngircd/src/testsuite/stop-server.sh b/deprecated-ngircd/src/testsuite/stop-server.sh new file mode 100755 index 0000000..c5a9486 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/stop-server.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# ngIRCd Test Suite + +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u + +# read in functions +. "${srcdir}/functions.inc" + +if [ -n "$1" ]; then + id="$1"; shift +else + id="1" +fi + +echo_n "stopping server ${id} ..." + +# stop test-server ... +pid=`./getpid.sh T-ngircd${id}` +if [ -z "$pid" ]; then + echo " failure: no running server found!?" + exit 1 +fi +kill $pid >/dev/null 2>&1 || exit 1 + +# waiting ... +for i in 1 2 3 4 5; do + kill -0 $pid >/dev/null 2>&1; r=$? + if [ $r -ne 0 ]; then + echo " ok". + exit 0 + fi + sleep 1 +done +echo " failure: server ${id} still running!?" +exit 1 diff --git a/deprecated-ngircd/src/testsuite/stop-server1 b/deprecated-ngircd/src/testsuite/stop-server1 new file mode 100755 index 0000000..aad0c85 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/stop-server1 @@ -0,0 +1,6 @@ +#!/bin/sh +# ngIRCd Test Suite + +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u +"${srcdir}/stop-server.sh" 1 diff --git a/deprecated-ngircd/src/testsuite/stop-server2 b/deprecated-ngircd/src/testsuite/stop-server2 new file mode 100755 index 0000000..104a096 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/stop-server2 @@ -0,0 +1,6 @@ +#!/bin/sh +# ngIRCd Test Suite + +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u +"${srcdir}/stop-server.sh" 2 diff --git a/deprecated-ngircd/src/testsuite/stop-server3 b/deprecated-ngircd/src/testsuite/stop-server3 new file mode 100755 index 0000000..a9515ed --- /dev/null +++ b/deprecated-ngircd/src/testsuite/stop-server3 @@ -0,0 +1,6 @@ +#!/bin/sh +# ngIRCd Test Suite + +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u +"${srcdir}/stop-server.sh" 3 diff --git a/deprecated-ngircd/src/testsuite/stress-A.e b/deprecated-ngircd/src/testsuite/stress-A.e new file mode 100644 index 0000000..d51adaa --- /dev/null +++ b/deprecated-ngircd/src/testsuite/stress-A.e @@ -0,0 +1,10 @@ +# ngIRCd test suite +# "Stress" header + +set timeout 30 + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} diff --git a/deprecated-ngircd/src/testsuite/stress-B.e b/deprecated-ngircd/src/testsuite/stress-B.e new file mode 100644 index 0000000..53c75a0 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/stress-B.e @@ -0,0 +1,76 @@ +# ngIRCd test suite +# "Stress" body + +send "user user . . :User\r" +expect { + timeout { exit 1 } + " 376" +} + +sleep 2 + +send "oper TestOp 123\r" +expect { + timeout { exit 1 } + "MODE test* :+o" +} +expect { + timeout { exit 1 } + " 381 test" +} + +sleep 2 + +send "join #channel\r" +expect { + timeout { exit 1 } + " 353 * = #channel " +} +expect { + timeout { exit 1 } + " 366 * #channel :" +} + +send "mode #channel\r" +expect { + timeout { exit 1 } + " 324 test* #channel" +} + +send "join #channel2\r" +expect { + timeout { exit 1 } + " 353 * = #channel2 " +} +expect { + timeout { exit 1 } + " 366 * #channel2 :" +} + +send "names\r" +expect { + timeout { exit 1 } + " 366 " +} + +sleep 3 + +send "part #channel2\r" +expect { + timeout { exit 1 } + " PART #channel2 " +} + +send "part #channel\r" +expect { + timeout { exit 1 } + " PART #channel " +} + +sleep 1 + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/stress-server.sh b/deprecated-ngircd/src/testsuite/stress-server.sh new file mode 100755 index 0000000..a9ef507 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/stress-server.sh @@ -0,0 +1,88 @@ +#!/bin/sh +# +# ngIRCd Test Suite +# 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 +# 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. +# + +# parse command line +[ "$1" -gt 0 ] 2>/dev/null && CLIENTS="$1" || CLIENTS=5 +[ "$2" -gt 0 ] 2>/dev/null && MAX="$2" || MAX=-1 + +# detect source directory +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u + +# get our name +name=`basename "$0"` + +# create directories +[ -d logs ] || mkdir logs +[ -d tests ] || mkdir tests + +# test for required external tools +type expect >/dev/null 2>&1 +if [ $? -ne 0 ]; then + echo "${name}: \"expect\" not found." + exit 77 +fi +type telnet >/dev/null 2>&1 +if [ $? -ne 0 ]; then + echo "${name}: \"telnet\" not found."; + exit 77 +fi + +# hello world! :-) +echo "stressing server with $CLIENTS clients (be patient!):" + +# read in functions +. "${srcdir}/functions.inc" + +# create scripts for expect(1) +no=0 +while [ ${no} -lt $CLIENTS ]; do + cat "${srcdir}/stress-A.e" >tests/${no}.e + echo "send \"nick test${no}\\r\"" >>tests/${no}.e + cat "${srcdir}/stress-B.e" >>tests/${no}.e + no=`expr ${no} + 1` +done + +# run first script and check if it succeeds +echo_n "checking stress script ..." +expect tests/0.e >logs/stress-0.log 2>/dev/null +if [ $? -ne 0 ]; then + echo " failure!" + exit 1 +else + echo " ok." +fi + +no=0 +while [ ${no} -lt $CLIENTS ]; do + expect tests/${no}.e >logs/stress-${no}.log 2>/dev/null & + + no=`expr ${no} + 1` + echo "started client $no/$CLIENTS." + + [ $MAX -gt 0 ] && "$srcdir/wait-tests.sh" $MAX +done + +echo_n "waiting for clients to complete: ." +touch logs/check-idle.log +while true; do + expect "${srcdir}/check-idle.e" >>logs/check-idle.log; res=$? + echo "====================" >>logs/check-idle.log + [ $res -ne 99 ] && break + + # there are still clients connected. Wait ... + sleep 3 + echo_n "." +done + +[ $res -eq 0 ] && echo " ok." || echo " failure!" +exit $res diff --git a/deprecated-ngircd/src/testsuite/switch-server3 b/deprecated-ngircd/src/testsuite/switch-server3 new file mode 100755 index 0000000..4087e24 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/switch-server3 @@ -0,0 +1,4 @@ +#!/bin/sh -e +cp "${srcdir}"/ssl/cert-my-second-domain-tld.pem ssl/cert.pem +cp "${srcdir}"/ssl/key-my-second-domain-tld.pem ssl/key.pem +cp "${srcdir}"/ssl/dhparams-my-second-domain-tld.pem ssl/dhparams.pem diff --git a/deprecated-ngircd/src/testsuite/test-loop.sh b/deprecated-ngircd/src/testsuite/test-loop.sh new file mode 100755 index 0000000..18fe9a5 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/test-loop.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# +# ngIRCd Test Suite +# 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 +# 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. +# + +# parse command line +[ "$1" -gt 0 ] 2>/dev/null && LOOPS="$1" || LOOPS=5 +[ "$2" -gt 0 ] 2>/dev/null && WAIT="$2" || WAIT=5 + +# detect source directory +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u + +loop=0 +while [ ${loop} -lt $LOOPS ]; do + loop=`expr ${loop} + 1` + echo " loop $loop/$LOOPS starting:" + for s in "$srcdir"/*-test; do + sh "$s"; r=$? + [ $r -ne 0 ] && exit $r + sleep 1 + done + if [ ${loop} -lt $LOOPS ]; then + echo " waiting $WAIT seconds ..." + sleep $WAIT + fi +done diff --git a/deprecated-ngircd/src/testsuite/tests.sh b/deprecated-ngircd/src/testsuite/tests.sh new file mode 100755 index 0000000..3e46c18 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/tests.sh @@ -0,0 +1,69 @@ +#!/bin/sh +# +# ngIRCd Test Suite +# 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 +# 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. +# + +# detect source directory +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u + +name=`basename "$0"` +test=`echo ${name} | cut -d '.' -f 1` +[ -d logs ] || mkdir logs + +if [ ! -r "$test" ]; then + echo "$test: test not found" >>tests-skipped.lst + echo "${name}: test \"$test\" not found!"; exit 77 + exit 1 +fi + +# read in functions +. "${srcdir}/functions.inc" + +type expect >/dev/null 2>&1 +if [ $? -ne 0 ]; then + echo "$test: \"expect\" not found" >>tests-skipped.lst + echo "${name}: \"expect\" not found." + exit 77 +fi +type telnet >/dev/null 2>&1 +if [ $? -ne 0 ]; then + echo "$test: \"telnet\" not found" >>tests-skipped.lst + echo "${name}: \"telnet\" not found." + exit 77 +fi + +case "$test" in + *ssl*) + type openssl >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "$test: \"openssl\" not found" >>tests-skipped.lst + echo "${name}: \"openssl\" not found." + exit 77 + fi + ;; +esac + +# prepare expect script +e_in="${srcdir}/${test}.e" +e_tmp="${test}.e_" +e_exec="$e_in" +if test -t 1 2>/dev/null; then + sed -e 's|^expect |puts -nonewline stderr "."; expect |g' \ + "$e_in" >"$e_tmp" + [ $? -eq 0 ] && e_exec="$e_tmp" +fi + +echo_n "running ${test} ..." +expect "$e_exec" >logs/${test}.log; r=$? +[ $r -eq 0 ] && echo " ok." || echo " failure!" + +rm -f "$e_tmp" +exit $r diff --git a/deprecated-ngircd/src/testsuite/wait-tests.sh b/deprecated-ngircd/src/testsuite/wait-tests.sh new file mode 100755 index 0000000..b6fa08f --- /dev/null +++ b/deprecated-ngircd/src/testsuite/wait-tests.sh @@ -0,0 +1,44 @@ +#!/bin/sh +# +# ngIRCd Test Suite +# 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 +# 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. +# + +[ "$1" -gt 0 ] 2>/dev/null && MAX="$1" || MAX=5 + +# detect source directory +[ -z "$srcdir" ] && srcdir=`dirname "$0"` +set -u + +PS_FLAGS="-f" +ps $PS_FLAGS >/dev/null 2>&1 +[ $? -ne 0 ] && PS_FLAGS="a" + +# read in functions +. "${srcdir}/functions.inc" + +msg=0 +while true; do + count=`ps $PS_FLAGS | grep "expect " | wc -l` + count=`expr $count - 1` + + [ $count -le $MAX ] && break + + if [ $msg -lt 1 ]; then + echo_n " waiting for processes to settle: " + msg=1 + fi + + # there are still clients connected. Wait ... + echo_n "$count>$MAX " + sleep 1 +done + +[ $msg -gt 0 ] && echo "done: $count" +exit 0 diff --git a/deprecated-ngircd/src/testsuite/who-test.e b/deprecated-ngircd/src/testsuite/who-test.e new file mode 100644 index 0000000..55c6570 --- /dev/null +++ b/deprecated-ngircd/src/testsuite/who-test.e @@ -0,0 +1,203 @@ +# ngIRCd test suite +# WHO test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick nick\r" +send "user user . . :Real Name\r" +expect { + timeout { exit 1 } + "376" +} + +send "who\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick \* * * ngircd.test.server nick H :0 Real Name" +} + +send "who 0\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick \* * * ngircd.test.server nick H :0 Real Name" +} + +send "away :testing\r" +expect { + timeout { exit 1 } + "306 nick" +} + +send "who *\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name" +} + +send "join #channel\r" +expect { + timeout { exit 1 } + "@* JOIN :#channel" +} + +send "who #channel\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G@ :0 Real Name" +} + +send "mode #channel +v nick\r" +expect { + timeout { exit 1 } + "@* MODE #channel +v nick\r" +} + +send "who #channel\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G@ :0 Real Name" +} + +send "who 127.0.0.*\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name" +} + +send "mode #channel -o nick\r" +expect { + timeout { exit 1 } + "@* MODE #channel -o nick\r" +} + +send "who #channel\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G+ :0 Real Name" +} + +send "who ngircd.test.server\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name" +} + +send "part #channel\r" +expect { + timeout { exit 1 } + "@* PART #channel :" +} + +send "who Real?Name\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name" +} + +send "oper TestOp 123\r" +expect { + timeout { exit 1 } + "MODE nick :+o" +} +expect { + timeout { exit 1 } + "381 nick" +} + +send "who 0 o\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick \* * * ngircd.test.server nick G* :0 Real Name" +} + +send "away\r" +expect { + timeout { exit 1 } + "305 nick" +} + +send "who ??7.*0*\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name" +} + +send "join #opers\r" +expect { + timeout { exit 1 } + "@* JOIN :#opers" +} + +send "who #opers\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick #opers * * ngircd.test.server nick H*@ :0 Real Name" +} + +send "who Re*me\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name" +} + +send "mode #opers -o nick\r" +expect { + timeout { exit 1 } + "@* MODE #opers -o nick\r" +} + +send "who #opers\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick #opers * * ngircd.test.server nick H* :0 Real Name" +} + +send "who *.server\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name" +} + +send "mode #opers +v nick\r" +expect { + timeout { exit 1 } + "@* MODE #opers +v nick\r" +} + +send "who #opers\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick #opers * * ngircd.test.server nick H*+ :0 Real Name" +} + +send "mode #opers +s\r" +expect { + timeout { exit 1 } + "@* MODE #opers +s\r" +} + +send "who n?c?\r" +expect { + timeout { exit 1 } + ":ngircd.test.server 352 nick \* * ngircd.test.server nick H* :0 Real Name" +} +expect { + timeout { exit 1 } + "315" +} + +send "who #SecretChannel\r" +expect { + timeout { exit 1 } + "315" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/testsuite/whois-test.e b/deprecated-ngircd/src/testsuite/whois-test.e new file mode 100644 index 0000000..74442ed --- /dev/null +++ b/deprecated-ngircd/src/testsuite/whois-test.e @@ -0,0 +1,77 @@ +# ngIRCd test suite +# WHOIS test + +spawn telnet 127.0.0.1 6789 +expect { + timeout { exit 1 } + "Connected" +} + +send "nick nick\r" +send "user user . . :Real Name\r" +expect { + timeout { exit 1 } + "376" +} + +send "whois nick\r" +expect { + timeout { exit 1 } + "311 nick nick ~user 127.0.0.1 \* :Real Name\r" +} +expect { + timeout { exit 1 } + "318 nick nick :" +} + +send "whois *\r" +expect { + timeout { exit 1 } + "311 nick nick ~user 127.0.0.1* \* :Real Name\r" +} + +send "whois n*\r" +expect { + timeout { exit 1 } + "311 nick nick ~user 127.0.0.1* \* :Real Name\r" +} + +send "whois ?ick\r" +expect { + timeout { exit 1 } + "311 nick nick ~user 127.0.0.1* \* :Real Name\r" +} + +send "whois ????,n?*k\r" +expect { + timeout { exit 1 } + "311 nick nick ~user 127.0.0.1* \* :Real Name\r" +} + +send "whois unknown\r" +expect { + timeout { exit 1 } + "401 nick unknown :" +} +expect { + timeout { exit 1 } + "318 nick unknown :" +} + +send "whois ngircd.test.server2 nick\r" +expect { + timeout { exit 1 } + ":ngircd.test.server2 311 nick nick ~user 127.0.0.1* \* :Real Name\r" +} + +send "whois nosuchserver unknown\r" +expect { + timeout { exit 1 } + "402 nick nosuchserver :" +} + +send "quit\r" +expect { + timeout { exit 1 } + "ERROR :Closing connection" +} diff --git a/deprecated-ngircd/src/tool/Makefile.ng b/deprecated-ngircd/src/tool/Makefile.ng new file mode 100644 index 0000000..d88bdc9 --- /dev/null +++ b/deprecated-ngircd/src/tool/Makefile.ng @@ -0,0 +1,27 @@ +# +# ngIRCd -- The Next Generation IRC Daemon +# Copyright (c)2001-2012 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. +# + +__ng_Makefile_am_template__ + +EXTRA_DIST = Makefile.ng + +AM_CPPFLAGS = -I$(srcdir)/../portab + +noinst_LIBRARIES = libngtool.a + +libngtool_a_SOURCES = tool.c + +noinst_HEADERS = tool.h + +maintainer-clean-local: + rm -f Makefile Makefile.in Makefile.am + +# -eof- diff --git a/deprecated-ngircd/src/tool/tool.c b/deprecated-ngircd/src/tool/tool.c new file mode 100644 index 0000000..35c1ee6 --- /dev/null +++ b/deprecated-ngircd/src/tool/tool.c @@ -0,0 +1,249 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + * Copyright (c)2001-2018 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. + */ + +#include "portab.h" + +/** + * @file + * Tool functions + */ + +#include <assert.h> +#include <ctype.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/time.h> + +#include <netinet/in.h> + +#ifdef SYSLOG +#define SYSLOG_NAMES 1 +#include <syslog.h> +#endif + +#include "tool.h" + + +/** + * Removes all leading and trailing whitespaces of a string. + * @param String The string to remove whitespaces from. + */ +GLOBAL void +ngt_TrimStr(char *String) +{ + char *start, *end; + + assert(String != NULL); + + start = String; + + /* Remove whitespaces at the beginning of the string ... */ + while (*start == ' ' || *start == '\t' || + *start == '\n' || *start == '\r') + start++; + + if (!*start) { + *String = '\0'; + return; + } + + /* ... and at the end: */ + end = strchr(start, '\0'); + end--; + while ((*end == ' ' || *end == '\t' || *end == '\n' || *end == '\r') + && end >= start) + end--; + + /* New trailing NULL byte */ + *(++end) = '\0'; + + memmove(String, start, (size_t)(end - start)+1); +} /* ngt_TrimStr */ + + +/** + * Convert a string to uppercase letters. + */ +GLOBAL char * +ngt_UpperStr(char *String) +{ + char *ptr; + + assert(String != NULL); + + ptr = String; + while(*ptr) { + *ptr = (char)toupper(*ptr); + ptr++; + } + return String; +} /* ngt_UpperStr */ + + +/** + * Convert a string to lowercase letters. + */ +GLOBAL char * +ngt_LowerStr(char *String) +{ + char *ptr; + + assert(String != NULL); + + ptr = String; + while(*ptr) { + *ptr = (char)tolower(*ptr); + ptr++; + } + return String; +} /* ngt_LowerStr */ + + +GLOBAL void +ngt_TrimLastChr( char *String, const char Chr) +{ + /* If last character in the string matches Chr, remove it. + * Empty strings are handled correctly. */ + + size_t len; + + assert(String != NULL); + + len = strlen(String); + if(len == 0) + return; + + len--; + + if(String[len] == Chr) + String[len] = '\0'; +} /* ngt_TrimLastChr */ + + +/** + * Fill a String with random chars + */ +GLOBAL char * +ngt_RandomStr(char *String, const size_t len) +{ + static const char chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!\"#$&'()*+,-./:;<=>?@[\\]^_`"; + struct timeval t; + size_t i; + + assert(String != NULL); + + gettimeofday(&t, NULL); +#ifndef HAVE_ARC4RANDOM + srand((unsigned)(t.tv_usec * t.tv_sec)); + + for (i = 0; i < len; ++i) { + String[i] = chars[rand() % (sizeof(chars) - 1)]; + } +#else + for (i = 0; i < len; ++i) + String[i] = chars[arc4random() % (sizeof(chars) - 1)]; +#endif + String[len] = '\0'; + + return String; +} /* ngt_RandomStr */ + + +#ifdef SYSLOG + + +#ifndef INTERNAL_MARK + +#ifndef _code +typedef struct _code { + char *c_name; + int c_val; +} CODE; +#endif + +CODE facilitynames[] = { +#ifdef LOG_AUTH + { "auth", LOG_AUTH }, +#endif +#ifdef LOG_AUTHPRIV + { "authpriv", LOG_AUTHPRIV }, +#endif +#ifdef LOG_CRON + { "cron", LOG_CRON }, +#endif +#ifdef LOG_DAEMON + { "daemon", LOG_DAEMON }, +#endif +#ifdef LOG_FTP + { "ftp", LOG_FTP }, +#endif +#ifdef LOG_LPR + { "lpr", LOG_LPR }, +#endif +#ifdef LOG_MAIL + { "mail", LOG_MAIL }, +#endif +#ifdef LOG_NEWS + { "news", LOG_NEWS }, +#endif +#ifdef LOG_UUCP + { "uucp", LOG_UUCP }, +#endif +#ifdef LOG_USER + { "user", LOG_USER }, +#endif +#ifdef LOG_LOCAL7 + { "local0", LOG_LOCAL0 }, + { "local1", LOG_LOCAL1 }, + { "local2", LOG_LOCAL2 }, + { "local3", LOG_LOCAL3 }, + { "local4", LOG_LOCAL4 }, + { "local5", LOG_LOCAL5 }, + { "local6", LOG_LOCAL6 }, + { "local7", LOG_LOCAL7 }, +#endif + { 0, -1 } +}; + +#endif + + +GLOBAL const char* +ngt_SyslogFacilityName(int Facility) +{ + int i = 0; + while(facilitynames[i].c_name) { + if (facilitynames[i].c_val == Facility) + return facilitynames[i].c_name; + i++; + } + return "unknown"; +} + + +GLOBAL int +ngt_SyslogFacilityID(char *Name, int DefaultFacility) +{ + int i = 0; + while(facilitynames[i].c_name) { + if (strcasecmp(facilitynames[i].c_name, Name) == 0) + return facilitynames[i].c_val; + i++; + } + return DefaultFacility; +} + + +#endif + + +/* -eof- */ diff --git a/deprecated-ngircd/src/tool/tool.h b/deprecated-ngircd/src/tool/tool.h new file mode 100644 index 0000000..b05649a --- /dev/null +++ b/deprecated-ngircd/src/tool/tool.h @@ -0,0 +1,38 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + * Copyright (c)2001-2010 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. + */ + +#ifndef __tool_h__ +#define __tool_h__ + +/** + * @file + * Tool functions (Header) + */ + +#include "portab.h" + +GLOBAL void ngt_TrimLastChr PARAMS((char *String, const char Chr )); + +GLOBAL void ngt_TrimStr PARAMS((char *String )); + +GLOBAL char *ngt_UpperStr PARAMS((char *String )); +GLOBAL char *ngt_LowerStr PARAMS((char *String )); + +GLOBAL char *ngt_RandomStr PARAMS((char *String, const size_t len)); + +#ifdef SYSLOG +GLOBAL const char *ngt_SyslogFacilityName PARAMS((int Facility)); +GLOBAL int ngt_SyslogFacilityID PARAMS((char *Name, int DefaultFacility)); +#endif + +#endif + +/* -eof- */ |
