mirror of
https://github.com/osmarks/ngircd.git
synced 2025-11-02 23:13:00 +00:00
Compare commits
160 Commits
rel-22.1
...
rel-25-rc1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bd88be8ad | ||
|
|
fb760d9473 | ||
|
|
7f2d21f962 | ||
|
|
6af9476cad | ||
|
|
263c5edb60 | ||
|
|
b4f7aae67e | ||
|
|
798de94d65 | ||
|
|
ac341176da | ||
|
|
6a622c0084 | ||
|
|
91ef17aba2 | ||
|
|
13761f1ec9 | ||
|
|
03acae970d | ||
|
|
8f0c705029 | ||
|
|
d803ff0525 | ||
|
|
3559940e4a | ||
|
|
34bdb0d98a | ||
|
|
7ed22d0b22 | ||
|
|
d9f81ac669 | ||
|
|
7207bef418 | ||
|
|
619a3f3ff2 | ||
|
|
05640f9285 | ||
|
|
e009fc87d5 | ||
|
|
c37d6971d6 | ||
|
|
ddeb7b20eb | ||
|
|
543f44bff8 | ||
|
|
bc728f92de | ||
|
|
2f6f6929d8 | ||
|
|
f244ab2219 | ||
|
|
e17d4bdec7 | ||
|
|
b2ba3e745a | ||
|
|
3890304b54 | ||
|
|
a69866f3f9 | ||
|
|
7071476d2a | ||
|
|
3c627dd70d | ||
|
|
879d550408 | ||
|
|
2bb917f05a | ||
|
|
72acf53d69 | ||
|
|
479d7d99c1 | ||
|
|
181da30997 | ||
|
|
bfebdaece8 | ||
|
|
d2a134b79c | ||
|
|
74f021fb44 | ||
|
|
8e09180295 | ||
|
|
f0532c98cd | ||
|
|
9e0e955daf | ||
|
|
3e44738416 | ||
|
|
02c8887543 | ||
|
|
77861f6fe2 | ||
|
|
e9e3df27b7 | ||
|
|
0dc3c13469 | ||
|
|
d0d4de4980 | ||
|
|
85df414907 | ||
|
|
f5ff22d98f | ||
|
|
995bbfd627 | ||
|
|
dd6d75d37d | ||
|
|
daa88b7651 | ||
|
|
2924b3d52a | ||
|
|
a335e480c5 | ||
|
|
dde89b1267 | ||
|
|
455f073687 | ||
|
|
804c240320 | ||
|
|
fb99d7c92e | ||
|
|
1d06ed02ce | ||
|
|
c283b52a78 | ||
|
|
b708c95173 | ||
|
|
722afc1b81 | ||
|
|
86a64ce6aa | ||
|
|
e84000f7b8 | ||
|
|
a93247d32f | ||
|
|
a673a6e3af | ||
|
|
0ab4e7bffd | ||
|
|
8f0d24c831 | ||
|
|
0a6e284582 | ||
|
|
2254e92e60 | ||
|
|
7cda2f13f4 | ||
|
|
7dba1a0766 | ||
|
|
055d6e8056 | ||
|
|
432a9297f8 | ||
|
|
4dcd5f1225 | ||
|
|
6a5569c27d | ||
|
|
49ab79d0e6 | ||
|
|
cedba36965 | ||
|
|
40bea95c08 | ||
|
|
7c7d03b730 | ||
|
|
4693226d69 | ||
|
|
afb59ab8e5 | ||
|
|
d90f0323e5 | ||
|
|
01e590b007 | ||
|
|
7b7ee6a3ca | ||
|
|
46838510ab | ||
|
|
0903343f85 | ||
|
|
182bfac855 | ||
|
|
1e386fb7ac | ||
|
|
52ccba5d1e | ||
|
|
98e9467c85 | ||
|
|
e8dacb68dc | ||
|
|
398022631a | ||
|
|
f2cef85fde | ||
|
|
6ed59a8548 | ||
|
|
49acb68584 | ||
|
|
d8aba40f07 | ||
|
|
87887bc632 | ||
|
|
cb3a4321a2 | ||
|
|
1e84b2640e | ||
|
|
86d27eaf89 | ||
|
|
4acf95ab61 | ||
|
|
57cd41d289 | ||
|
|
eb9929e82c | ||
|
|
c2e4c304e3 | ||
|
|
c56138c280 | ||
|
|
a1ce3fc779 | ||
|
|
ccc899c7f4 | ||
|
|
2a52befa56 | ||
|
|
2c18e9a7f8 | ||
|
|
9811223fb8 | ||
|
|
0083fe177f | ||
|
|
34578b8b30 | ||
|
|
85dc4d8777 | ||
|
|
64c265cf33 | ||
|
|
b72a7a4b96 | ||
|
|
b8482fd3cf | ||
|
|
90ea23ab4f | ||
|
|
6e7e744cc6 | ||
|
|
24cec978ee | ||
|
|
a02524465e | ||
|
|
813ea874f8 | ||
|
|
813897023e | ||
|
|
a5ca8be658 | ||
|
|
c364d67f80 | ||
|
|
5545e1bebf | ||
|
|
d118cd74b6 | ||
|
|
599626d570 | ||
|
|
571b1a8b83 | ||
|
|
b71a0ddbd5 | ||
|
|
7ff16e8116 | ||
|
|
f6b7764eb5 | ||
|
|
adfe5affed | ||
|
|
27934afd7e | ||
|
|
f64cb901ef | ||
|
|
d28d838cb9 | ||
|
|
2fc61ce8a6 | ||
|
|
5c48d7e9c7 | ||
|
|
0f490b5cae | ||
|
|
a43d79aeff | ||
|
|
93a872a36b | ||
|
|
c4245220de | ||
|
|
f8f7f83f5a | ||
|
|
03c8997af3 | ||
|
|
4396936f38 | ||
|
|
4da04640e6 | ||
|
|
10c7ba99e7 | ||
|
|
1136b97690 | ||
|
|
d9a97f2857 | ||
|
|
a4af9024fd | ||
|
|
6fc53558ed | ||
|
|
21767c968d | ||
|
|
c5da483685 | ||
|
|
4330f5d1c9 | ||
|
|
81b81c818c | ||
|
|
52825cde29 |
4
.clang_complete
Normal file
4
.clang_complete
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
-I./src
|
||||||
|
-I./src/ipaddr
|
||||||
|
-I./src/portab
|
||||||
|
-I./src/tool
|
||||||
20
.editorconfig
Normal file
20
.editorconfig
Normal file
@@ -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
|
||||||
41
.gitignore
vendored
41
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
Makefile
|
Makefile
|
||||||
|
Makefile.am
|
||||||
Makefile.in
|
Makefile.in
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
ansi2knr.1
|
ansi2knr.1
|
||||||
@@ -7,6 +8,7 @@ ansi2knr.h
|
|||||||
ar-lib
|
ar-lib
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
build-stamp-ngircd*
|
build-stamp-ngircd*
|
||||||
|
build+*
|
||||||
compile
|
compile
|
||||||
config.cache
|
config.cache
|
||||||
config.log
|
config.log
|
||||||
@@ -24,3 +26,42 @@ ngircd.dest
|
|||||||
.deps
|
.deps
|
||||||
*.a
|
*.a
|
||||||
*.o
|
*.o
|
||||||
|
doc/sample-ngircd.conf
|
||||||
|
doc/src/html
|
||||||
|
man/ngircd.8
|
||||||
|
man/ngircd.conf.5
|
||||||
|
src/config.h
|
||||||
|
src/config.h.in
|
||||||
|
src/config.h.in~
|
||||||
|
src/stamp-h1
|
||||||
|
src/ngircd/check-help
|
||||||
|
src/ngircd/check-version
|
||||||
|
src/ngircd/ngircd
|
||||||
|
src/ngircd/ngircd.exe
|
||||||
|
src/portab/portabtest
|
||||||
|
src/portab/portabtest.exe
|
||||||
|
src/testsuite/*.e_
|
||||||
|
src/testsuite/channel-test
|
||||||
|
src/testsuite/connect-test
|
||||||
|
src/testsuite/invite-test
|
||||||
|
src/testsuite/join-test
|
||||||
|
src/testsuite/kick-test
|
||||||
|
src/testsuite/logs
|
||||||
|
src/testsuite/message-test
|
||||||
|
src/testsuite/misc-test
|
||||||
|
src/testsuite/mode-test
|
||||||
|
src/testsuite/ngircd-test1.log
|
||||||
|
src/testsuite/ngircd-test1.motd
|
||||||
|
src/testsuite/ngircd-test2.log
|
||||||
|
src/testsuite/ngircd-test2.motd
|
||||||
|
src/testsuite/opless-channel-test
|
||||||
|
src/testsuite/server-link-test
|
||||||
|
src/testsuite/server-login-test
|
||||||
|
src/testsuite/T-ngircd1
|
||||||
|
src/testsuite/T-ngircd1.exe
|
||||||
|
src/testsuite/T-ngircd2
|
||||||
|
src/testsuite/T-ngircd2.exe
|
||||||
|
src/testsuite/tests
|
||||||
|
src/testsuite/tests-skipped.lst
|
||||||
|
src/testsuite/who-test
|
||||||
|
src/testsuite/whois-test
|
||||||
|
|||||||
14
.mailmap
14
.mailmap
@@ -1,4 +1,16 @@
|
|||||||
# mailmap file for git-[short]log and git-blame
|
# 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>
|
||||||
|
|
||||||
Alexander Barton <anonymous>
|
|
||||||
Ali Shemiran <ashemira@ucsd.edu>
|
Ali Shemiran <ashemira@ucsd.edu>
|
||||||
|
|
||||||
|
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>
|
||||||
|
|||||||
14
.travis.yml
14
.travis.yml
@@ -1,7 +1,15 @@
|
|||||||
language: c
|
language: c
|
||||||
before_install:
|
sudo: false
|
||||||
- sudo apt-get update -qq
|
addons:
|
||||||
- sudo apt-get install -qq libident-dev libpam0g-dev libssl-dev libwrap0-dev zlib1g-dev expect telnet
|
apt:
|
||||||
|
packages:
|
||||||
|
- libident-dev
|
||||||
|
- libpam0g-dev
|
||||||
|
- libssl-dev
|
||||||
|
- libwrap0-dev
|
||||||
|
- zlib1g-dev
|
||||||
|
- expect
|
||||||
|
- telnet
|
||||||
compiler:
|
compiler:
|
||||||
- gcc
|
- gcc
|
||||||
- clang
|
- clang
|
||||||
|
|||||||
29
AUTHORS
29
AUTHORS
@@ -2,16 +2,18 @@
|
|||||||
ngIRCd - Next Generation IRC Server
|
ngIRCd - Next Generation IRC Server
|
||||||
http://ngircd.barton.de/
|
http://ngircd.barton.de/
|
||||||
|
|
||||||
(c)2001-2015 Alexander Barton and Contributors.
|
(c)2001-2018 Alexander Barton and Contributors.
|
||||||
ngIRCd is free software and published under the
|
ngIRCd is free software and published under the
|
||||||
terms of the GNU General Public License.
|
terms of the GNU General Public License.
|
||||||
|
|
||||||
-- AUTHORS and CONTRIBUTORS --
|
-- AUTHORS and CONTRIBUTORS --
|
||||||
|
|
||||||
|
|
||||||
Note: If you have critics, patches or something else, please feel free to
|
Note:
|
||||||
post a mail to the ngIRCd mailing list: <ngircd-ml@arthur.barton.de> (please
|
If you have comments, patches or something else, please feel free to post
|
||||||
see <http://ngircd.barton.de/#ml> for details).
|
a mail to the ngIRCd mailing list: <ngircd-ml@ngircd.barton.de> (please see
|
||||||
|
<http://ngircd.barton.de/support.php> for details) or join the ngIRCd IRC
|
||||||
|
channel "#ngircd" on irc.barton.de: <irc://irc.barton.de/ngircd>.
|
||||||
|
|
||||||
Don't mail the people listed here directly, if possible!
|
Don't mail the people listed here directly, if possible!
|
||||||
|
|
||||||
@@ -27,32 +29,43 @@ Contributors
|
|||||||
Ali Shemiran <ashemira@ucsd.edu>
|
Ali Shemiran <ashemira@ucsd.edu>
|
||||||
Ask Bjørn Hansen <ask@develooper.com>
|
Ask Bjørn Hansen <ask@develooper.com>
|
||||||
Benjamin Pineau <ben@zouh.org>
|
Benjamin Pineau <ben@zouh.org>
|
||||||
|
Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||||
Brandon Beresini <beresini@google.com>
|
Brandon Beresini <beresini@google.com>
|
||||||
Brett Smith <brett@w3.org>
|
Brett Smith <brett@w3.org>
|
||||||
Brian Collins <bricollins@gmail.com>
|
Brian Collins <bricollins@gmail.com>
|
||||||
Bryan Caldwell <bcaldwel@ucsd.edu>
|
Bryan Caldwell <bcaldwel@ucsd.edu>
|
||||||
|
Christian Aistleitner <christian@quelltextlich.at>
|
||||||
Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de>
|
Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de>
|
||||||
DNS <dns@rbose.org>
|
|
||||||
Dana Dahlstrom <dana+ngIRCd@cs.ucsd.edu>
|
Dana Dahlstrom <dana+ngIRCd@cs.ucsd.edu>
|
||||||
David Kingston <deathking1337@aim.com>
|
David Kingston <deathking1337@aim.com>
|
||||||
|
DNS <dns@rbose.org>
|
||||||
Eric Grunow <egrunow@ucsd.edu>
|
Eric Grunow <egrunow@ucsd.edu>
|
||||||
Federico G. Schwindt <fgsch@lodoss.net>
|
Federico G. Schwindt <fgsch@lodoss.net>
|
||||||
Gabor Adam Toth <tg@tgbit.net>
|
Gabor Adam Toth <tg@tgbit.net>
|
||||||
Goetz Hoffart <goetz@hoffart.de>
|
Götz Hoffart <goetz@hoffart.de>
|
||||||
|
Ian Chard <ian@chard.org>
|
||||||
Ilja Osthoff <i.osthoff@gmx.net>
|
Ilja Osthoff <i.osthoff@gmx.net>
|
||||||
|
James Lu <james@overdrivenetworks.com>
|
||||||
Jari Aalto <jari.aalto@cante.net>
|
Jari Aalto <jari.aalto@cante.net>
|
||||||
|
LucentW <lucent@zebes.info>
|
||||||
|
Mantas Mikulėnas <grawity@gmail.com>
|
||||||
Neale Pickett <neale@woozle.org>
|
Neale Pickett <neale@woozle.org>
|
||||||
|
Peter Powell <petpow@saberuk.com>
|
||||||
Rolf Eike Beer <eike@sf-mail.de>
|
Rolf Eike Beer <eike@sf-mail.de>
|
||||||
|
Roy Sindre Norangshol <roy.sindre@norangshol.no>
|
||||||
Scott Perry <scperry@ucsd.edu>
|
Scott Perry <scperry@ucsd.edu>
|
||||||
Sean Reifschneider <jafo-rpms@tummy.com>
|
Sean Reifschneider <jafo-rpms@tummy.com>
|
||||||
Sebastian Köhler <sebkoehler@whoami.org.uk>
|
Sebastian Köhler <sebkoehler@whoami.org.uk>
|
||||||
Tassilo Schweyer <dev@welterde.de>
|
Tassilo Schweyer <dev@welterde.de>
|
||||||
|
Tom Ryder <tom@sanctum.geek.nz>
|
||||||
|
Unit 193 <unit193@ubuntu.com>
|
||||||
William Pitcock <nenolod@dereferenced.org>
|
William Pitcock <nenolod@dereferenced.org>
|
||||||
xor <xorboy@gmail.com>
|
xor <xorboy@gmail.com>
|
||||||
|
Yecheng Fu <cofyc.jackson@gmail.com>
|
||||||
|
|
||||||
|
|
||||||
Code snippets
|
Code snippets
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
J. Kercheval: pattern matching functions
|
|
||||||
Patrick Powell <papowell@astart.com>: snprintf()-function
|
|
||||||
Andrew Tridgell & Martin Pool: strl{cpy|cat}()-functions
|
Andrew Tridgell & Martin Pool: strl{cpy|cat}()-functions
|
||||||
|
John Kercheval: pattern matching functions
|
||||||
|
Patrick Powell <papowell@astart.com>: snprintf()-function
|
||||||
|
|||||||
219
ChangeLog
219
ChangeLog
@@ -2,13 +2,206 @@
|
|||||||
ngIRCd - Next Generation IRC Server
|
ngIRCd - Next Generation IRC Server
|
||||||
http://ngircd.barton.de/
|
http://ngircd.barton.de/
|
||||||
|
|
||||||
(c)2001-2015 Alexander Barton and Contributors.
|
(c)2001-2018 Alexander Barton and Contributors.
|
||||||
ngIRCd is free software and published under the
|
ngIRCd is free software and published under the
|
||||||
terms of the GNU General Public License.
|
terms of the GNU General Public License.
|
||||||
|
|
||||||
-- ChangeLog --
|
-- ChangeLog --
|
||||||
|
|
||||||
|
|
||||||
|
ngIRCd 25
|
||||||
|
|
||||||
|
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 NJON 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 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)
|
ngIRCd 22.1 (2015-04-06)
|
||||||
|
|
||||||
- Update doc/Platforms.txt and doc/FAQ.txt.
|
- Update doc/Platforms.txt and doc/FAQ.txt.
|
||||||
@@ -558,7 +751,7 @@ ngIRCd 19.2 (2012-06-19)
|
|||||||
"CC=xxx MAKE=yyy ./platformtest.sh" calling convention.
|
"CC=xxx MAKE=yyy ./platformtest.sh" calling convention.
|
||||||
- Add instructions for setting up Atheme IRC services.
|
- Add instructions for setting up Atheme IRC services.
|
||||||
- Implement support for IRC capability handling, the new "CAP" command,
|
- Implement support for IRC capability handling, the new "CAP" command,
|
||||||
and capablity "multi-prefix" which allows both the NAME and WHO command
|
and capability "multi-prefix" which allows both the NAME and WHO command
|
||||||
handlers to return more than one "class prefix" to the client.
|
handlers to return more than one "class prefix" to the client.
|
||||||
- Update Xcode project files: reference missing documentation files.
|
- Update Xcode project files: reference missing documentation files.
|
||||||
- Fix: Don't ignore "permission denied" errors when enabling chroot.
|
- Fix: Don't ignore "permission denied" errors when enabling chroot.
|
||||||
@@ -858,7 +1051,7 @@ ngIRCd 17 (2010-11-07)
|
|||||||
- contrib/platformtest.sh: make command name quoting consistent
|
- contrib/platformtest.sh: make command name quoting consistent
|
||||||
|
|
||||||
ngIRCd 17~rc3 (2010-10-27)
|
ngIRCd 17~rc3 (2010-10-27)
|
||||||
- Xcode builds: detect version number correctly, updateed project file
|
- 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
|
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
|
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.
|
PAM configuration for the Mac OS X Installer.app package of ngIRCd.
|
||||||
@@ -870,7 +1063,7 @@ ngIRCd 17 (2010-11-07)
|
|||||||
ngIRCd 17~rc2 (2010-10-25)
|
ngIRCd 17~rc2 (2010-10-25)
|
||||||
- ZeroConf: include header files missing since commit a988bbc86a.
|
- ZeroConf: include header files missing since commit a988bbc86a.
|
||||||
- Generate ngIRCd version number from GIT tag.
|
- Generate ngIRCd version number from GIT tag.
|
||||||
- Make sourcecode compatible with ansi2knr again. This allows to compile
|
- Make source code compatible with ansi2knr again. This allows to compile
|
||||||
ngIRCd using a pre-ANSI K&R C compiler again.
|
ngIRCd using a pre-ANSI K&R C compiler again.
|
||||||
- ./configure: check if C compiler can compile ISO Standard C.
|
- ./configure: check if C compiler can compile ISO Standard C.
|
||||||
- ./configure: check support for C prototypes again.
|
- ./configure: check support for C prototypes again.
|
||||||
@@ -886,7 +1079,7 @@ ngIRCd 17 (2010-11-07)
|
|||||||
Howl, Avahi or on Mac OS X).
|
Howl, Avahi or on Mac OS X).
|
||||||
- New configuration option "SyslogFacility" to define the syslog "facility"
|
- New configuration option "SyslogFacility" to define the syslog "facility"
|
||||||
(the "target"), to which ngIRCd should send its log messages.
|
(the "target"), to which ngIRCd should send its log messages.
|
||||||
Possible values are system dependant, but most probably "auth", "daemon",
|
Possible values are system dependent, but most probably "auth", "daemon",
|
||||||
"user" and "local1" through "local7" are possible values; see syslog(3).
|
"user" and "local1" through "local7" are possible values; see syslog(3).
|
||||||
Default is "local5" for historical reasons.
|
Default is "local5" for historical reasons.
|
||||||
- Dump the "internal server state" (configured servers, established
|
- Dump the "internal server state" (configured servers, established
|
||||||
@@ -907,7 +1100,7 @@ ngIRCd 17 (2010-11-07)
|
|||||||
- Make configure switch "--docdir" work (closes: #108).
|
- Make configure switch "--docdir" work (closes: #108).
|
||||||
- Reformat and update FAQ.txt a little bit.
|
- Reformat and update FAQ.txt a little bit.
|
||||||
- INSTALL: mention SSL, IPv6, and changed handling of MotdFile.
|
- INSTALL: mention SSL, IPv6, and changed handling of MotdFile.
|
||||||
- Change MOTD file handling: ngIRCd now caches the contens of the MOTD
|
- 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
|
file, so the daemon now requires a HUP signal or REHASH command to
|
||||||
re-read the MOTD file when its content changed.
|
re-read the MOTD file when its content changed.
|
||||||
- Startup: open /dev/null before chroot'ing the daemon.
|
- Startup: open /dev/null before chroot'ing the daemon.
|
||||||
@@ -943,14 +1136,14 @@ ngIRCd 16 (2010-05-02)
|
|||||||
- Include netinet/{in.h, in_systm.h} when checking for 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
|
- Only include <netinet/in_systm.h> if it exists
|
||||||
- Updated doc/Platforms.txt
|
- Updated doc/Platforms.txt
|
||||||
- Enhace connection statistics counters: display total number of served
|
- Enhance connection statistics counters: display total number of served
|
||||||
connections on daemon shutdown and when a new client connects using
|
connections on daemon shutdown and when a new client connects using
|
||||||
the new numeric RPL_STATSCONN (250).
|
the new numeric RPL_STATSCONN (250).
|
||||||
|
|
||||||
ngIRCd 16~rc1 (2010-03-25)
|
ngIRCd 16~rc1 (2010-03-25)
|
||||||
- Various fixes to the build system and code cleanups.
|
- Various fixes to the build system and code cleanups.
|
||||||
- contrib/platformtest.sh: Only show latest commit.
|
- contrib/platformtest.sh: Only show latest commit.
|
||||||
- Updatet doc/Platforms.txt, added new README-Interix.txt documenting
|
- Updated doc/Platforms.txt, added new README-Interix.txt documenting
|
||||||
how to tun ngIRCd on Microsoft Services for UNIX (MS SFU, MS SUA).
|
how to tun ngIRCd on Microsoft Services for UNIX (MS SFU, MS SUA).
|
||||||
- Updated links to the ngIRCd homepage (bug tracker, mailing list).
|
- Updated links to the ngIRCd homepage (bug tracker, mailing list).
|
||||||
- Added missing modes to USERMODES #define
|
- Added missing modes to USERMODES #define
|
||||||
@@ -978,7 +1171,7 @@ ngIRCd 15 (2009-11-07)
|
|||||||
ngIRCd 15~rc1 (2009-10-15)
|
ngIRCd 15~rc1 (2009-10-15)
|
||||||
- Do not add default listening port (6667) if SSL ports were specified, so
|
- Do not add default listening port (6667) if SSL ports were specified, so
|
||||||
ngIRCd can be configured to only accept SSL-encrypted connections now.
|
ngIRCd can be configured to only accept SSL-encrypted connections now.
|
||||||
- Enable IRC operators to use the IRC command SQUIT (insted of the already
|
- Enable IRC operators to use the IRC command SQUIT (instead of the already
|
||||||
implemented but non-standard DISCONNECT command).
|
implemented but non-standard DISCONNECT command).
|
||||||
- New configuration option "AllowRemoteOper" (disabled by default) that
|
- New configuration option "AllowRemoteOper" (disabled by default) that
|
||||||
enables remote IRC operators to use the IRC commands SQUIT and CONNECT
|
enables remote IRC operators to use the IRC commands SQUIT and CONNECT
|
||||||
@@ -1032,7 +1225,7 @@ ngIRCd 14 (2009-04-20)
|
|||||||
- Fix memory leak when a encrypted and compressed server link goes down.
|
- Fix memory leak when a encrypted and compressed server link goes down.
|
||||||
(closes bug #95, reported by Christoph, fiesh@fiesh.homeip.net)
|
(closes bug #95, reported by Christoph, fiesh@fiesh.homeip.net)
|
||||||
- Fix handling of channels containing dots.
|
- Fix handling of channels containing dots.
|
||||||
(closes ug #93, reported by Gonosz Csiga)
|
(closes bug #93, reported by Gonosz Csiga)
|
||||||
|
|
||||||
ngIRCd 13 (2008-12-25)
|
ngIRCd 13 (2008-12-25)
|
||||||
|
|
||||||
@@ -1262,7 +1455,7 @@ ngIRCd 0.9.0 (2005-07-24)
|
|||||||
- Fixed ./configure test for TCP Wrappers: now it runs on Mac OS X as well.
|
- 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
|
- Enhanced configure script: now you can pass an (optional) search path
|
||||||
to all --with-XXX parameters, e. g. "--with-ident=/opt/ident".
|
to all --with-XXX parameters, e. g. "--with-ident=/opt/ident".
|
||||||
- Removed typedefs for the native C datatypes.
|
- Removed typedefs for the native C data types.
|
||||||
Use stdbool.h / inttypes.h if available.
|
Use stdbool.h / inttypes.h if available.
|
||||||
- New configuration option "OperServerMode" to enable a workaround needed
|
- New configuration option "OperServerMode" to enable a workaround needed
|
||||||
when running an network with ircd2 servers and "OperCanUseMode" enabled
|
when running an network with ircd2 servers and "OperCanUseMode" enabled
|
||||||
@@ -1443,7 +1636,7 @@ ngIRCd 0.7.0 (2003-05-01)
|
|||||||
to add a new server (ngIRCd tries to connect new servers only once!).
|
to add a new server (ngIRCd tries to connect new servers only once!).
|
||||||
- Added DISCONNECT command ("DISCONNECT <name>") to disable servers.
|
- Added DISCONNECT command ("DISCONNECT <name>") to disable servers.
|
||||||
- Restructured the documentation: Now the main language is English. The
|
- Restructured the documentation: Now the main language is English. The
|
||||||
german documentation has been removed (until there is a maintainer).
|
German documentation has been removed (until there is a maintainer).
|
||||||
- Enhanced killing of users caused by a nickname collision.
|
- Enhanced killing of users caused by a nickname collision.
|
||||||
- Better error detection for status code ("numerics") forwarding.
|
- Better error detection for status code ("numerics") forwarding.
|
||||||
- Moved tool functions to own library: "libngtool".
|
- Moved tool functions to own library: "libngtool".
|
||||||
@@ -1484,7 +1677,7 @@ ngIRCd 0.6.1 (2003-01-21)
|
|||||||
member when changing his channel user modes which could crash ngIRCd.
|
member when changing his channel user modes which could crash ngIRCd.
|
||||||
|
|
||||||
|
|
||||||
Older changes (sorry, only available in german language):
|
Older changes (sorry, only available in German language):
|
||||||
|
|
||||||
ngIRCd 0.6.0, 24.12.2002
|
ngIRCd 0.6.0, 24.12.2002
|
||||||
|
|
||||||
|
|||||||
18
INSTALL
18
INSTALL
@@ -2,7 +2,7 @@
|
|||||||
ngIRCd - Next Generation IRC Server
|
ngIRCd - Next Generation IRC Server
|
||||||
http://ngircd.barton.de/
|
http://ngircd.barton.de/
|
||||||
|
|
||||||
(c)2001-2015 Alexander Barton and Contributors.
|
(c)2001-2018 Alexander Barton and Contributors.
|
||||||
ngIRCd is free software and published under the
|
ngIRCd is free software and published under the
|
||||||
terms of the GNU General Public License.
|
terms of the GNU General Public License.
|
||||||
|
|
||||||
@@ -14,6 +14,10 @@ I. Upgrade Information
|
|||||||
|
|
||||||
Differences to version 22.x
|
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
|
- The default value of the SSL "CipherList" variable has been changed to
|
||||||
"HIGH:!aNULL:@STRENGTH:!SSLv3" (OpenSSL) and "SECURE128:-VERS-SSL3.0"
|
"HIGH:!aNULL:@STRENGTH:!SSLv3" (OpenSSL) and "SECURE128:-VERS-SSL3.0"
|
||||||
(GnuTLS) to disable the old SSLv3 protocol by default.
|
(GnuTLS) to disable the old SSLv3 protocol by default.
|
||||||
@@ -32,6 +36,10 @@ Differences to version 20.x
|
|||||||
the new mask will be KILL'ed. This was not the case with earlier versions
|
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.
|
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
|
Differences to version 19.x
|
||||||
|
|
||||||
- Starting with ngIRCd 20, users can "cloak" their hostname only when the
|
- Starting with ngIRCd 20, users can "cloak" their hostname only when the
|
||||||
@@ -40,7 +48,7 @@ Differences to version 19.x
|
|||||||
set mode +x. This prevents regular users from changing their hostmask 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 ;-)
|
the name of the IRC server itself, which confused quite a few people ;-)
|
||||||
|
|
||||||
Differences to version 17
|
Differences to version 17.x
|
||||||
|
|
||||||
- Support for ZeroConf/Bonjour/Rendezvous service registration has been
|
- Support for ZeroConf/Bonjour/Rendezvous service registration has been
|
||||||
removed. The configuration option "NoZeroconf" is no longer available.
|
removed. The configuration option "NoZeroconf" is no longer available.
|
||||||
@@ -77,7 +85,7 @@ Differences to version 17
|
|||||||
You should adjust your ngircd.conf and run "ngircd --configtest" to make
|
You should adjust your ngircd.conf and run "ngircd --configtest" to make
|
||||||
sure that your settings are correct and up to date!
|
sure that your settings are correct and up to date!
|
||||||
|
|
||||||
Differences to version 16
|
Differences to version 16.x
|
||||||
|
|
||||||
- Changes to the "MotdFile" specified in ngircd.conf now require a ngircd
|
- Changes to the "MotdFile" specified in ngircd.conf now require a ngircd
|
||||||
configuration reload to take effect (HUP signal, REHASH command).
|
configuration reload to take effect (HUP signal, REHASH command).
|
||||||
@@ -154,7 +162,7 @@ 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
|
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:
|
build the sources including all optional features and to run the test suite:
|
||||||
|
|
||||||
* RedHat / Fedora based distributions:
|
* Red Hat / Fedora based distributions:
|
||||||
|
|
||||||
yum install \
|
yum install \
|
||||||
autoconf automake expect gcc glibc-devel gnutls-devel \
|
autoconf automake expect gcc glibc-devel gnutls-devel \
|
||||||
@@ -178,7 +186,7 @@ This step is therefore only interesting for developers.
|
|||||||
autogen.sh produces the Makefile.in's, which are necessary for the configure
|
autogen.sh produces the Makefile.in's, which are necessary for the configure
|
||||||
script itself, and some more files for make. To run autogen.sh you'll need
|
script itself, and some more files for make. To run autogen.sh you'll need
|
||||||
GNU autoconf and GNU automake: at least autoconf 2.61 and automake 1.10 are
|
GNU autoconf and GNU automake: at least autoconf 2.61 and automake 1.10 are
|
||||||
requird, newer is better. But don't use automake 1.12 or newer for creating
|
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
|
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 ...
|
generated Makefile's! Stick with automake 1.11.x for this purpose ...
|
||||||
So automake 1.11.x and autoconf 2.67+ is recommended.
|
So automake 1.11.x and autoconf 2.67+ is recommended.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# ngIRCd -- The Next Generation IRC Daemon
|
# ngIRCd -- The Next Generation IRC Daemon
|
||||||
# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
|
# Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -13,7 +13,7 @@ AUTOMAKE_OPTIONS = gnu
|
|||||||
|
|
||||||
SUBDIRS = doc src man contrib
|
SUBDIRS = doc src man contrib
|
||||||
|
|
||||||
EXTRA_DIST = autogen.sh configure.ng .mailmap
|
EXTRA_DIST = autogen.sh configure.ng .clang_complete .mailmap
|
||||||
|
|
||||||
clean-local: osxpkg-clean
|
clean-local: osxpkg-clean
|
||||||
rm -f build-stamp*
|
rm -f build-stamp*
|
||||||
|
|||||||
112
NEWS
112
NEWS
@@ -2,12 +2,108 @@
|
|||||||
ngIRCd - Next Generation IRC Server
|
ngIRCd - Next Generation IRC Server
|
||||||
http://ngircd.barton.de/
|
http://ngircd.barton.de/
|
||||||
|
|
||||||
(c)2001-2015 Alexander Barton and Contributors.
|
(c)2001-2018 Alexander Barton and Contributors.
|
||||||
ngIRCd is free software and published under the
|
ngIRCd is free software and published under the
|
||||||
terms of the GNU General Public License.
|
terms of the GNU General Public License.
|
||||||
|
|
||||||
-- NEWS --
|
-- NEWS --
|
||||||
|
|
||||||
|
ngIRCd 25
|
||||||
|
|
||||||
|
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 unecessary 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)
|
ngIRCd 22.1 (2015-04-06)
|
||||||
|
|
||||||
@@ -285,7 +381,7 @@ ngIRCd 19.2 (2012-06-19)
|
|||||||
which still is the default when "CloakHostModeX" isn't set.
|
which still is the default when "CloakHostModeX" isn't set.
|
||||||
- Add instructions for setting up Atheme IRC services.
|
- Add instructions for setting up Atheme IRC services.
|
||||||
- Implement support for IRC capability handling, the new "CAP" command,
|
- Implement support for IRC capability handling, the new "CAP" command,
|
||||||
and capablity "multi-prefix" which allows both the NAME and WHO command
|
and capability "multi-prefix" which allows both the NAME and WHO command
|
||||||
handlers to return more than one "class prefix" to the client.
|
handlers to return more than one "class prefix" to the client.
|
||||||
|
|
||||||
ngIRCd 19.1 (2012-03-19)
|
ngIRCd 19.1 (2012-03-19)
|
||||||
@@ -448,7 +544,7 @@ ngIRCd 17 (2010-11-07)
|
|||||||
|
|
||||||
ngIRCd 17~rc2 (2010-10-25)
|
ngIRCd 17~rc2 (2010-10-25)
|
||||||
- Generate ngIRCd version number from GIT tag.
|
- Generate ngIRCd version number from GIT tag.
|
||||||
- Make sourcecode compatible with ansi2knr again. This allows to compile
|
- Make source code compatible with ansi2knr again. This allows to compile
|
||||||
ngIRCd using a pre-ANSI K&R C compiler again.
|
ngIRCd using a pre-ANSI K&R C compiler again.
|
||||||
|
|
||||||
ngIRCd 17~rc1 (2010-10-11)
|
ngIRCd 17~rc1 (2010-10-11)
|
||||||
@@ -457,7 +553,7 @@ ngIRCd 17 (2010-11-07)
|
|||||||
Howl, Avahi or on Mac OS X).
|
Howl, Avahi or on Mac OS X).
|
||||||
- New configuration option "SyslogFacility" to define the syslog "facility"
|
- New configuration option "SyslogFacility" to define the syslog "facility"
|
||||||
(the "target"), to which ngIRCd should send its log messages.
|
(the "target"), to which ngIRCd should send its log messages.
|
||||||
Possible values are system dependant, but most probably "auth", "daemon",
|
Possible values are system dependent, but most probably "auth", "daemon",
|
||||||
"user" and "local1" through "local7" are possible values; see syslog(3).
|
"user" and "local1" through "local7" are possible values; see syslog(3).
|
||||||
Default is "local5" for historical reasons.
|
Default is "local5" for historical reasons.
|
||||||
- Dump the "internal server state" (configured servers, established
|
- Dump the "internal server state" (configured servers, established
|
||||||
@@ -467,7 +563,7 @@ ngIRCd 17 (2010-11-07)
|
|||||||
signal SIGUSR1, when debug code is compiled in, not only on startup
|
signal SIGUSR1, when debug code is compiled in, not only on startup
|
||||||
using the command line parameters.
|
using the command line parameters.
|
||||||
- Implement user mode "x": host name cloaking (closes: #102).
|
- Implement user mode "x": host name cloaking (closes: #102).
|
||||||
- Change MOTD file handling: ngIRCd now caches the contens of the MOTD
|
- 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
|
file, so the daemon now requires a HUP signal or REHASH command to
|
||||||
re-read the MOTD file when its content changed.
|
re-read the MOTD file when its content changed.
|
||||||
- Allow IRC ops to change channel modes even without OperServerMode set.
|
- Allow IRC ops to change channel modes even without OperServerMode set.
|
||||||
@@ -483,7 +579,7 @@ ngIRCd 17 (2010-11-07)
|
|||||||
ngIRCd 16 (2010-05-02)
|
ngIRCd 16 (2010-05-02)
|
||||||
|
|
||||||
ngIRCd 16~rc2 (2010-04-25)
|
ngIRCd 16~rc2 (2010-04-25)
|
||||||
- Enhace connection statistics counters: display total number of served
|
- Enhance connection statistics counters: display total number of served
|
||||||
connections on daemon shutdown and when a new client connects using
|
connections on daemon shutdown and when a new client connects using
|
||||||
the new numeric RPL_STATSCONN (250).
|
the new numeric RPL_STATSCONN (250).
|
||||||
|
|
||||||
@@ -505,7 +601,7 @@ ngIRCd 15 (2009-11-07)
|
|||||||
ngIRCd 15~rc1 (2009-10-15)
|
ngIRCd 15~rc1 (2009-10-15)
|
||||||
- Do not add default listening port (6667) if SSL ports were specified, so
|
- Do not add default listening port (6667) if SSL ports were specified, so
|
||||||
ngIRCd can be configured to only accept SSL-encrypted connections now.
|
ngIRCd can be configured to only accept SSL-encrypted connections now.
|
||||||
- Enable IRC operators to use the IRC command SQUIT (insted of the already
|
- Enable IRC operators to use the IRC command SQUIT (instead of the already
|
||||||
implemented but non-standard DISCONNECT command).
|
implemented but non-standard DISCONNECT command).
|
||||||
- New configuration option "AllowRemoteOper" (disabled by default) that
|
- New configuration option "AllowRemoteOper" (disabled by default) that
|
||||||
enables remote IRC operators to use the IRC commands SQUIT and CONNECT
|
enables remote IRC operators to use the IRC commands SQUIT and CONNECT
|
||||||
@@ -688,7 +784,7 @@ ngIRCd 0.7.0 (2003-05-01)
|
|||||||
- Documentation is now installed in $(datadir)/doc/ngircd.
|
- Documentation is now installed in $(datadir)/doc/ngircd.
|
||||||
|
|
||||||
|
|
||||||
Older news (sorry, only available in german language):
|
Older news (sorry, only available in German language):
|
||||||
|
|
||||||
ngIRCd 0.6.0, 24.12.2002
|
ngIRCd 0.6.0, 24.12.2002
|
||||||
|
|
||||||
|
|||||||
68
README
68
README
@@ -2,7 +2,7 @@
|
|||||||
ngIRCd - Next Generation IRC Server
|
ngIRCd - Next Generation IRC Server
|
||||||
http://ngircd.barton.de/
|
http://ngircd.barton.de/
|
||||||
|
|
||||||
(c)2001-2015 Alexander Barton and Contributors.
|
(c)2001-2018 Alexander Barton and Contributors.
|
||||||
ngIRCd is free software and published under the
|
ngIRCd is free software and published under the
|
||||||
terms of the GNU General Public License.
|
terms of the GNU General Public License.
|
||||||
|
|
||||||
@@ -28,31 +28,26 @@ Please see the INSTALL document for installation and upgrade information!
|
|||||||
II. Status
|
II. Status
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
||||||
It is not the goal of ngIRCd to implement all the nasty behaviours of the
|
ngIRCd should be quite feature complete and stable to be used as daemon in
|
||||||
|
real world IRC networks.
|
||||||
|
|
||||||
|
It is not the goal of ngIRCd to implement all the nasty behaviors of the
|
||||||
original ircd, but to implement most of the useful commands and semantics
|
original ircd, but to implement most of the useful commands and semantics
|
||||||
specified by the RFCs.
|
specified by the RFCs that are used by existing clients.
|
||||||
|
|
||||||
In the meantime ngIRCd should be quite feature complete and stable to be
|
|
||||||
used in real IRC networks.
|
|
||||||
|
|
||||||
Implemented IRC-commands are:
|
|
||||||
|
|
||||||
ADMIN, AWAY, CHANINFO, CONNECT, DIE, DISCONNECT, ERROR, GLINE, HELP, INFO,
|
|
||||||
INVITE, ISON, JOIN, KICK, KILL, KLINE, LINKS, LIST, LUSERS, MODE, MOTD,
|
|
||||||
NAMES, NICK, NJOIN, NOTICE, OPER, PART, PASS, PING, PONG, PRIVMSG, QUIT,
|
|
||||||
REHASH, RESTART, SERVER, SERVICE, SERVLIST, SQUERY, SQUIT, STATS, SUMMON,
|
|
||||||
TIME, TOPIC, TRACE, USER, USERHOST, USERS, VERSION, WALLOPS, WEBIRC, WHO,
|
|
||||||
WHOIS, WHOWAS.
|
|
||||||
|
|
||||||
III. Features (or: why use ngIRCd?)
|
III. Features (or: why use ngIRCd?)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
- well arranged (lean) configuration file
|
- Well arranged (lean) configuration file.
|
||||||
- simple to build/install, configure and maintain
|
- Simple to build, install, configure, and maintain.
|
||||||
- supports IPv6 and SSL
|
- Supports IPv6 and SSL.
|
||||||
- no problems with servers that have dynamic IP addresses
|
- Can use PAM for user authentication.
|
||||||
- freely available, modern, portable and tidy C-source
|
- Lots of popular user and channel modes are implemented.
|
||||||
- wide field of supported platforms, including AIX, A/UX, FreeBSD, HP-UX,
|
- 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, Mac OS X, NetBSD, OpenBSD, Solaris, and Windows with Cygwin.
|
IRIX, Linux, Mac OS X, NetBSD, OpenBSD, Solaris, and Windows with Cygwin.
|
||||||
- ngIRCd is being actively developed since 2001.
|
- ngIRCd is being actively developed since 2001.
|
||||||
|
|
||||||
@@ -61,33 +56,34 @@ IV. Documentation
|
|||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
More documentation can be found in the "doc/" directory and the homepage of
|
More documentation can be found in the "doc/" directory and the homepage of
|
||||||
the ngIRCd: <http://ngircd.barton.de/>.
|
ngIRCd: <http://ngircd.barton.de/>.
|
||||||
|
|
||||||
|
|
||||||
V. Download
|
V. Download
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
||||||
The homepage of the ngIRCd is: <http://ngircd.barton.de/>; you will find
|
The homepage of the ngIRCd is <http://ngircd.barton.de/>; you will find
|
||||||
the newest information about the ngIRCd and the most recent ("stable")
|
the newest information about the ngIRCd and the most recent ("stable")
|
||||||
releases there.
|
releases there.
|
||||||
|
|
||||||
If you are interested in the latest development versions (which are not
|
Visit our source code repository at GitHub if you are interested in the
|
||||||
always stable), then please read the section about "GIT" on the homepage and
|
latest development version: <https://github.com/ngircd/ngircd>.
|
||||||
the file "doc/GIT.txt" which describes the use of GIT, the version control
|
|
||||||
system used by ngIRCd (homepage: http://git-scm.com/).
|
|
||||||
|
|
||||||
|
|
||||||
VI. Bugs
|
VI. Problems, Bugs, Patches
|
||||||
~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
If you find bugs in the ngIRCd (which might be there :-), please report
|
Please don't hesitate to contact us if you encounter problems:
|
||||||
them at the following URL:
|
|
||||||
|
|
||||||
<http://ngircd.barton.de/bugtracker.php>
|
- On IRC: <irc://irc.barton.de/ngircd>
|
||||||
|
- Via the mailing list: <ngircd-ml@ngircd.barton.de>
|
||||||
|
|
||||||
|
See <http://ngircd.barton.de/support.php> for details.
|
||||||
|
|
||||||
|
If you find bugs in ngIRCd (which will be there most probably ...), 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>
|
||||||
|
|
||||||
There you can read about known bugs and limitations, too.
|
There you can read about known bugs and limitations, too.
|
||||||
|
|
||||||
If you have critics, patches or something else, please feel free to post a
|
|
||||||
mail to the ngIRCd mailing list: <ngircd-ml@arthur.barton.de> (please see
|
|
||||||
<http://ngircd.barton.de/support.php#ml> for details) or join the ngIRCd
|
|
||||||
IRC channel: <irc://irc.barton.de/ngircd>.
|
|
||||||
|
|||||||
43
autogen.sh
43
autogen.sh
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# ngIRCd -- The Next Generation IRC Daemon
|
# ngIRCd -- The Next Generation IRC Daemon
|
||||||
# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
|
# Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -95,7 +95,7 @@ Search()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
minor=`expr $minor - 1`
|
minor=$(expr $minor - 1)
|
||||||
done
|
done
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
@@ -109,8 +109,8 @@ Notfound()
|
|||||||
|
|
||||||
Run()
|
Run()
|
||||||
{
|
{
|
||||||
[ "$VERBOSE" = "1" ] && echo " - running \"$@\" ..."
|
[ "$VERBOSE" = "1" ] && echo " - running \"$*\" ..."
|
||||||
$@
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Reset locale settings to suppress warning messages of Perl
|
# Reset locale settings to suppress warning messages of Perl
|
||||||
@@ -139,26 +139,26 @@ fi
|
|||||||
# Try to detect the needed tools when no environment variable already
|
# Try to detect the needed tools when no environment variable already
|
||||||
# specifies one:
|
# specifies one:
|
||||||
echo "Searching for required tools ..."
|
echo "Searching for required tools ..."
|
||||||
[ -z "$ACLOCAL" ] && ACLOCAL=`Search aclocal 1`
|
[ -z "$ACLOCAL" ] && ACLOCAL=$(Search aclocal 1)
|
||||||
[ "$VERBOSE" = "1" ] && echo " - ACLOCAL=$ACLOCAL"
|
[ "$VERBOSE" = "1" ] && echo " - ACLOCAL=$ACLOCAL"
|
||||||
[ -z "$AUTOHEADER" ] && AUTOHEADER=`Search autoheader 2`
|
[ -z "$AUTOHEADER" ] && AUTOHEADER=$(Search autoheader 2)
|
||||||
[ "$VERBOSE" = "1" ] && echo " - AUTOHEADER=$AUTOHEADER"
|
[ "$VERBOSE" = "1" ] && echo " - AUTOHEADER=$AUTOHEADER"
|
||||||
[ -z "$AUTOMAKE" ] && AUTOMAKE=`Search automake 1`
|
[ -z "$AUTOMAKE" ] && AUTOMAKE=$(Search automake 1)
|
||||||
[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE=$AUTOMAKE"
|
[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE=$AUTOMAKE"
|
||||||
[ -z "$AUTOCONF" ] && AUTOCONF=`Search autoconf 2`
|
[ -z "$AUTOCONF" ] && AUTOCONF=$(Search autoconf 2)
|
||||||
[ "$VERBOSE" = "1" ] && echo " - AUTOCONF=$AUTOCONF"
|
[ "$VERBOSE" = "1" ] && echo " - AUTOCONF=$AUTOCONF"
|
||||||
|
|
||||||
AUTOCONF_VERSION=`echo $AUTOCONF | cut -d'-' -f2-`
|
AUTOCONF_VERSION=$(echo "$AUTOCONF" | cut -d'-' -f2-)
|
||||||
[ -n "$AUTOCONF_VERSION" -a "$AUTOCONF_VERSION" != "autoconf" ] \
|
[ -n "$AUTOCONF_VERSION" ] && [ "$AUTOCONF_VERSION" != "autoconf" ] \
|
||||||
&& export AUTOCONF_VERSION || unset AUTOCONF_VERSION
|
&& export AUTOCONF_VERSION || unset AUTOCONF_VERSION
|
||||||
[ "$VERBOSE" = "1" ] && echo " - AUTOCONF_VERSION=$AUTOCONF_VERSION"
|
[ "$VERBOSE" = "1" ] && echo " - AUTOCONF_VERSION=$AUTOCONF_VERSION"
|
||||||
AUTOMAKE_VERSION=`echo $AUTOMAKE | cut -d'-' -f2-`
|
AUTOMAKE_VERSION=$(echo $AUTOMAKE | cut -d'-' -f2-)
|
||||||
[ -n "$AUTOMAKE_VERSION" -a "$AUTOMAKE_VERSION" != "automake" ] \
|
[ -n "$AUTOMAKE_VERSION" ] && [ "$AUTOMAKE_VERSION" != "automake" ] \
|
||||||
&& export AUTOMAKE_VERSION || unset AUTOMAKE_VERSION
|
&& export AUTOMAKE_VERSION || unset AUTOMAKE_VERSION
|
||||||
[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE_VERSION=$AUTOMAKE_VERSION"
|
[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE_VERSION=$AUTOMAKE_VERSION"
|
||||||
|
|
||||||
[ $# -gt 0 ] && CONFIGURE_ARGS=" $@" || CONFIGURE_ARGS=""
|
[ $# -gt 0 ] && CONFIGURE_ARGS=" $*" || CONFIGURE_ARGS=""
|
||||||
[ -z "$GO" -a -n "$CONFIGURE_ARGS" ] && GO=1
|
[ -z "$GO" ] && [ -n "$CONFIGURE_ARGS" ] && GO=1
|
||||||
|
|
||||||
# Verify that all tools have been found
|
# Verify that all tools have been found
|
||||||
[ -z "$ACLOCAL" ] && Notfound aclocal
|
[ -z "$ACLOCAL" ] && Notfound aclocal
|
||||||
@@ -166,15 +166,15 @@ AUTOMAKE_VERSION=`echo $AUTOMAKE | cut -d'-' -f2-`
|
|||||||
[ -z "$AUTOMAKE" ] && Notfound automake
|
[ -z "$AUTOMAKE" ] && Notfound automake
|
||||||
[ -z "$AUTOCONF" ] && Notfound autoconf
|
[ -z "$AUTOCONF" ] && Notfound autoconf
|
||||||
|
|
||||||
AM_VERSION=`$AUTOMAKE --version | head -n 1 | sed -e 's/.* //g'`
|
AM_VERSION=$($AUTOMAKE --version | head -n 1 | sed -e 's/.* //g')
|
||||||
ifs=$IFS; IFS="."; set $AM_VERSION; IFS=$ifs
|
ifs=$IFS; IFS="."; set $AM_VERSION; IFS=$ifs
|
||||||
AM_MAJOR="$1"; AM_MINOR="$2"; AM_PATCHLEVEL="$3"
|
AM_MAJOR="$1"; AM_MINOR="$2"
|
||||||
echo "Detected automake $AM_VERSION ..."
|
echo "Detected automake $AM_VERSION ..."
|
||||||
|
|
||||||
AM_MAKEFILES="src/ipaddr/Makefile.ng src/ngircd/Makefile.ng src/testsuite/Makefile.ng src/tool/Makefile.ng"
|
AM_MAKEFILES="src/ipaddr/Makefile.ng src/ngircd/Makefile.ng src/testsuite/Makefile.ng src/tool/Makefile.ng"
|
||||||
|
|
||||||
# De-ANSI-fication?
|
# De-ANSI-fication?
|
||||||
if [ "$AM_MAJOR" -eq "1" -a "$AM_MINOR" -lt "12" ]; then
|
if [ "$AM_MAJOR" -eq "1" ] && [ "$AM_MINOR" -lt "12" ]; then
|
||||||
# automake < 1.12 => automatic de-ANSI-fication support available
|
# automake < 1.12 => automatic de-ANSI-fication support available
|
||||||
echo " - Enabling de-ANSI-fication support."
|
echo " - Enabling de-ANSI-fication support."
|
||||||
sed -e "s|^__ng_PROTOTYPES__|AM_C_PROTOTYPES|g" configure.ng >configure.ac
|
sed -e "s|^__ng_PROTOTYPES__|AM_C_PROTOTYPES|g" configure.ng >configure.ac
|
||||||
@@ -188,19 +188,20 @@ else
|
|||||||
DEANSI_END=" (disabled by ./autogen.sh script)"
|
DEANSI_END=" (disabled by ./autogen.sh script)"
|
||||||
fi
|
fi
|
||||||
# Serial test harness?
|
# Serial test harness?
|
||||||
if [ "$AM_MAJOR" -eq "1" -a "$AM_MINOR" -ge "13" ]; then
|
if [ "$AM_MAJOR" -eq "1" ] && [ "$AM_MINOR" -ge "13" ]; then
|
||||||
# automake >= 1.13 => enforce "serial test harness"
|
# automake >= 1.13 => enforce "serial test harness"
|
||||||
echo " - Enforcing serial test harness."
|
echo " - Enforcing serial test harness."
|
||||||
SERIAL_TESTS="serial-tests"
|
SERIAL_TESTS="serial-tests"
|
||||||
else
|
else
|
||||||
# automake < 1.13 => no new test harness, nothing to do
|
# automake < 1.13 => no new test harness, nothing to do
|
||||||
|
# shellcheck disable=SC2034
|
||||||
SERIAL_TEST=""
|
SERIAL_TEST=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -e "s|^__ng_Makefile_am_template__|AUTOMAKE_OPTIONS = ${SERIAL_TESTS} ${DEANSI_START}ansi2knr${DEANSI_END}|g" \
|
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
|
src/portab/Makefile.ng >src/portab/Makefile.am
|
||||||
for makefile_ng in $AM_MAKEFILES; do
|
for makefile_ng in $AM_MAKEFILES; do
|
||||||
makefile_am=`echo "$makefile_ng" | sed -e "s|\.ng\$|\.am|g"`
|
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" \
|
sed -e "s|^__ng_Makefile_am_template__|AUTOMAKE_OPTIONS = ${SERIAL_TESTS} ${DEANSI_START}../portab/ansi2knr${DEANSI_END}|g" \
|
||||||
$makefile_ng >$makefile_am
|
$makefile_ng >$makefile_am
|
||||||
done
|
done
|
||||||
@@ -214,10 +215,10 @@ Run $ACLOCAL && \
|
|||||||
Run $AUTOHEADER && \
|
Run $AUTOHEADER && \
|
||||||
Run $AUTOMAKE --add-missing --no-force
|
Run $AUTOMAKE --add-missing --no-force
|
||||||
|
|
||||||
if [ $? -eq 0 -a -x ./configure ]; then
|
if [ $? -eq 0 ] && [ -x ./configure ]; then
|
||||||
# Success: if we got some parameters we call ./configure and pass
|
# Success: if we got some parameters we call ./configure and pass
|
||||||
# all of them to it.
|
# all of them to it.
|
||||||
NAME=`grep PACKAGE_STRING= configure | cut -d"'" -f2`
|
NAME=$(grep PACKAGE_STRING= configure | cut -d"'" -f2)
|
||||||
if [ "$GO" = "1" ]; then
|
if [ "$GO" = "1" ]; then
|
||||||
[ -n "$PREFIX" ] && p=" --prefix=$PREFIX" || p=""
|
[ -n "$PREFIX" ] && p=" --prefix=$PREFIX" || p=""
|
||||||
c="./configure${p}${CONFIGURE_ARGS}"
|
c="./configure${p}${CONFIGURE_ARGS}"
|
||||||
|
|||||||
688
config.guess
vendored
688
config.guess
vendored
File diff suppressed because it is too large
Load Diff
319
config.sub
vendored
319
config.sub
vendored
@@ -1,8 +1,8 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright 1992-2014 Free Software Foundation, Inc.
|
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2014-05-01'
|
timestamp='2018-03-08'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# 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
|
# under the terms of the GNU General Public License as published by
|
||||||
@@ -15,7 +15,7 @@ timestamp='2014-05-01'
|
|||||||
# General Public License for more details.
|
# General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# As a special exception to the GNU General Public License, if you
|
# As a special exception to the GNU General Public License, if you
|
||||||
# distribute this file as part of a program that contains a
|
# distribute this file as part of a program that contains a
|
||||||
@@ -25,7 +25,7 @@ timestamp='2014-05-01'
|
|||||||
# of the GNU General Public License, version 3 ("GPLv3").
|
# of the GNU General Public License, version 3 ("GPLv3").
|
||||||
|
|
||||||
|
|
||||||
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
# Please send patches to <config-patches@gnu.org>.
|
||||||
#
|
#
|
||||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||||
# Supply the specified configuration type as an argument.
|
# Supply the specified configuration type as an argument.
|
||||||
@@ -33,7 +33,7 @@ timestamp='2014-05-01'
|
|||||||
# Otherwise, we print the canonical config type on stdout and succeed.
|
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||||
|
|
||||||
# You can get the latest version of this script from:
|
# You can get the latest version of this script from:
|
||||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
||||||
|
|
||||||
# This file is supposed to be the same for all GNU packages
|
# This file is supposed to be the same for all GNU packages
|
||||||
# and recognize all the CPU types, system types and aliases
|
# and recognize all the CPU types, system types and aliases
|
||||||
@@ -53,12 +53,11 @@ timestamp='2014-05-01'
|
|||||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||||
|
|
||||||
usage="\
|
usage="\
|
||||||
Usage: $0 [OPTION] CPU-MFR-OPSYS
|
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
|
||||||
$0 [OPTION] ALIAS
|
|
||||||
|
|
||||||
Canonicalize a configuration name.
|
Canonicalize a configuration name.
|
||||||
|
|
||||||
Operation modes:
|
Options:
|
||||||
-h, --help print this help, then exit
|
-h, --help print this help, then exit
|
||||||
-t, --time-stamp print date of last modification, then exit
|
-t, --time-stamp print date of last modification, then exit
|
||||||
-v, --version print version number, then exit
|
-v, --version print version number, then exit
|
||||||
@@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||||||
version="\
|
version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright 1992-2014 Free Software Foundation, Inc.
|
Copyright 1992-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
@@ -95,7 +94,7 @@ while test $# -gt 0 ; do
|
|||||||
|
|
||||||
*local*)
|
*local*)
|
||||||
# First pass through any local machine types.
|
# First pass through any local machine types.
|
||||||
echo $1
|
echo "$1"
|
||||||
exit ;;
|
exit ;;
|
||||||
|
|
||||||
* )
|
* )
|
||||||
@@ -113,24 +112,24 @@ esac
|
|||||||
|
|
||||||
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
|
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
|
||||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||||
case $maybe_os in
|
case $maybe_os in
|
||||||
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||||
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||||
knetbsd*-gnu* | netbsd*-gnu* | \
|
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
|
||||||
kopensolaris*-gnu* | \
|
kopensolaris*-gnu* | cloudabi*-eabi* | \
|
||||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||||
os=-$maybe_os
|
os=-$maybe_os
|
||||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||||
;;
|
;;
|
||||||
android-linux)
|
android-linux)
|
||||||
os=-linux-android
|
os=-linux-android
|
||||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
|
basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
|
||||||
if [ $basic_machine != $1 ]
|
if [ "$basic_machine" != "$1" ]
|
||||||
then os=`echo $1 | sed 's/.*-/-/'`
|
then os=`echo "$1" | sed 's/.*-/-/'`
|
||||||
else os=; fi
|
else os=; fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -179,44 +178,44 @@ case $os in
|
|||||||
;;
|
;;
|
||||||
-sco6)
|
-sco6)
|
||||||
os=-sco5v6
|
os=-sco5v6
|
||||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco5)
|
-sco5)
|
||||||
os=-sco3.2v5
|
os=-sco3.2v5
|
||||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco4)
|
-sco4)
|
||||||
os=-sco3.2v4
|
os=-sco3.2v4
|
||||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco3.2.[4-9]*)
|
-sco3.2.[4-9]*)
|
||||||
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
||||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco3.2v[4-9]*)
|
-sco3.2v[4-9]*)
|
||||||
# Don't forget version if it is 3.2v4 or newer.
|
# Don't forget version if it is 3.2v4 or newer.
|
||||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco5v6*)
|
-sco5v6*)
|
||||||
# Don't forget version if it is 3.2v4 or newer.
|
# Don't forget version if it is 3.2v4 or newer.
|
||||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco*)
|
-sco*)
|
||||||
os=-sco3.2v2
|
os=-sco3.2v2
|
||||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-udk*)
|
-udk*)
|
||||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-isc)
|
-isc)
|
||||||
os=-isc2.2
|
os=-isc2.2
|
||||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-clix*)
|
-clix*)
|
||||||
basic_machine=clipper-intergraph
|
basic_machine=clipper-intergraph
|
||||||
;;
|
;;
|
||||||
-isc*)
|
-isc*)
|
||||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-lynx*178)
|
-lynx*178)
|
||||||
os=-lynxos178
|
os=-lynxos178
|
||||||
@@ -228,10 +227,7 @@ case $os in
|
|||||||
os=-lynxos
|
os=-lynxos
|
||||||
;;
|
;;
|
||||||
-ptx*)
|
-ptx*)
|
||||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
|
basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
|
||||||
;;
|
|
||||||
-windowsnt*)
|
|
||||||
os=`echo $os | sed -e 's/windowsnt/winnt/'`
|
|
||||||
;;
|
;;
|
||||||
-psos*)
|
-psos*)
|
||||||
os=-psos
|
os=-psos
|
||||||
@@ -255,15 +251,16 @@ case $basic_machine in
|
|||||||
| arc | arceb \
|
| arc | arceb \
|
||||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||||
| avr | avr32 \
|
| avr | avr32 \
|
||||||
|
| ba \
|
||||||
| be32 | be64 \
|
| be32 | be64 \
|
||||||
| bfin \
|
| bfin \
|
||||||
| c4x | c8051 | clipper \
|
| c4x | c8051 | clipper \
|
||||||
| d10v | d30v | dlx | dsp16xx \
|
| d10v | d30v | dlx | dsp16xx \
|
||||||
| epiphany \
|
| e2k | epiphany \
|
||||||
| fido | fr30 | frv \
|
| fido | fr30 | frv | ft32 \
|
||||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||||
| hexagon \
|
| hexagon \
|
||||||
| i370 | i860 | i960 | ia64 \
|
| i370 | i860 | i960 | ia16 | ia64 \
|
||||||
| ip2k | iq2000 \
|
| ip2k | iq2000 \
|
||||||
| k1om \
|
| k1om \
|
||||||
| le32 | le64 \
|
| le32 | le64 \
|
||||||
@@ -299,12 +296,14 @@ case $basic_machine in
|
|||||||
| nios | nios2 | nios2eb | nios2el \
|
| nios | nios2 | nios2eb | nios2el \
|
||||||
| ns16k | ns32k \
|
| ns16k | ns32k \
|
||||||
| open8 | or1k | or1knd | or32 \
|
| open8 | or1k | or1knd | or32 \
|
||||||
| pdp10 | pdp11 | pj | pjl \
|
| pdp10 | pj | pjl \
|
||||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||||
|
| pru \
|
||||||
| pyramid \
|
| pyramid \
|
||||||
|
| riscv32 | riscv64 \
|
||||||
| rl78 | rx \
|
| rl78 | rx \
|
||||||
| score \
|
| score \
|
||||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||||
| sh64 | sh64le \
|
| sh64 | sh64le \
|
||||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||||
@@ -312,7 +311,8 @@ case $basic_machine in
|
|||||||
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||||
| ubicom32 \
|
| ubicom32 \
|
||||||
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
||||||
| we32k \
|
| visium \
|
||||||
|
| wasm32 \
|
||||||
| x86 | xc16x | xstormy16 | xtensa \
|
| x86 | xc16x | xstormy16 | xtensa \
|
||||||
| z8k | z80)
|
| z8k | z80)
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
@@ -326,11 +326,14 @@ case $basic_machine in
|
|||||||
c6x)
|
c6x)
|
||||||
basic_machine=tic6x-unknown
|
basic_machine=tic6x-unknown
|
||||||
;;
|
;;
|
||||||
|
leon|leon[3-9])
|
||||||
|
basic_machine=sparc-$basic_machine
|
||||||
|
;;
|
||||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
os=-none
|
os=-none
|
||||||
;;
|
;;
|
||||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
|
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
|
||||||
;;
|
;;
|
||||||
ms1)
|
ms1)
|
||||||
basic_machine=mt-unknown
|
basic_machine=mt-unknown
|
||||||
@@ -359,7 +362,7 @@ case $basic_machine in
|
|||||||
;;
|
;;
|
||||||
# Object if more than one company name word.
|
# Object if more than one company name word.
|
||||||
*-*-*)
|
*-*-*)
|
||||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
# Recognize the basic CPU types with company name.
|
# Recognize the basic CPU types with company name.
|
||||||
@@ -371,17 +374,18 @@ case $basic_machine in
|
|||||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
||||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||||
| avr-* | avr32-* \
|
| avr-* | avr32-* \
|
||||||
|
| ba-* \
|
||||||
| be32-* | be64-* \
|
| be32-* | be64-* \
|
||||||
| bfin-* | bs2000-* \
|
| bfin-* | bs2000-* \
|
||||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||||
| c8051-* | clipper-* | craynv-* | cydra-* \
|
| c8051-* | clipper-* | craynv-* | cydra-* \
|
||||||
| d10v-* | d30v-* | dlx-* \
|
| d10v-* | d30v-* | dlx-* \
|
||||||
| elxsi-* \
|
| e2k-* | elxsi-* \
|
||||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||||
| h8300-* | h8500-* \
|
| h8300-* | h8500-* \
|
||||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||||
| hexagon-* \
|
| hexagon-* \
|
||||||
| i*86-* | i860-* | i960-* | ia64-* \
|
| i*86-* | i860-* | i960-* | ia16-* | ia64-* \
|
||||||
| ip2k-* | iq2000-* \
|
| ip2k-* | iq2000-* \
|
||||||
| k1om-* \
|
| k1om-* \
|
||||||
| le32-* | le64-* \
|
| le32-* | le64-* \
|
||||||
@@ -422,13 +426,15 @@ case $basic_machine in
|
|||||||
| orion-* \
|
| orion-* \
|
||||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||||
|
| pru-* \
|
||||||
| pyramid-* \
|
| pyramid-* \
|
||||||
|
| riscv32-* | riscv64-* \
|
||||||
| rl78-* | romp-* | rs6000-* | rx-* \
|
| rl78-* | romp-* | rs6000-* | rx-* \
|
||||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||||
| sparclite-* \
|
| sparclite-* \
|
||||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
|
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
|
||||||
| tahoe-* \
|
| tahoe-* \
|
||||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||||
| tile*-* \
|
| tile*-* \
|
||||||
@@ -436,6 +442,8 @@ case $basic_machine in
|
|||||||
| ubicom32-* \
|
| ubicom32-* \
|
||||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||||
| vax-* \
|
| vax-* \
|
||||||
|
| visium-* \
|
||||||
|
| wasm32-* \
|
||||||
| we32k-* \
|
| we32k-* \
|
||||||
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
||||||
| xstormy16-* | xtensa*-* \
|
| xstormy16-* | xtensa*-* \
|
||||||
@@ -449,7 +457,7 @@ case $basic_machine in
|
|||||||
# Recognize the various machine names and aliases which stand
|
# Recognize the various machine names and aliases which stand
|
||||||
# for a CPU type and a company and sometimes even an OS.
|
# for a CPU type and a company and sometimes even an OS.
|
||||||
386bsd)
|
386bsd)
|
||||||
basic_machine=i386-unknown
|
basic_machine=i386-pc
|
||||||
os=-bsd
|
os=-bsd
|
||||||
;;
|
;;
|
||||||
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
||||||
@@ -483,7 +491,7 @@ case $basic_machine in
|
|||||||
basic_machine=x86_64-pc
|
basic_machine=x86_64-pc
|
||||||
;;
|
;;
|
||||||
amd64-*)
|
amd64-*)
|
||||||
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
amdahl)
|
amdahl)
|
||||||
basic_machine=580-amdahl
|
basic_machine=580-amdahl
|
||||||
@@ -512,6 +520,9 @@ case $basic_machine in
|
|||||||
basic_machine=i386-pc
|
basic_machine=i386-pc
|
||||||
os=-aros
|
os=-aros
|
||||||
;;
|
;;
|
||||||
|
asmjs)
|
||||||
|
basic_machine=asmjs-unknown
|
||||||
|
;;
|
||||||
aux)
|
aux)
|
||||||
basic_machine=m68k-apple
|
basic_machine=m68k-apple
|
||||||
os=-aux
|
os=-aux
|
||||||
@@ -525,7 +536,7 @@ case $basic_machine in
|
|||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
blackfin-*)
|
blackfin-*)
|
||||||
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
bluegene*)
|
bluegene*)
|
||||||
@@ -533,13 +544,13 @@ case $basic_machine in
|
|||||||
os=-cnk
|
os=-cnk
|
||||||
;;
|
;;
|
||||||
c54x-*)
|
c54x-*)
|
||||||
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
c55x-*)
|
c55x-*)
|
||||||
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
c6x-*)
|
c6x-*)
|
||||||
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
c90)
|
c90)
|
||||||
basic_machine=c90-cray
|
basic_machine=c90-cray
|
||||||
@@ -628,10 +639,18 @@ case $basic_machine in
|
|||||||
basic_machine=rs6000-bull
|
basic_machine=rs6000-bull
|
||||||
os=-bosx
|
os=-bosx
|
||||||
;;
|
;;
|
||||||
dpx2* | dpx2*-bull)
|
dpx2*)
|
||||||
basic_machine=m68k-bull
|
basic_machine=m68k-bull
|
||||||
os=-sysv3
|
os=-sysv3
|
||||||
;;
|
;;
|
||||||
|
e500v[12])
|
||||||
|
basic_machine=powerpc-unknown
|
||||||
|
os=$os"spe"
|
||||||
|
;;
|
||||||
|
e500v[12]-*)
|
||||||
|
basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
|
os=$os"spe"
|
||||||
|
;;
|
||||||
ebmon29k)
|
ebmon29k)
|
||||||
basic_machine=a29k-amd
|
basic_machine=a29k-amd
|
||||||
os=-ebmon
|
os=-ebmon
|
||||||
@@ -721,9 +740,6 @@ case $basic_machine in
|
|||||||
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
||||||
basic_machine=hppa1.0-hp
|
basic_machine=hppa1.0-hp
|
||||||
;;
|
;;
|
||||||
hppa-next)
|
|
||||||
os=-nextstep3
|
|
||||||
;;
|
|
||||||
hppaosf)
|
hppaosf)
|
||||||
basic_machine=hppa1.1-hp
|
basic_machine=hppa1.1-hp
|
||||||
os=-osf
|
os=-osf
|
||||||
@@ -736,26 +752,26 @@ case $basic_machine in
|
|||||||
basic_machine=i370-ibm
|
basic_machine=i370-ibm
|
||||||
;;
|
;;
|
||||||
i*86v32)
|
i*86v32)
|
||||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
||||||
os=-sysv32
|
os=-sysv32
|
||||||
;;
|
;;
|
||||||
i*86v4*)
|
i*86v4*)
|
||||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
||||||
os=-sysv4
|
os=-sysv4
|
||||||
;;
|
;;
|
||||||
i*86v)
|
i*86v)
|
||||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
i*86sol2)
|
i*86sol2)
|
||||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
||||||
os=-solaris2
|
os=-solaris2
|
||||||
;;
|
;;
|
||||||
i386mach)
|
i386mach)
|
||||||
basic_machine=i386-mach
|
basic_machine=i386-mach
|
||||||
os=-mach
|
os=-mach
|
||||||
;;
|
;;
|
||||||
i386-vsta | vsta)
|
vsta)
|
||||||
basic_machine=i386-unknown
|
basic_machine=i386-unknown
|
||||||
os=-vsta
|
os=-vsta
|
||||||
;;
|
;;
|
||||||
@@ -773,17 +789,17 @@ case $basic_machine in
|
|||||||
basic_machine=m68k-isi
|
basic_machine=m68k-isi
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
|
leon-*|leon[3-9]-*)
|
||||||
|
basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
|
||||||
|
;;
|
||||||
m68knommu)
|
m68knommu)
|
||||||
basic_machine=m68k-unknown
|
basic_machine=m68k-unknown
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
m68knommu-*)
|
m68knommu-*)
|
||||||
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
m88k-omron*)
|
|
||||||
basic_machine=m88k-omron
|
|
||||||
;;
|
|
||||||
magnum | m3230)
|
magnum | m3230)
|
||||||
basic_machine=mips-mips
|
basic_machine=mips-mips
|
||||||
os=-sysv
|
os=-sysv
|
||||||
@@ -815,10 +831,10 @@ case $basic_machine in
|
|||||||
os=-mint
|
os=-mint
|
||||||
;;
|
;;
|
||||||
mips3*-*)
|
mips3*-*)
|
||||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
|
||||||
;;
|
;;
|
||||||
mips3*)
|
mips3*)
|
||||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
|
||||||
;;
|
;;
|
||||||
monitor)
|
monitor)
|
||||||
basic_machine=m68k-rom68k
|
basic_machine=m68k-rom68k
|
||||||
@@ -828,12 +844,16 @@ case $basic_machine in
|
|||||||
basic_machine=powerpc-unknown
|
basic_machine=powerpc-unknown
|
||||||
os=-morphos
|
os=-morphos
|
||||||
;;
|
;;
|
||||||
|
moxiebox)
|
||||||
|
basic_machine=moxie-unknown
|
||||||
|
os=-moxiebox
|
||||||
|
;;
|
||||||
msdos)
|
msdos)
|
||||||
basic_machine=i386-pc
|
basic_machine=i386-pc
|
||||||
os=-msdos
|
os=-msdos
|
||||||
;;
|
;;
|
||||||
ms1-*)
|
ms1-*)
|
||||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
|
||||||
;;
|
;;
|
||||||
msys)
|
msys)
|
||||||
basic_machine=i686-pc
|
basic_machine=i686-pc
|
||||||
@@ -875,7 +895,7 @@ case $basic_machine in
|
|||||||
basic_machine=v70-nec
|
basic_machine=v70-nec
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
next | m*-next )
|
next | m*-next)
|
||||||
basic_machine=m68k-next
|
basic_machine=m68k-next
|
||||||
case $os in
|
case $os in
|
||||||
-nextstep* )
|
-nextstep* )
|
||||||
@@ -920,6 +940,12 @@ case $basic_machine in
|
|||||||
nsr-tandem)
|
nsr-tandem)
|
||||||
basic_machine=nsr-tandem
|
basic_machine=nsr-tandem
|
||||||
;;
|
;;
|
||||||
|
nsv-tandem)
|
||||||
|
basic_machine=nsv-tandem
|
||||||
|
;;
|
||||||
|
nsx-tandem)
|
||||||
|
basic_machine=nsx-tandem
|
||||||
|
;;
|
||||||
op50n-* | op60c-*)
|
op50n-* | op60c-*)
|
||||||
basic_machine=hppa1.1-oki
|
basic_machine=hppa1.1-oki
|
||||||
os=-proelf
|
os=-proelf
|
||||||
@@ -952,7 +978,7 @@ case $basic_machine in
|
|||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
parisc-*)
|
parisc-*)
|
||||||
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
pbd)
|
pbd)
|
||||||
@@ -968,7 +994,7 @@ case $basic_machine in
|
|||||||
basic_machine=i386-pc
|
basic_machine=i386-pc
|
||||||
;;
|
;;
|
||||||
pc98-*)
|
pc98-*)
|
||||||
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||||
basic_machine=i586-pc
|
basic_machine=i586-pc
|
||||||
@@ -983,16 +1009,16 @@ case $basic_machine in
|
|||||||
basic_machine=i786-pc
|
basic_machine=i786-pc
|
||||||
;;
|
;;
|
||||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentium4-*)
|
pentium4-*)
|
||||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pn)
|
pn)
|
||||||
basic_machine=pn-gould
|
basic_machine=pn-gould
|
||||||
@@ -1002,23 +1028,23 @@ case $basic_machine in
|
|||||||
ppc | ppcbe) basic_machine=powerpc-unknown
|
ppc | ppcbe) basic_machine=powerpc-unknown
|
||||||
;;
|
;;
|
||||||
ppc-* | ppcbe-*)
|
ppc-* | ppcbe-*)
|
||||||
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
ppcle | powerpclittle)
|
||||||
basic_machine=powerpcle-unknown
|
basic_machine=powerpcle-unknown
|
||||||
;;
|
;;
|
||||||
ppcle-* | powerpclittle-*)
|
ppcle-* | powerpclittle-*)
|
||||||
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ppc64) basic_machine=powerpc64-unknown
|
ppc64) basic_machine=powerpc64-unknown
|
||||||
;;
|
;;
|
||||||
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
|
ppc64le | powerpc64little)
|
||||||
basic_machine=powerpc64le-unknown
|
basic_machine=powerpc64le-unknown
|
||||||
;;
|
;;
|
||||||
ppc64le-* | powerpc64little-*)
|
ppc64le-* | powerpc64little-*)
|
||||||
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ps2)
|
ps2)
|
||||||
basic_machine=i386-ibm
|
basic_machine=i386-ibm
|
||||||
@@ -1072,17 +1098,10 @@ case $basic_machine in
|
|||||||
sequent)
|
sequent)
|
||||||
basic_machine=i386-sequent
|
basic_machine=i386-sequent
|
||||||
;;
|
;;
|
||||||
sh)
|
|
||||||
basic_machine=sh-hitachi
|
|
||||||
os=-hms
|
|
||||||
;;
|
|
||||||
sh5el)
|
sh5el)
|
||||||
basic_machine=sh5le-unknown
|
basic_machine=sh5le-unknown
|
||||||
;;
|
;;
|
||||||
sh64)
|
simso-wrs)
|
||||||
basic_machine=sh64-unknown
|
|
||||||
;;
|
|
||||||
sparclite-wrs | simso-wrs)
|
|
||||||
basic_machine=sparclite-wrs
|
basic_machine=sparclite-wrs
|
||||||
os=-vxworks
|
os=-vxworks
|
||||||
;;
|
;;
|
||||||
@@ -1101,7 +1120,7 @@ case $basic_machine in
|
|||||||
os=-sysv4
|
os=-sysv4
|
||||||
;;
|
;;
|
||||||
strongarm-* | thumb-*)
|
strongarm-* | thumb-*)
|
||||||
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
sun2)
|
sun2)
|
||||||
basic_machine=m68000-sun
|
basic_machine=m68000-sun
|
||||||
@@ -1223,6 +1242,9 @@ case $basic_machine in
|
|||||||
basic_machine=hppa1.1-winbond
|
basic_machine=hppa1.1-winbond
|
||||||
os=-proelf
|
os=-proelf
|
||||||
;;
|
;;
|
||||||
|
x64)
|
||||||
|
basic_machine=x86_64-pc
|
||||||
|
;;
|
||||||
xbox)
|
xbox)
|
||||||
basic_machine=i686-pc
|
basic_machine=i686-pc
|
||||||
os=-mingw32
|
os=-mingw32
|
||||||
@@ -1231,20 +1253,12 @@ case $basic_machine in
|
|||||||
basic_machine=xps100-honeywell
|
basic_machine=xps100-honeywell
|
||||||
;;
|
;;
|
||||||
xscale-* | xscalee[bl]-*)
|
xscale-* | xscalee[bl]-*)
|
||||||
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
|
basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
|
||||||
;;
|
;;
|
||||||
ymp)
|
ymp)
|
||||||
basic_machine=ymp-cray
|
basic_machine=ymp-cray
|
||||||
os=-unicos
|
os=-unicos
|
||||||
;;
|
;;
|
||||||
z8k-*-coff)
|
|
||||||
basic_machine=z8k-unknown
|
|
||||||
os=-sim
|
|
||||||
;;
|
|
||||||
z80-*-coff)
|
|
||||||
basic_machine=z80-unknown
|
|
||||||
os=-sim
|
|
||||||
;;
|
|
||||||
none)
|
none)
|
||||||
basic_machine=none-none
|
basic_machine=none-none
|
||||||
os=-none
|
os=-none
|
||||||
@@ -1273,10 +1287,6 @@ case $basic_machine in
|
|||||||
vax)
|
vax)
|
||||||
basic_machine=vax-dec
|
basic_machine=vax-dec
|
||||||
;;
|
;;
|
||||||
pdp10)
|
|
||||||
# there are many clones, so DEC is not a safe bet
|
|
||||||
basic_machine=pdp10-unknown
|
|
||||||
;;
|
|
||||||
pdp11)
|
pdp11)
|
||||||
basic_machine=pdp11-dec
|
basic_machine=pdp11-dec
|
||||||
;;
|
;;
|
||||||
@@ -1286,9 +1296,6 @@ case $basic_machine in
|
|||||||
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
|
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||||
basic_machine=sh-unknown
|
basic_machine=sh-unknown
|
||||||
;;
|
;;
|
||||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
|
||||||
basic_machine=sparc-sun
|
|
||||||
;;
|
|
||||||
cydra)
|
cydra)
|
||||||
basic_machine=cydra-cydrome
|
basic_machine=cydra-cydrome
|
||||||
;;
|
;;
|
||||||
@@ -1308,7 +1315,7 @@ case $basic_machine in
|
|||||||
# Make sure to match an already-canonicalized machine name.
|
# Make sure to match an already-canonicalized machine name.
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -1316,10 +1323,10 @@ esac
|
|||||||
# Here we canonicalize certain aliases for manufacturers.
|
# Here we canonicalize certain aliases for manufacturers.
|
||||||
case $basic_machine in
|
case $basic_machine in
|
||||||
*-digital*)
|
*-digital*)
|
||||||
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
|
basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
|
||||||
;;
|
;;
|
||||||
*-commodore*)
|
*-commodore*)
|
||||||
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
|
basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
@@ -1330,8 +1337,8 @@ esac
|
|||||||
if [ x"$os" != x"" ]
|
if [ x"$os" != x"" ]
|
||||||
then
|
then
|
||||||
case $os in
|
case $os in
|
||||||
# First match some system type aliases
|
# First match some system type aliases that might get confused
|
||||||
# that might get confused with valid system types.
|
# with valid system types.
|
||||||
# -solaris* is a basic system type, with this one exception.
|
# -solaris* is a basic system type, with this one exception.
|
||||||
-auroraux)
|
-auroraux)
|
||||||
os=-auroraux
|
os=-auroraux
|
||||||
@@ -1342,45 +1349,48 @@ case $os in
|
|||||||
-solaris)
|
-solaris)
|
||||||
os=-solaris2
|
os=-solaris2
|
||||||
;;
|
;;
|
||||||
-svr4*)
|
|
||||||
os=-sysv4
|
|
||||||
;;
|
|
||||||
-unixware*)
|
-unixware*)
|
||||||
os=-sysv4.2uw
|
os=-sysv4.2uw
|
||||||
;;
|
;;
|
||||||
-gnu/linux*)
|
-gnu/linux*)
|
||||||
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
||||||
;;
|
;;
|
||||||
# First accept the basic system types.
|
# es1800 is here to avoid being matched by es* (a different OS)
|
||||||
|
-es1800*)
|
||||||
|
os=-ose
|
||||||
|
;;
|
||||||
|
# Now accept the basic system types.
|
||||||
# The portable systems comes first.
|
# The portable systems comes first.
|
||||||
# Each alternative MUST END IN A *, to match a version number.
|
# Each alternative MUST end in a * to match a version number.
|
||||||
# -sysv* is not here because it comes later, after sysvr4.
|
# -sysv* is not here because it comes later, after sysvr4.
|
||||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||||
| -sym* | -kopensolaris* | -plan9* \
|
| -sym* | -kopensolaris* | -plan9* \
|
||||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||||
| -aos* | -aros* \
|
| -aos* | -aros* | -cloudabi* | -sortix* \
|
||||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
| -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||||
| -bitrig* | -openbsd* | -solidbsd* \
|
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
|
||||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \
|
||||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
| -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
|
||||||
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||||
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
||||||
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
||||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
|
||||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
|
||||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
| -morphos* | -superux* | -rtmk* | -windiss* \
|
||||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
|
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
|
||||||
|
| -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
|
||||||
|
| -midnightbsd*)
|
||||||
# Remember, each alternative MUST END IN *, to match a version number.
|
# Remember, each alternative MUST END IN *, to match a version number.
|
||||||
;;
|
;;
|
||||||
-qnx*)
|
-qnx*)
|
||||||
@@ -1397,12 +1407,12 @@ case $os in
|
|||||||
-nto*)
|
-nto*)
|
||||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||||
;;
|
;;
|
||||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
-sim | -xray | -os68k* | -v88r* \
|
||||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
|
| -windows* | -osx | -abug | -netware* | -os9* \
|
||||||
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
||||||
;;
|
;;
|
||||||
-mac*)
|
-mac*)
|
||||||
os=`echo $os | sed -e 's|mac|macos|'`
|
os=`echo "$os" | sed -e 's|mac|macos|'`
|
||||||
;;
|
;;
|
||||||
-linux-dietlibc)
|
-linux-dietlibc)
|
||||||
os=-linux-dietlibc
|
os=-linux-dietlibc
|
||||||
@@ -1411,10 +1421,10 @@ case $os in
|
|||||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||||
;;
|
;;
|
||||||
-sunos5*)
|
-sunos5*)
|
||||||
os=`echo $os | sed -e 's|sunos5|solaris2|'`
|
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
|
||||||
;;
|
;;
|
||||||
-sunos6*)
|
-sunos6*)
|
||||||
os=`echo $os | sed -e 's|sunos6|solaris3|'`
|
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
|
||||||
;;
|
;;
|
||||||
-opened*)
|
-opened*)
|
||||||
os=-openedition
|
os=-openedition
|
||||||
@@ -1425,12 +1435,6 @@ case $os in
|
|||||||
-wince*)
|
-wince*)
|
||||||
os=-wince
|
os=-wince
|
||||||
;;
|
;;
|
||||||
-osfrose*)
|
|
||||||
os=-osfrose
|
|
||||||
;;
|
|
||||||
-osf*)
|
|
||||||
os=-osf
|
|
||||||
;;
|
|
||||||
-utek*)
|
-utek*)
|
||||||
os=-bsd
|
os=-bsd
|
||||||
;;
|
;;
|
||||||
@@ -1455,7 +1459,7 @@ case $os in
|
|||||||
-nova*)
|
-nova*)
|
||||||
os=-rtmk-nova
|
os=-rtmk-nova
|
||||||
;;
|
;;
|
||||||
-ns2 )
|
-ns2)
|
||||||
os=-nextstep2
|
os=-nextstep2
|
||||||
;;
|
;;
|
||||||
-nsk*)
|
-nsk*)
|
||||||
@@ -1477,7 +1481,7 @@ case $os in
|
|||||||
-oss*)
|
-oss*)
|
||||||
os=-sysv3
|
os=-sysv3
|
||||||
;;
|
;;
|
||||||
-svr4)
|
-svr4*)
|
||||||
os=-sysv4
|
os=-sysv4
|
||||||
;;
|
;;
|
||||||
-svr3)
|
-svr3)
|
||||||
@@ -1492,32 +1496,38 @@ case $os in
|
|||||||
-ose*)
|
-ose*)
|
||||||
os=-ose
|
os=-ose
|
||||||
;;
|
;;
|
||||||
-es1800*)
|
|
||||||
os=-ose
|
|
||||||
;;
|
|
||||||
-xenix)
|
|
||||||
os=-xenix
|
|
||||||
;;
|
|
||||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||||
os=-mint
|
os=-mint
|
||||||
;;
|
;;
|
||||||
-aros*)
|
|
||||||
os=-aros
|
|
||||||
;;
|
|
||||||
-zvmoe)
|
-zvmoe)
|
||||||
os=-zvmoe
|
os=-zvmoe
|
||||||
;;
|
;;
|
||||||
-dicos*)
|
-dicos*)
|
||||||
os=-dicos
|
os=-dicos
|
||||||
;;
|
;;
|
||||||
|
-pikeos*)
|
||||||
|
# Until real need of OS specific support for
|
||||||
|
# particular features comes up, bare metal
|
||||||
|
# configurations are quite functional.
|
||||||
|
case $basic_machine in
|
||||||
|
arm*)
|
||||||
|
os=-eabi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
os=-elf
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
-nacl*)
|
-nacl*)
|
||||||
;;
|
;;
|
||||||
|
-ios)
|
||||||
|
;;
|
||||||
-none)
|
-none)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Get rid of the `-' at the beginning of $os.
|
# Get rid of the `-' at the beginning of $os.
|
||||||
os=`echo $os | sed 's/[^-]*-//'`
|
os=`echo $os | sed 's/[^-]*-//'`
|
||||||
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
|
echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -1607,12 +1617,12 @@ case $basic_machine in
|
|||||||
sparc-* | *-sun)
|
sparc-* | *-sun)
|
||||||
os=-sunos4.1.1
|
os=-sunos4.1.1
|
||||||
;;
|
;;
|
||||||
|
pru-*)
|
||||||
|
os=-elf
|
||||||
|
;;
|
||||||
*-be)
|
*-be)
|
||||||
os=-beos
|
os=-beos
|
||||||
;;
|
;;
|
||||||
*-haiku)
|
|
||||||
os=-haiku
|
|
||||||
;;
|
|
||||||
*-ibm)
|
*-ibm)
|
||||||
os=-aix
|
os=-aix
|
||||||
;;
|
;;
|
||||||
@@ -1652,7 +1662,7 @@ case $basic_machine in
|
|||||||
m88k-omron*)
|
m88k-omron*)
|
||||||
os=-luna
|
os=-luna
|
||||||
;;
|
;;
|
||||||
*-next )
|
*-next)
|
||||||
os=-nextstep
|
os=-nextstep
|
||||||
;;
|
;;
|
||||||
*-sequent)
|
*-sequent)
|
||||||
@@ -1667,9 +1677,6 @@ case $basic_machine in
|
|||||||
i370-*)
|
i370-*)
|
||||||
os=-mvs
|
os=-mvs
|
||||||
;;
|
;;
|
||||||
*-next)
|
|
||||||
os=-nextstep3
|
|
||||||
;;
|
|
||||||
*-gould)
|
*-gould)
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
@@ -1779,15 +1786,15 @@ case $basic_machine in
|
|||||||
vendor=stratus
|
vendor=stratus
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo $basic_machine$os
|
echo "$basic_machine$os"
|
||||||
exit
|
exit
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||||
# time-stamp-start: "timestamp='"
|
# time-stamp-start: "timestamp='"
|
||||||
# time-stamp-format: "%:y-%02m-%02d"
|
# time-stamp-format: "%:y-%02m-%02d"
|
||||||
# time-stamp-end: "'"
|
# time-stamp-end: "'"
|
||||||
|
|||||||
73
configure.ng
73
configure.ng
@@ -154,15 +154,30 @@ AC_HEADER_TIME
|
|||||||
|
|
||||||
# Required header files
|
# Required header files
|
||||||
AC_CHECK_HEADERS([ \
|
AC_CHECK_HEADERS([ \
|
||||||
fcntl.h netdb.h netinet/in.h stdlib.h string.h \
|
fcntl.h \
|
||||||
strings.h sys/socket.h sys/time.h sys/types.h unistd.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!]))
|
],,AC_MSG_ERROR([required C header missing!]))
|
||||||
|
|
||||||
# Optional header files
|
# Optional header files
|
||||||
AC_CHECK_HEADERS_ONCE([ \
|
AC_CHECK_HEADERS_ONCE([ \
|
||||||
arpa/inet.h inttypes.h malloc.h netinet/in_systm.h netinet/ip.h \
|
arpa/inet.h \
|
||||||
stdbool.h stddef.h stdint.h varargs.h \
|
inttypes.h \
|
||||||
])
|
malloc.h \
|
||||||
|
netinet/in_systm.h \
|
||||||
|
netinet/ip.h \
|
||||||
|
stdbool.h \
|
||||||
|
stddef.h \
|
||||||
|
stdint.h \
|
||||||
|
varargs.h \
|
||||||
|
])
|
||||||
|
|
||||||
# -- Datatypes --
|
# -- Datatypes --
|
||||||
|
|
||||||
@@ -212,17 +227,49 @@ AC_FUNC_STRFTIME
|
|||||||
|
|
||||||
# Required functions
|
# Required functions
|
||||||
AC_CHECK_FUNCS([ \
|
AC_CHECK_FUNCS([ \
|
||||||
alarm dup2 endpwent gethostbyaddr gethostbyname gethostname \
|
alarm \
|
||||||
gettimeofday inet_ntoa memmove memset setsid socket strcasecmp \
|
dup2 \
|
||||||
strchr strcspn strerror strncasecmp strrchr strspn strstr \
|
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!]))
|
AC_MSG_ERROR([required function missing!]))
|
||||||
|
|
||||||
# Optional functions
|
# Optional functions
|
||||||
AC_CHECK_FUNCS_ONCE([
|
AC_CHECK_FUNCS_ONCE([
|
||||||
arc4random arc4random_stir gai_strerror getnameinfo inet_aton \
|
arc4random \
|
||||||
sigaction sigprocmask snprintf vsnprintf strdup strndup strlcpy strlcat \
|
arc4random_stir \
|
||||||
strtok_r unsetenv waitpid])
|
gai_strerror \
|
||||||
|
getnameinfo \
|
||||||
|
inet_aton \
|
||||||
|
setgroups \
|
||||||
|
sigaction \
|
||||||
|
sigprocmask \
|
||||||
|
snprintf \
|
||||||
|
strdup \
|
||||||
|
strlcat \
|
||||||
|
strlcpy \
|
||||||
|
strndup \
|
||||||
|
strtok_r \
|
||||||
|
unsetenv \
|
||||||
|
vsnprintf \
|
||||||
|
waitpid \
|
||||||
|
])
|
||||||
|
|
||||||
WORKING_GETADDRINFO
|
WORKING_GETADDRINFO
|
||||||
|
|
||||||
@@ -418,8 +465,8 @@ AC_ARG_WITH(openssl,
|
|||||||
LDFLAGS="-L$withval/lib $LDFLAGS"
|
LDFLAGS="-L$withval/lib $LDFLAGS"
|
||||||
fi
|
fi
|
||||||
AC_CHECK_LIB(crypto, BIO_s_mem)
|
AC_CHECK_LIB(crypto, BIO_s_mem)
|
||||||
AC_CHECK_LIB(ssl, SSL_library_init)
|
AC_CHECK_LIB(ssl, SSL_new)
|
||||||
AC_CHECK_FUNCS(SSL_library_init, x_ssl_openssl=yes,
|
AC_CHECK_FUNCS(SSL_new, x_ssl_openssl=yes,
|
||||||
AC_MSG_ERROR([Can't enable openssl])
|
AC_MSG_ERROR([Can't enable openssl])
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|||||||
3
contrib/Debian/.gitignore
vendored
3
contrib/Debian/.gitignore
vendored
@@ -4,10 +4,13 @@
|
|||||||
files
|
files
|
||||||
ngircd/
|
ngircd/
|
||||||
ngircd-full/
|
ngircd-full/
|
||||||
|
ngircd.service
|
||||||
ngircd-full.default
|
ngircd-full.default
|
||||||
ngircd-full.init
|
ngircd-full.init
|
||||||
ngircd-full.postinst
|
ngircd-full.postinst
|
||||||
|
ngircd-full.service
|
||||||
ngircd-full-dbg/
|
ngircd-full-dbg/
|
||||||
ngircd-full-dbg.default
|
ngircd-full-dbg.default
|
||||||
ngircd-full-dbg.init
|
ngircd-full-dbg.init
|
||||||
ngircd-full-dbg.postinst
|
ngircd-full-dbg.postinst
|
||||||
|
ngircd-full-dbg.service
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# ngIRCd -- The Next Generation IRC Daemon
|
# ngIRCd -- The Next Generation IRC Daemon
|
||||||
# Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
|
# Copyright (c)2001-2017 Alexander Barton (alex@barton.de) and Contributors
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -10,7 +10,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
EXTRA_DIST = rules changelog compat control copyright \
|
EXTRA_DIST = rules changelog compat control copyright \
|
||||||
ngircd.init ngircd.default ngircd.pam ngircd.postinst
|
ngircd.init ngircd.default ngircd.pam ngircd.postinst \
|
||||||
|
source/format
|
||||||
|
|
||||||
maintainer-clean-local:
|
maintainer-clean-local:
|
||||||
rm -f Makefile Makefile.in
|
rm -f Makefile Makefile.in
|
||||||
|
|||||||
@@ -1,3 +1,39 @@
|
|||||||
|
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
|
ngircd (22.1-0ab1) unstable; urgency=low
|
||||||
|
|
||||||
* New "upstream" release: ngIRCd 22.1.
|
* New "upstream" release: ngIRCd 22.1.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
4
|
9
|
||||||
|
|||||||
@@ -2,14 +2,15 @@ Source: ngircd
|
|||||||
Section: net
|
Section: net
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Alexander Barton <alex@barton.de>
|
Maintainer: Alexander Barton <alex@barton.de>
|
||||||
Build-Depends: debhelper (>> 4.0.0),
|
Build-Depends: debhelper (>> 9.0.0),
|
||||||
autotools-dev,
|
autotools-dev,
|
||||||
|
dh-systemd (>= 1.5),
|
||||||
expect,
|
expect,
|
||||||
libz-dev,
|
|
||||||
libwrap0-dev,
|
|
||||||
libident-dev,
|
libident-dev,
|
||||||
libgnutls-dev,
|
|
||||||
libpam0g-dev,
|
libpam0g-dev,
|
||||||
|
libssl-dev,
|
||||||
|
libwrap0-dev,
|
||||||
|
libz-dev,
|
||||||
telnet | telnet-ssl,
|
telnet | telnet-ssl,
|
||||||
Standards-Version: 3.9.1
|
Standards-Version: 3.9.1
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# ngIRCd start and stop script for Debian-based systems
|
# ngIRCd start and stop script for Debian-based systems
|
||||||
# Copyright 2008-2013 Alexander Barton <alex@barton.de>
|
# Copyright 2008-2015 Alexander Barton <alex@barton.de>
|
||||||
#
|
#
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
@@ -37,7 +37,7 @@ log_daemon_msg() {
|
|||||||
echo -n "$*"
|
echo -n "$*"
|
||||||
}
|
}
|
||||||
log_end_msg() {
|
log_end_msg() {
|
||||||
[ "$1" == "0" ] && echo "." || echo " failed!"
|
[ "$1" = "0" ] && echo "." || echo " failed!"
|
||||||
}
|
}
|
||||||
log_failure_msg() {
|
log_failure_msg() {
|
||||||
echo "$*"
|
echo "$*"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Debian post-installation script
|
# Debian post-installation script
|
||||||
# $Id: ngircd.postinst,v 1.2 2006/12/26 14:44:40 alex Exp $
|
|
||||||
#
|
#
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
@@ -12,6 +11,7 @@ case "$1" in
|
|||||||
# make sure that the configuration file is not
|
# make sure that the configuration file is not
|
||||||
# world-readable, it contains passwords!
|
# world-readable, it contains passwords!
|
||||||
chmod o= /etc/ngircd/ngircd.conf
|
chmod o= /etc/ngircd/ngircd.conf
|
||||||
|
chgrp irc /etc/ngircd/ngircd.conf
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
#
|
#
|
||||||
# ngIRCd -- The Next Generation IRC Daemon
|
# ngIRCd -- The Next Generation IRC Daemon
|
||||||
# Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors
|
# Copyright (c)2001-2016 Alexander Barton (alex@barton.de) and Contributors
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -55,7 +55,7 @@ configure-ngircd-full: configure
|
|||||||
--mandir=\$${prefix}/share/man \
|
--mandir=\$${prefix}/share/man \
|
||||||
--docdir=\$${prefix}/share/doc/ngircd-full \
|
--docdir=\$${prefix}/share/doc/ngircd-full \
|
||||||
--with-syslog --with-zlib \
|
--with-syslog --with-zlib \
|
||||||
--with-gnutls --with-iconv --with-ident --with-tcp-wrappers \
|
--with-openssl --with-iconv --with-ident --with-tcp-wrappers \
|
||||||
--with-pam \
|
--with-pam \
|
||||||
--enable-ipv6
|
--enable-ipv6
|
||||||
|
|
||||||
@@ -70,12 +70,12 @@ configure-ngircd-full-dbg: configure
|
|||||||
--docdir=\$${prefix}/share/doc/ngircd-full-dbg \
|
--docdir=\$${prefix}/share/doc/ngircd-full-dbg \
|
||||||
--enable-debug --enable-sniffer \
|
--enable-debug --enable-sniffer \
|
||||||
--with-syslog --with-zlib \
|
--with-syslog --with-zlib \
|
||||||
--with-gnutls --with-iconv --with-ident --with-tcp-wrappers \
|
--with-openssl --with-iconv --with-ident --with-tcp-wrappers \
|
||||||
--with-pam \
|
--with-pam \
|
||||||
--enable-ipv6
|
--enable-ipv6
|
||||||
|
|
||||||
build:
|
build:
|
||||||
dh_clean -k
|
dh_prep
|
||||||
|
|
||||||
build-ngircd: build-stamp-ngircd
|
build-ngircd: build-stamp-ngircd
|
||||||
build-stamp-ngircd: configure-ngircd
|
build-stamp-ngircd: configure-ngircd
|
||||||
@@ -111,12 +111,15 @@ clean:
|
|||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
rm -f build-stamp*
|
rm -f build-stamp*
|
||||||
|
rm -f $(CURDIR)/debian/ngircd.service
|
||||||
rm -f $(CURDIR)/debian/ngircd-full.default
|
rm -f $(CURDIR)/debian/ngircd-full.default
|
||||||
rm -f $(CURDIR)/debian/ngircd-full.init
|
rm -f $(CURDIR)/debian/ngircd-full.init
|
||||||
rm -f $(CURDIR)/debian/ngircd-full.postinst
|
rm -f $(CURDIR)/debian/ngircd-full.postinst
|
||||||
|
rm -f $(CURDIR)/debian/ngircd-full.service
|
||||||
rm -f $(CURDIR)/debian/ngircd-full-dbg.default
|
rm -f $(CURDIR)/debian/ngircd-full-dbg.default
|
||||||
rm -f $(CURDIR)/debian/ngircd-full-dbg.postinst
|
rm -f $(CURDIR)/debian/ngircd-full-dbg.postinst
|
||||||
rm -f $(CURDIR)/debian/ngircd-full-dbg.init
|
rm -f $(CURDIR)/debian/ngircd-full-dbg.init
|
||||||
|
rm -f $(CURDIR)/debian/ngircd-full-dbg.service
|
||||||
|
|
||||||
# Add here commands to clean up after the build process:
|
# Add here commands to clean up after the build process:
|
||||||
[ ! -f Makefile ] || $(MAKE) distclean
|
[ ! -f Makefile ] || $(MAKE) distclean
|
||||||
@@ -140,7 +143,6 @@ install-ngircd: build-ngircd
|
|||||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
|
$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
|
||||||
rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/INSTALL*
|
rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/INSTALL*
|
||||||
rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING*
|
rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING*
|
||||||
mkdir -p $(CURDIR)/debian/ngircd/var/run/ircd
|
|
||||||
cat $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/sample-ngircd.conf | \
|
cat $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/sample-ngircd.conf | \
|
||||||
sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
|
sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
|
||||||
sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
|
sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
|
||||||
@@ -157,7 +159,6 @@ install-ngircd-full: build-ngircd-full
|
|||||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full
|
$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full
|
||||||
rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/INSTALL*
|
rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/INSTALL*
|
||||||
rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/COPYING*
|
rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/COPYING*
|
||||||
mkdir -p $(CURDIR)/debian/ngircd-full/var/run/ircd
|
|
||||||
cat $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/sample-ngircd.conf | \
|
cat $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/sample-ngircd.conf | \
|
||||||
sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
|
sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
|
||||||
sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
|
sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
|
||||||
@@ -176,7 +177,6 @@ install-ngircd-full-dbg: build-ngircd-full-dbg
|
|||||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full-dbg
|
$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full-dbg
|
||||||
rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/INSTALL*
|
rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/INSTALL*
|
||||||
rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/COPYING*
|
rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/COPYING*
|
||||||
mkdir -p $(CURDIR)/debian/ngircd-full-dbg/var/run/ircd
|
|
||||||
cat $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/sample-ngircd.conf | \
|
cat $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/sample-ngircd.conf | \
|
||||||
sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
|
sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
|
||||||
sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
|
sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
|
||||||
@@ -192,12 +192,18 @@ binary-indep:
|
|||||||
|
|
||||||
# Build architecture-dependent files here.
|
# Build architecture-dependent files here.
|
||||||
binary-arch: build install
|
binary-arch: build install
|
||||||
|
ln -s $(CURDIR)/contrib/ngircd.service \
|
||||||
|
$(CURDIR)/debian/ngircd.service
|
||||||
|
|
||||||
ln -s $(CURDIR)/debian/ngircd.default \
|
ln -s $(CURDIR)/debian/ngircd.default \
|
||||||
$(CURDIR)/debian/ngircd-full.default
|
$(CURDIR)/debian/ngircd-full.default
|
||||||
ln -s $(CURDIR)/debian/ngircd.init \
|
ln -s $(CURDIR)/debian/ngircd.init \
|
||||||
$(CURDIR)/debian/ngircd-full.init
|
$(CURDIR)/debian/ngircd-full.init
|
||||||
ln -s $(CURDIR)/debian/ngircd.postinst \
|
ln -s $(CURDIR)/debian/ngircd.postinst \
|
||||||
$(CURDIR)/debian/ngircd-full.postinst
|
$(CURDIR)/debian/ngircd-full.postinst
|
||||||
|
cp $(CURDIR)/contrib/ngircd.service \
|
||||||
|
$(CURDIR)/debian/ngircd-full.service
|
||||||
|
echo "Alias=ngircd.service" >>$(CURDIR)/debian/ngircd-full.service
|
||||||
|
|
||||||
ln -s $(CURDIR)/debian/ngircd.default \
|
ln -s $(CURDIR)/debian/ngircd.default \
|
||||||
$(CURDIR)/debian/ngircd-full-dbg.default
|
$(CURDIR)/debian/ngircd-full-dbg.default
|
||||||
@@ -205,12 +211,17 @@ binary-arch: build install
|
|||||||
$(CURDIR)/debian/ngircd-full-dbg.init
|
$(CURDIR)/debian/ngircd-full-dbg.init
|
||||||
ln -s $(CURDIR)/debian/ngircd.postinst \
|
ln -s $(CURDIR)/debian/ngircd.postinst \
|
||||||
$(CURDIR)/debian/ngircd-full-dbg.postinst
|
$(CURDIR)/debian/ngircd-full-dbg.postinst
|
||||||
|
cp $(CURDIR)/contrib/ngircd.service \
|
||||||
|
$(CURDIR)/debian/ngircd-full-dbg.service
|
||||||
|
echo "Alias=ngircd.service" >>$(CURDIR)/debian/ngircd-full-dbg.service
|
||||||
|
|
||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
dh_installchangelogs -a -A ChangeLog
|
dh_installchangelogs -a -A ChangeLog
|
||||||
dh_installdocs -a
|
dh_installdocs -a
|
||||||
|
dh_systemd_enable -a
|
||||||
dh_installinit -a
|
dh_installinit -a
|
||||||
|
dh_systemd_start -a
|
||||||
dh_strip -a --no-package=ngircd-full-dbg
|
dh_strip -a --no-package=ngircd-full-dbg
|
||||||
dh_compress -a -XCommands.txt
|
dh_compress -a -XCommands.txt
|
||||||
dh_fixperms -a
|
dh_fixperms -a
|
||||||
@@ -222,6 +233,6 @@ binary-arch: build install
|
|||||||
|
|
||||||
binary: binary-indep binary-arch
|
binary: binary-indep binary-arch
|
||||||
|
|
||||||
.PHONY: build clean binary-indep binary-arch binary install
|
.PHONY: build clean binary-indep binary-arch binary install
|
||||||
|
|
||||||
# -eof-
|
# -eof-
|
||||||
|
|||||||
1
contrib/Debian/source/format
Normal file
1
contrib/Debian/source/format
Normal file
@@ -0,0 +1 @@
|
|||||||
|
1.0
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
FA2D564811EA158B00D37A35 /* pam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pam.h; sourceTree = "<group>"; };
|
FA2D564811EA158B00D37A35 /* pam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pam.h; sourceTree = "<group>"; };
|
||||||
FA2D564911EA158B00D37A35 /* pam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pam.c; sourceTree = "<group>"; };
|
FA2D564911EA158B00D37A35 /* pam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pam.c; sourceTree = "<group>"; };
|
||||||
FA2D567A11EA1AB300D37A35 /* libpam.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpam.dylib; path = usr/lib/libpam.dylib; sourceTree = SDKROOT; };
|
FA2D567A11EA1AB300D37A35 /* libpam.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpam.dylib; path = usr/lib/libpam.dylib; sourceTree = SDKROOT; };
|
||||||
FA322BBA0CEF72E4001761B3 /* ngIRCd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = ngIRCd; path = ngircd; sourceTree = BUILT_PRODUCTS_DIR; };
|
FA322BBA0CEF72E4001761B3 /* ngircd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ngircd; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
FA322CD60CEF74B1001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
|
FA322CD60CEF74B1001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
|
||||||
FA322CD90CEF74B1001761B3 /* array.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = array.c; sourceTree = "<group>"; };
|
FA322CD90CEF74B1001761B3 /* array.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = array.c; sourceTree = "<group>"; };
|
||||||
FA322CDA0CEF74B1001761B3 /* array.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = array.h; sourceTree = "<group>"; };
|
FA322CDA0CEF74B1001761B3 /* array.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = array.h; sourceTree = "<group>"; };
|
||||||
@@ -203,11 +203,12 @@
|
|||||||
FA322DC00CEF77CB001761B3 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = "<absolute>"; };
|
FA322DC00CEF77CB001761B3 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = "<absolute>"; };
|
||||||
FA407F2C0DB159F400271AF1 /* ng_ipaddr.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = ng_ipaddr.c; path = ipaddr/ng_ipaddr.c; sourceTree = "<group>"; };
|
FA407F2C0DB159F400271AF1 /* ng_ipaddr.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = ng_ipaddr.c; path = ipaddr/ng_ipaddr.c; sourceTree = "<group>"; };
|
||||||
FA407F2D0DB159F400271AF1 /* ng_ipaddr.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = ng_ipaddr.h; path = ipaddr/ng_ipaddr.h; sourceTree = "<group>"; };
|
FA407F2D0DB159F400271AF1 /* ng_ipaddr.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = ng_ipaddr.h; path = ipaddr/ng_ipaddr.h; sourceTree = "<group>"; };
|
||||||
FA407F380DB15AC700271AF1 /* GIT.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = GIT.txt; sourceTree = "<group>"; };
|
|
||||||
FA4B08E513E7F8FB00765BA3 /* ngircd-bsd.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "ngircd-bsd.sh"; sourceTree = "<group>"; };
|
FA4B08E513E7F8FB00765BA3 /* ngircd-bsd.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "ngircd-bsd.sh"; sourceTree = "<group>"; };
|
||||||
FA4B08E613E7F91700765BA3 /* ngIRCd-Logo.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "ngIRCd-Logo.gif"; sourceTree = "<group>"; };
|
FA4B08E613E7F91700765BA3 /* ngIRCd-Logo.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "ngIRCd-Logo.gif"; sourceTree = "<group>"; };
|
||||||
FA4B08E713E7F91700765BA3 /* ngircd-redhat.init */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "ngircd-redhat.init"; sourceTree = "<group>"; };
|
FA4B08E713E7F91700765BA3 /* ngircd-redhat.init */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "ngircd-redhat.init"; sourceTree = "<group>"; };
|
||||||
FA4B08E813E7F91C00765BA3 /* platformtest.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = platformtest.sh; sourceTree = "<group>"; };
|
FA4B08E813E7F91C00765BA3 /* platformtest.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = platformtest.sh; sourceTree = "<group>"; };
|
||||||
|
FA4B4F542055B47C00A04296 /* ngircd.logcheck */ = {isa = PBXFileReference; lastKnownFileType = text; path = ngircd.logcheck; sourceTree = "<group>"; };
|
||||||
|
FA4B4F552055B4C800A04296 /* source */ = {isa = PBXFileReference; lastKnownFileType = folder; path = source; sourceTree = "<group>"; };
|
||||||
FA4F1659164836B100DBD011 /* irc-metadata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "irc-metadata.c"; sourceTree = "<group>"; };
|
FA4F1659164836B100DBD011 /* irc-metadata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "irc-metadata.c"; sourceTree = "<group>"; };
|
||||||
FA4F165C164836BF00DBD011 /* irc-metadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "irc-metadata.h"; sourceTree = "<group>"; };
|
FA4F165C164836BF00DBD011 /* irc-metadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "irc-metadata.h"; sourceTree = "<group>"; };
|
||||||
FA6BBC5F1605F0AB0004247A /* conn-encoding.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "conn-encoding.c"; sourceTree = "<group>"; };
|
FA6BBC5F1605F0AB0004247A /* conn-encoding.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "conn-encoding.c"; sourceTree = "<group>"; };
|
||||||
@@ -310,7 +311,7 @@
|
|||||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
FA322BBA0CEF72E4001761B3 /* ngIRCd */,
|
FA322BBA0CEF72E4001761B3 /* ngircd */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -488,6 +489,7 @@
|
|||||||
FA4B08E513E7F8FB00765BA3 /* ngircd-bsd.sh */,
|
FA4B08E513E7F8FB00765BA3 /* ngircd-bsd.sh */,
|
||||||
FA4B08E613E7F91700765BA3 /* ngIRCd-Logo.gif */,
|
FA4B08E613E7F91700765BA3 /* ngIRCd-Logo.gif */,
|
||||||
FA4B08E713E7F91700765BA3 /* ngircd-redhat.init */,
|
FA4B08E713E7F91700765BA3 /* ngircd-redhat.init */,
|
||||||
|
FA4B4F542055B47C00A04296 /* ngircd.logcheck */,
|
||||||
FA18A63F16CEDE2300132F66 /* ngircd.service */,
|
FA18A63F16CEDE2300132F66 /* ngircd.service */,
|
||||||
FA18A64016CEDE2300132F66 /* ngircd.socket */,
|
FA18A64016CEDE2300132F66 /* ngircd.socket */,
|
||||||
FA322D940CEF7523001761B3 /* ngircd.spec */,
|
FA322D940CEF7523001761B3 /* ngircd.spec */,
|
||||||
@@ -511,6 +513,7 @@
|
|||||||
FA18A64116CEDE3500132F66 /* ngircd.pam */,
|
FA18A64116CEDE3500132F66 /* ngircd.pam */,
|
||||||
FA322D710CEF7523001761B3 /* ngircd.postinst */,
|
FA322D710CEF7523001761B3 /* ngircd.postinst */,
|
||||||
FA322D720CEF7523001761B3 /* rules */,
|
FA322D720CEF7523001761B3 /* rules */,
|
||||||
|
FA4B4F552055B4C800A04296 /* source */,
|
||||||
);
|
);
|
||||||
path = Debian;
|
path = Debian;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -546,7 +549,6 @@
|
|||||||
FA18A64416CEDFCE00132F66 /* Commands.txt */,
|
FA18A64416CEDFCE00132F66 /* Commands.txt */,
|
||||||
FAE22BD415270EA300F1A5AB /* Contributing.txt */,
|
FAE22BD415270EA300F1A5AB /* Contributing.txt */,
|
||||||
FA322D9A0CEF752C001761B3 /* FAQ.txt */,
|
FA322D9A0CEF752C001761B3 /* FAQ.txt */,
|
||||||
FA407F380DB15AC700271AF1 /* GIT.txt */,
|
|
||||||
FAE22BD515270EB500F1A5AB /* HowToRelease.txt */,
|
FAE22BD515270EB500F1A5AB /* HowToRelease.txt */,
|
||||||
FAE22BD615270EB500F1A5AB /* Modes.txt */,
|
FAE22BD615270EB500F1A5AB /* Modes.txt */,
|
||||||
FAE22BD715270EB500F1A5AB /* PAM.txt */,
|
FAE22BD715270EB500F1A5AB /* PAM.txt */,
|
||||||
@@ -626,7 +628,7 @@
|
|||||||
name = ngIRCd;
|
name = ngIRCd;
|
||||||
productInstallPath = "$(HOME)/bin";
|
productInstallPath = "$(HOME)/bin";
|
||||||
productName = ngIRCd;
|
productName = ngIRCd;
|
||||||
productReference = FA322BBA0CEF72E4001761B3 /* ngIRCd */;
|
productReference = FA322BBA0CEF72E4001761B3 /* ngircd */;
|
||||||
productType = "com.apple.product-type.tool";
|
productType = "com.apple.product-type.tool";
|
||||||
};
|
};
|
||||||
/* End PBXNativeTarget section */
|
/* End PBXNativeTarget section */
|
||||||
@@ -635,7 +637,7 @@
|
|||||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 0430;
|
LastUpgradeCheck = 0920;
|
||||||
};
|
};
|
||||||
buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "ngIRCd" */;
|
buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "ngIRCd" */;
|
||||||
compatibilityVersion = "Xcode 3.2";
|
compatibilityVersion = "Xcode 3.2";
|
||||||
@@ -742,10 +744,31 @@
|
|||||||
1DEB928B08733DD80010E9CD /* Default */ = {
|
1DEB928B08733DD80010E9CD /* Default */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
CODE_SIGN_IDENTITY = "";
|
CODE_SIGN_IDENTITY = "";
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_NO_COMMON_BLOCKS = NO;
|
||||||
GCC_VERSION = "";
|
GCC_VERSION = "";
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||||
SDKROOT = "";
|
SDKROOT = "";
|
||||||
@@ -755,11 +778,33 @@
|
|||||||
FAB0570C105D917F006AF9E2 /* Debug */ = {
|
FAB0570C105D917F006AF9E2 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
GCC_DEBUGGING_SYMBOLS = full;
|
GCC_DEBUGGING_SYMBOLS = full;
|
||||||
|
GCC_NO_COMMON_BLOCKS = NO;
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
GCC_VERSION = "";
|
GCC_VERSION = "";
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# ngIRCd -- The Next Generation IRC Daemon
|
# ngIRCd -- The Next Generation IRC Daemon
|
||||||
# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
|
# Copyright (c)2001-2017 Alexander Barton (alex@barton.de) and Contributors
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,6 +16,7 @@ EXTRA_DIST = README \
|
|||||||
ngircd-bsd.sh \
|
ngircd-bsd.sh \
|
||||||
ngIRCd-Logo.gif \
|
ngIRCd-Logo.gif \
|
||||||
ngircd-redhat.init \
|
ngircd-redhat.init \
|
||||||
|
ngircd.logcheck \
|
||||||
ngircd.service \
|
ngircd.service \
|
||||||
ngircd.socket \
|
ngircd.socket \
|
||||||
ngircd.spec \
|
ngircd.spec \
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
Debian/
|
Debian/
|
||||||
- Various files for building Debian GNU/Linux packages (".deb's").
|
- Various files for building Debian GNU/Linux packages (".deb's").
|
||||||
- ngircd.init; ngircd.default: init script for Debian-based systems.
|
- ngircd.init; ngircd.default: init script for Debian-based systems.
|
||||||
- ngircd.pam: example PAM configuraton.
|
- ngircd.pam: example PAM configuration.
|
||||||
|
|
||||||
MacOSX/
|
MacOSX/
|
||||||
- Project files for XCode, the "project builder" of Apple Mac OS X.
|
- Project files for XCode, the "project builder" of Apple Mac OS X.
|
||||||
@@ -27,6 +27,9 @@ ngircd-bsd.sh
|
|||||||
ngircd-redhat.init
|
ngircd-redhat.init
|
||||||
- Start/stop script for RedHat-based distributions (like CentOS).
|
- Start/stop script for RedHat-based distributions (like CentOS).
|
||||||
|
|
||||||
|
ngircd.logcheck
|
||||||
|
- Sample rules for logcheck(8) to ignore "normal" log messages of ngIRCd.
|
||||||
|
|
||||||
ngircd.service
|
ngircd.service
|
||||||
- systemd(8) service unit configuration file.
|
- systemd(8) service unit configuration file.
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
#/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
INDENTARGS="-kr -i8 -ts8 -l80 -c3 -cd41 -ss -ncs -psl"
|
INDENTARGS="-kr -i8 -ts8 -l80 -c3 -cd41 -ss -ncs -psl"
|
||||||
|
|
||||||
# check if indent(1) is available
|
# check if indent(1) is available
|
||||||
type indent >/dev/null 2>&1 && INDENT="indent"
|
command -v indent >/dev/null 2>&1 && INDENT="indent"
|
||||||
type gindent >/dev/null 2>&1 && INDENT="gindent"
|
command -v gindent >/dev/null 2>&1 && INDENT="gindent"
|
||||||
type gnuindent >/dev/null 2>&1 && INDENT="gnuindent"
|
command -v gnuindent >/dev/null 2>&1 && INDENT="gnuindent"
|
||||||
|
|
||||||
if [ -z "$INDENT" ]; then
|
if [ -z "$INDENT" ]; then
|
||||||
echo "Error: GNU \"indent\" not found!"
|
echo "Error: GNU \"indent\" not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$INDENT -v $INDENTARGS $*
|
$INDENT -v $INDENTARGS "$@"
|
||||||
|
|
||||||
# -eof-
|
# -eof-
|
||||||
|
|||||||
0
contrib/ngircd-bsd.sh
Normal file → Executable file
0
contrib/ngircd-bsd.sh
Normal file → Executable file
0
contrib/ngircd-redhat.init
Normal file → Executable file
0
contrib/ngircd-redhat.init
Normal file → Executable file
61
contrib/ngircd.logcheck
Normal file
61
contrib/ngircd.logcheck
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Accepted connection [0-9]+ from ".*:[0-9]+" on socket [0-9]+\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve address ".*": Name or service not known \[.*\]\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve ".*": host not found$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve ".*": Name or service not known$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve ".*": No address associated with hostname$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Can't connect\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Client closed connection\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Got QUIT command\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Read error\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): SSL accept error, closing socket\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client ".*" unregistered (connection [0-9]+): Timeout\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Timeout\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Write error\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized SSL3\.0 using cipher .*\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized TLS1\.[012] using cipher .*\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized TLSv1\.[012] using cipher .*\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized TLSv1 using cipher .*\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: 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]+\]: Enabled link compression \(zlib\) on connection [0-9]+\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Establishing connection for ".*" to ".*:[0-9]+" \(.*\), socket [0-9]+ \.\.\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: IDENT lookup for connection [0-9]+: ".*"\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: IDENT lookup for connection [0-9]+: no result\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Now listening on .*:[0-9]+ \(socket [0-9]+\)\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: OpenSSL .* initialized\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Possible forgery: .* resolved to ".*", which has no IP address!$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Preparing to establish a new server link for ".*" \.\.\.$
|
||||||
|
^\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]+\]: Server ".*" registered \(via .*, connected to .*, [0-9]+ hops\)\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server ".*" unregistered: .* .*\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server ".*" unregistered: ".*" \(SQUIT from .*\)\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down all listening sockets \([0-9]+ total\) \.\.\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Can't connect\) with ".*:[0-9]+" \.\.\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Client closed connection\) with ".*:[0-9]+" \.\.\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Got QUIT command\) with ".*:[0-9]+" \.\.\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Ping timeout: [0-9]+ seconds\) with ".*:[0-9]+" \.\.\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Read error\) with ".*:[0-9]+" \.\.\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Server going down\) with ".*:[0-9]+" \.\.\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(SSL accept error, closing socket\) with ".*:[0-9]+" \.\.\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Timeout\) with ".*:[0-9]+" \.\.\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Write error\) with ".*:[0-9]+" \.\.\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL connection [0-9]+ shutting down \.\.\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL connection [0-9]+ with ".*:[0-9]+" established\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL connection on socket [0-9]+ failed!$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: A TLS packet with unexpected length was received\. \[ConnSSL_Read\]\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: A TLS packet with unexpected length was received\. \[gnutls_handshake\]\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: Broken pipe \[in ConnSSL_Write\(\)\]!$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: Connection reset by peer \[in ConnSSL_Read\(\)\]!$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: Connection reset by peer \[in SSL_connect\(\)\]!$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL protocol error: SSL_accept \(.*\)$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" changed nick \(connection [0-9]+\): ".*" -> ".*"\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" registered \(connection [0-9]+\)\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Client closed connection\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Got QUIT command\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Ping timeout: [0-9]+ seconds\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Read error\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Server going down\.$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: warning: can't get client address: Connection reset by peer$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: warning: /etc/hosts\.allow, line [0-9]+: can't verify hostname: getaddrinfo\(.*, AF_INET\) failed$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Write error on connection [0-9]+ \(socket [0-9]+\): Broken pipe!$
|
||||||
|
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Write error on connection [0-9]+ \(socket [0-9]+\): Connection reset by peer!$
|
||||||
@@ -1,11 +1,43 @@
|
|||||||
|
# ngIRCd systemd service unit.
|
||||||
|
# See systemd(1), systemd.unit(5), systemd.service(5), systemd.exec(5).
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Next Generation IRC Daemon
|
Description=Next Generation IRC Daemon
|
||||||
|
Documentation=man:ngircd(8) man:ngircd.conf(5) https://ngircd.barton.de
|
||||||
After=network.target
|
After=network.target
|
||||||
|
Wants=anope.service atheme.service irc-services.service
|
||||||
|
Wants=bopm.service
|
||||||
|
Before=anope.service atheme.service irc-services.service
|
||||||
|
Before=bopm.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
ExecStart=/usr/sbin/ngircd
|
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
|
||||||
|
# Try to load "default files" from any Debian package variant to keep this
|
||||||
|
# unit generic.
|
||||||
|
EnvironmentFile=-/etc/default/ngircd
|
||||||
|
EnvironmentFile=-/etc/default/ngircd-full
|
||||||
|
EnvironmentFile=-/etc/default/ngircd-full-dbg
|
||||||
|
# Start ngIRCd. Note: systemd doesn't allow to use $DAEMON here!
|
||||||
|
ExecStart=/usr/sbin/ngircd $PARAMS
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Next Generation IRC Daemon (Socket)
|
Description=Next Generation IRC Daemon (Socket)
|
||||||
|
Documentation=man:ngircd(8) man:ngircd.conf(5)
|
||||||
|
|
||||||
[Socket]
|
[Socket]
|
||||||
BindIPv6Only=ipv6-only
|
BindIPv6Only=ipv6-only
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%define name ngircd
|
%define name ngircd
|
||||||
%define version 22.1
|
%define version 25~rc1
|
||||||
%define release 1
|
%define release 1
|
||||||
%define prefix %{_prefix}
|
%define prefix %{_prefix}
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ Advantages:
|
|||||||
- supports IPv6 and SSL
|
- supports IPv6 and SSL
|
||||||
- no problems with servers that have dynamic IP addresses
|
- no problems with servers that have dynamic IP addresses
|
||||||
- freely available, modern, portable and tidy C-source
|
- freely available, modern, portable and tidy C-source
|
||||||
- ngIRCd is being actively developed since 11 years.
|
- ngIRCd is being actively developed since 2001
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# ngIRCd -- The Next Generation IRC Daemon
|
# ngIRCd -- The Next Generation IRC Daemon
|
||||||
# Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors
|
# Copyright (c)2001-2016 Alexander Barton (alex@barton.de) and Contributors
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,14 +14,14 @@
|
|||||||
# suitable for inclusion in doc/Platforms.txt -- please send reports
|
# suitable for inclusion in doc/Platforms.txt -- please send reports
|
||||||
# to the ngIRCd mailing list: <ngircd-ml@ngircd.barton.de>.
|
# to the ngIRCd mailing list: <ngircd-ml@ngircd.barton.de>.
|
||||||
|
|
||||||
NAME=`basename "$0"`
|
NAME=$(basename "$0")
|
||||||
VERBOSE=
|
VERBOSE=
|
||||||
CLEAN=1
|
CLEAN=1
|
||||||
|
|
||||||
PLATFORM=
|
PLATFORM=
|
||||||
COMPILER="unknown"
|
COMPILER="unknown"
|
||||||
VERSION="unknown"
|
VERSION="unknown"
|
||||||
DATE=`date "+%y-%m-%d"`
|
DATE=$(date "+%y-%m-%d")
|
||||||
COMMENT=
|
COMMENT=
|
||||||
|
|
||||||
R_CONFIGURE=
|
R_CONFIGURE=
|
||||||
@@ -30,7 +30,7 @@ R_CHECK=
|
|||||||
R_CHECK_Y="?"
|
R_CHECK_Y="?"
|
||||||
R_RUN=
|
R_RUN=
|
||||||
|
|
||||||
SRC_D=`dirname "$0"`
|
SRC_D=$(dirname "$0")
|
||||||
MY_D="$PWD"
|
MY_D="$PWD"
|
||||||
|
|
||||||
[ -n "$MAKE" ] || MAKE="make"
|
[ -n "$MAKE" ] || MAKE="make"
|
||||||
@@ -55,6 +55,11 @@ while [ $# -gt 0 ]; do
|
|||||||
shift
|
shift
|
||||||
done
|
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 ..."
|
echo "$NAME: Checking ngIRCd base source directory ..."
|
||||||
grep "ngIRCd" "$SRC_D/ChangeLog" >/dev/null 2>&1
|
grep "ngIRCd" "$SRC_D/ChangeLog" >/dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
@@ -72,10 +77,14 @@ echo "$NAME: Checking for GIT tree ..."
|
|||||||
if [ -d "$SRC_D/.git" ]; then
|
if [ -d "$SRC_D/.git" ]; then
|
||||||
echo "$NAME: Checking for \"git\" command ..."
|
echo "$NAME: Checking for \"git\" command ..."
|
||||||
git version >/dev/null 2>&1
|
git version >/dev/null 2>&1
|
||||||
if [ $? -eq 0 -a -n "$CLEAN" ]; then
|
if [ $? -eq 0 ] && [ -n "$CLEAN" ]; then
|
||||||
echo "$NAME: Running \"git clean\" ..."
|
echo "$NAME: Running \"git clean\" ..."
|
||||||
cd "$SRC_D" || exit 1
|
cd "$SRC_D" || exit 1
|
||||||
[ -n "$VERBOSE" ] && git clean -dxf || git clean -dxf >/dev/null
|
if [ -n "$VERBOSE" ]; then
|
||||||
|
git clean -dxf
|
||||||
|
else
|
||||||
|
git clean -dxf >/dev/null
|
||||||
|
fi
|
||||||
cd "$MY_D" || exit 1
|
cd "$MY_D" || exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -84,21 +93,42 @@ echo "$NAME: Checking for \"$SRC_D/configure\" script ..."
|
|||||||
if [ ! -r "$SRC_D/configure" ]; then
|
if [ ! -r "$SRC_D/configure" ]; then
|
||||||
echo "$NAME: Running \"$SRC_D/autogen.sh\" ..."
|
echo "$NAME: Running \"$SRC_D/autogen.sh\" ..."
|
||||||
cd "$SRC_D" || exit 1
|
cd "$SRC_D" || exit 1
|
||||||
[ -n "$VERBOSE" ] && ./autogen.sh || ./autogen.sh >/dev/null
|
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
|
cd "$MY_D" || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -r "$SRC_D/configure" ]; then
|
if [ -r "$SRC_D/configure" ]; then
|
||||||
echo "$NAME: Running \"$SRC_D/configure\" script ..."
|
echo "$NAME: Running \"$SRC_D/configure\" script ..."
|
||||||
[ -n "$VERBOSE" ] && "$SRC_D/configure" -C || "$SRC_D/configure" -C >/dev/null
|
if [ -n "$VERBOSE" ]; then
|
||||||
if [ $? -eq 0 -a -r ./Makefile ]; then
|
"$SRC_D/configure" -C
|
||||||
|
else
|
||||||
|
"$SRC_D/configure" -C >/dev/null
|
||||||
|
fi
|
||||||
|
if [ $? -eq 0 ] && [ -r ./Makefile ]; then
|
||||||
R_CONFIGURE=1
|
R_CONFIGURE=1
|
||||||
|
rm -f "src/ngircd/ngircd"
|
||||||
echo "$NAME: Running \"$MAKE\" ..."
|
echo "$NAME: Running \"$MAKE\" ..."
|
||||||
[ -n "$VERBOSE" ] && "$MAKE" || "$MAKE" >/dev/null
|
if [ -n "$VERBOSE" ]; then
|
||||||
if [ $? -eq 0 -a -x src/ngircd/ngircd ]; then
|
"$MAKE"
|
||||||
|
else
|
||||||
|
"$MAKE" >/dev/null
|
||||||
|
fi
|
||||||
|
if [ $? -eq 0 ] && [ -x src/ngircd/ngircd ]; then
|
||||||
R_MAKE=1
|
R_MAKE=1
|
||||||
echo "$NAME: Running \"$MAKE check\" ..."
|
echo "$NAME: Running \"$MAKE check\" ..."
|
||||||
[ -n "$VERBOSE" ] && "$MAKE" check || "$MAKE" check >/dev/null
|
if [ -n "$VERBOSE" ]; then
|
||||||
|
"$MAKE" check
|
||||||
|
else
|
||||||
|
"$MAKE" check >/dev/null
|
||||||
|
fi
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
R_CHECK=1
|
R_CHECK=1
|
||||||
R_RUN=$R_CHECK
|
R_RUN=$R_CHECK
|
||||||
@@ -115,13 +145,13 @@ fi
|
|||||||
|
|
||||||
# Get target platform information
|
# Get target platform information
|
||||||
if [ -r "src/config.h" ]; then
|
if [ -r "src/config.h" ]; then
|
||||||
CPU=`grep "HOST_CPU" "src/config.h" | cut -d'"' -f2`
|
CPU=$(grep "HOST_CPU" "src/config.h" | cut -d'"' -f2)
|
||||||
OS=`grep "HOST_OS" "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`
|
VENDOR=$(grep "HOST_VENDOR" "src/config.h" | cut -d'"' -f2)
|
||||||
PLATFORM="$CPU/$VENDOR/$OS"
|
PLATFORM="$CPU/$VENDOR/$OS"
|
||||||
fi
|
fi
|
||||||
if [ -z "$PLATFORM" ]; then
|
if [ -z "$PLATFORM" ]; then
|
||||||
PLATFORM="`uname 2>/dev/null` `uname -r 2>/dev/null`, `uname -m 2>/dev/null`"
|
PLATFORM="$(uname 2>/dev/null) $(uname -r 2>/dev/null), $(uname -m 2>/dev/null)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get compiler information
|
# Get compiler information
|
||||||
@@ -153,18 +183,18 @@ if [ -r "Makefile" ]; then
|
|||||||
| cut -d'(' -f1 | sed -e 's/version //g')
|
| cut -d'(' -f1 | sed -e 's/version //g')
|
||||||
fi
|
fi
|
||||||
if [ "$COMPILER" = "unknown" ]; then
|
if [ "$COMPILER" = "unknown" ]; then
|
||||||
v="`$CC --version 2>/dev/null | head -1`"
|
v="$($CC --version 2>/dev/null | head -1)"
|
||||||
[ -z "$v" ] && v="`$CC -version 2>/dev/null | head -1`"
|
[ -z "$v" ] && v="$($CC -version 2>/dev/null | head -1)"
|
||||||
[ -n "$v" ] && COMPILER="$v"
|
[ -n "$v" ] && COMPILER="$v"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get ngIRCd version information
|
# Get ngIRCd version information
|
||||||
eval $(grep "^VERSION = " Makefile | sed -e 's/ //g')
|
eval "$(grep "^VERSION = " Makefile | sed -e 's/ //g')"
|
||||||
case "$VERSION" in
|
case "$VERSION" in
|
||||||
*~*-*)
|
*~*-*)
|
||||||
VERSION=`echo "$VERSION" | cut -b1-10`
|
VERSION=$(echo "$VERSION" | cut -b1-10)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
[ -n "$VERSION" ] || VERSION="unknown"
|
[ -n "$VERSION" ] || VERSION="unknown"
|
||||||
@@ -184,7 +214,12 @@ fi
|
|||||||
[ -n "$R_CONFIGURE" ] && C="Y" || C="N"
|
[ -n "$R_CONFIGURE" ] && C="Y" || C="N"
|
||||||
[ -n "$R_MAKE" ] && M="Y" || M="N"
|
[ -n "$R_MAKE" ] && M="Y" || M="N"
|
||||||
[ -n "$R_CHECK" ] && T="$R_CHECK_Y" || T="N"
|
[ -n "$R_CHECK" ] && T="$R_CHECK_Y" || T="N"
|
||||||
[ -n "$R_RUN" ] && R="Y" || R="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"
|
[ -n "$COMMENT" ] && COMMENT=" $COMMENT"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@@ -195,17 +230,29 @@ echo " ./configure works --+ |
|
|||||||
echo " | | | |"
|
echo " | | | |"
|
||||||
echo "Platform Compiler ngIRCd Date Tester C M T R *"
|
echo "Platform Compiler ngIRCd Date Tester C M T R *"
|
||||||
echo "--------------------------- ------------ ---------- -------- -------- - - - - -"
|
echo "--------------------------- ------------ ---------- -------- -------- - - - - -"
|
||||||
type printf >/dev/null 2>&1
|
command -v printf >/dev/null 2>&1
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
printf "%-27s %-12s %-10s %s %-8s %s %s %s %s%s\n" \
|
printf "%-27s %-12s %-10s %s %-8s %s %s %s %s%s\n" \
|
||||||
"$PLATFORM" "$COMPILER" "$VERSION" "$DATE" "$USER" \
|
"$PLATFORM" "$COMPILER" "$VERSION" "$DATE" "$LOGNAME" \
|
||||||
"$C" "$M" "$T" "$R" "$COMMENT"
|
"$C" "$M" "$T" "$R" "$COMMENT"
|
||||||
else
|
else
|
||||||
echo "$PLATFORM $COMPILER $VERSION $DATE $USER" \
|
echo "$PLATFORM $COMPILER $VERSION $DATE $LOGNAME" \
|
||||||
"$C" "$M" "$T" "$R" "$COMMENT"
|
"$C" "$M" "$T" "$R" "$COMMENT"
|
||||||
fi
|
fi
|
||||||
echo
|
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
|
if [ "$R_CHECK_Y" = "y" ]; then
|
||||||
echo "$NAME: Warning: Some tests have been skipped!"
|
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
|
echo
|
||||||
fi
|
fi
|
||||||
|
|||||||
1
doc/.gitignore
vendored
1
doc/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
sample-ngircd.conf
|
|
||||||
@@ -13,7 +13,7 @@ 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.
|
and can be requested by a IRC/IRCv3 client that supports the "CAP" command.
|
||||||
|
|
||||||
ngIRCd implements the "IRC Client Capabilities Extension" as described here:
|
ngIRCd implements the "IRC Client Capabilities Extension" as described here:
|
||||||
<http://www.leeh.co.uk/draft-mitchell-irc-capabilities-02.html>
|
<http://ircv3.net/specs/core/capability-negotiation-3.1.html>
|
||||||
|
|
||||||
|
|
||||||
I. Supported Capabilities
|
I. Supported Capabilities
|
||||||
@@ -25,4 +25,4 @@ I. Supported Capabilities
|
|||||||
server to send all possible prefixes which apply to a user in NAMES and
|
server to send all possible prefixes which apply to a user in NAMES and
|
||||||
WHO output.
|
WHO output.
|
||||||
|
|
||||||
See <http://ircv3.atheme.org/extensions/multi-prefix-3.1>.
|
See <http://ircv3.net/specs/extensions/multi-prefix-3.1.html>.
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ Connection Handling Commands
|
|||||||
like this: "CAP REQ :capability1 capability2 capability3" for example.
|
like this: "CAP REQ :capability1 capability2 capability3" for example.
|
||||||
|
|
||||||
References:
|
References:
|
||||||
- <http://ircv3.atheme.org/specification/capability-negotiation-3.1>
|
- <http://ircv3.net/specs/core/capability-negotiation-3.1.html>
|
||||||
- <http://ngircd.barton.de/doc/Capabilities.txt>
|
- <http://ngircd.barton.de/doc/Capabilities.txt>
|
||||||
- doc/Capabilities.txt
|
- doc/Capabilities.txt
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ General Commands
|
|||||||
In addition, IRC Ops can use these two forms to specify the <target>:
|
In addition, IRC Ops can use these two forms to specify the <target>:
|
||||||
.
|
.
|
||||||
- #<hostmask>
|
- #<hostmask>
|
||||||
- #<servermask>
|
- $<servermask>
|
||||||
.
|
.
|
||||||
The <mask> can contain the wildcard characters "*" and "?", but must
|
The <mask> can contain the wildcard characters "*" and "?", but must
|
||||||
contain at least one dot (".") and no wildcard after the last one.
|
contain at least one dot (".") and no wildcard after the last one.
|
||||||
@@ -380,7 +380,7 @@ Status and Informational Commands
|
|||||||
|
|
||||||
Please note that "all" IRC daemons even parse separate nicknames in
|
Please note that "all" IRC daemons even parse separate nicknames in
|
||||||
a single parameter (like ":nick1 nick2"), and therefore ngIRCd
|
a single parameter (like ":nick1 nick2"), and therefore ngIRCd
|
||||||
implements this behaviour, too.
|
implements this behavior, too.
|
||||||
|
|
||||||
References:
|
References:
|
||||||
- RFC 2812, 4.9 "Ison message"
|
- RFC 2812, 4.9 "Ison message"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
ngIRCd - Next Generation IRC Server
|
ngIRCd - Next Generation IRC Server
|
||||||
http://ngircd.barton.de/
|
http://ngircd.barton.de/
|
||||||
|
|
||||||
(c)2001-2011 Alexander Barton and Contributors.
|
(c)2001-2015 Alexander Barton and Contributors.
|
||||||
ngIRCd is free software and published under the
|
ngIRCd is free software and published under the
|
||||||
terms of the GNU General Public License.
|
terms of the GNU General Public License.
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ get an idea of how to do it the best :-)
|
|||||||
- Use GIT
|
- Use GIT
|
||||||
|
|
||||||
The source code of ngIRCd is maintained using GIT, see doc/GIT.txt. So if
|
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 lifes
|
remotely possible, use GIT for your work, too. It makes your and our lives
|
||||||
much easier ;-)
|
much easier ;-)
|
||||||
|
|
||||||
- Don't forget to include documentation
|
- Don't forget to include documentation
|
||||||
@@ -52,3 +52,9 @@ get an idea of how to do it the best :-)
|
|||||||
|
|
||||||
And this is open source, your work must not be 100% finished and perfect,
|
And this is open source, your work must not be 100% finished and perfect,
|
||||||
work in progress is interesting, too: "release early, release often"!
|
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.
|
||||||
|
|||||||
@@ -99,11 +99,11 @@ IV. Bugs!?
|
|||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
Q: Is there a list of known bugs and desired feature enhancements?
|
Q: Is there a list of known bugs and desired feature enhancements?
|
||||||
A: Yes. Have a look at the bug tracking system (Bugzilla) for ngIRCd located
|
A: Yes. Have a look at the bug tracking system (GitHub issues) for ngIRCd located
|
||||||
at <http://ngircd.barton.de/bugzilla/index.cgi>. There you can file bug
|
at <https://github.com/ngircd/ngircd/issues>. There you can file bug
|
||||||
reports and feature requests as well as search the bug database.
|
reports and feature requests as well as search the bug database.
|
||||||
|
|
||||||
Q: What should I do if I found a bug?
|
Q: What should I do if I found a bug?
|
||||||
A: Please file a bug report at <http://ngircd.barton.de/bugzilla/index.cgi>!
|
A: Please file a bug report at <https://github.com/ngircd/ngircd/issues/new>!
|
||||||
The author of the particular component will be notified automagically :-)
|
The author will be notified automagically :-)
|
||||||
|
|
||||||
|
|||||||
65
doc/GIT.txt
65
doc/GIT.txt
@@ -1,65 +0,0 @@
|
|||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
-- GIT.txt --
|
|
||||||
|
|
||||||
|
|
||||||
The source code of ngIRCd is maintained using GIT, an distributed version
|
|
||||||
control system. Homepage including documentation: <http://git-scm.com/>.
|
|
||||||
|
|
||||||
|
|
||||||
I. Viewing the source code online
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
The ngIRCd "GITweb" interface allows you to browse the GIT repository and
|
|
||||||
to see all individual files, tags, branches, commits etc.:
|
|
||||||
|
|
||||||
<http://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git>
|
|
||||||
|
|
||||||
|
|
||||||
II. Getting the source code
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
To access (copy, clone) the source tree repository anonymously, run:
|
|
||||||
|
|
||||||
$ git clone git://ngircd.barton.de/ngircd.git
|
|
||||||
|
|
||||||
Thereby a new folder "ngircd" will be created containing all the individual
|
|
||||||
source files.
|
|
||||||
|
|
||||||
The newly created directory ("ngircd") is the "working directory", all
|
|
||||||
GIT commands will be executed from within this directory in the future.
|
|
||||||
|
|
||||||
Please note: When checking out a fresh copy of ngIRCd using GIT, the
|
|
||||||
configure script doesn't exist; you have to run the autogen.sh shell script
|
|
||||||
(which is included in the source tree) to generate it. This requires you to
|
|
||||||
have GNU automake and GNU autoconf installed on your system. Please see the
|
|
||||||
file INSTALL for details!
|
|
||||||
|
|
||||||
To update the local GIT repository:
|
|
||||||
|
|
||||||
$ git pull
|
|
||||||
|
|
||||||
This retrieves all changes and merges them into the current branch.
|
|
||||||
|
|
||||||
|
|
||||||
III. Contributing
|
|
||||||
~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Patches should be sent to the ngircd mailing list. List homepage:
|
|
||||||
http://arthur.barton.de/mailman/listinfo/ngircd-ml
|
|
||||||
|
|
||||||
If you do not want to send them to the list, you can also mail them
|
|
||||||
to Alex Barton, <alex@barton.de>.
|
|
||||||
|
|
||||||
|
|
||||||
IV. Write Access
|
|
||||||
~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
If you want to contribute a couple of patches and write access to the GIT
|
|
||||||
repository would be handy, please contact Alex Barton, <alex@barton.de>.
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
ngIRCd - Next Generation IRC Server
|
ngIRCd - Next Generation IRC Server
|
||||||
|
http://ngircd.barton.de/
|
||||||
|
|
||||||
(c)2001-2010 Alexander Barton,
|
(c)2001-2018 Alexander Barton and Contributors.
|
||||||
alex@barton.de, http://www.barton.de/
|
|
||||||
|
|
||||||
ngIRCd is free software and published under the
|
ngIRCd is free software and published under the
|
||||||
terms of the GNU General Public License.
|
terms of the GNU General Public License.
|
||||||
|
|
||||||
@@ -37,6 +36,7 @@ II. How to prepare a new ngIRCd release?
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
a) Make sure the source tree is in a releasable state ;-)
|
a) Make sure the source tree is in a releasable state ;-)
|
||||||
|
- is the AUTHORS file up to date?
|
||||||
|
|
||||||
b) Make sure you have working versions of GNU autoconf and GNU automake
|
b) Make sure you have working versions of GNU autoconf and GNU automake
|
||||||
installed on the system you use for generating the release:
|
installed on the system you use for generating the release:
|
||||||
@@ -72,8 +72,6 @@ k) Sign the distribution archive(s) using GnuPG: "gpg -b <archivefile>"
|
|||||||
l) Upload and distribute the newly generated ngIRCd release archive(s)
|
l) Upload and distribute the newly generated ngIRCd release archive(s)
|
||||||
and GnuPG signatures.
|
and GnuPG signatures.
|
||||||
|
|
||||||
m) Write an announcement to the mailing list, freshmeat, Twitter, ...
|
m) Write an announcement to the mailing list, Twitter, ...
|
||||||
|
|
||||||
n) Update the list of releases in our bug tracker.
|
n) Relax :-)
|
||||||
|
|
||||||
o) Relax :-)
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# ngIRCd -- The Next Generation IRC Daemon
|
# ngIRCd -- The Next Generation IRC Daemon
|
||||||
# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
|
# Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,7 +23,6 @@ static_docs = \
|
|||||||
Commands.txt \
|
Commands.txt \
|
||||||
Contributing.txt \
|
Contributing.txt \
|
||||||
FAQ.txt \
|
FAQ.txt \
|
||||||
GIT.txt \
|
|
||||||
HowToRelease.txt \
|
HowToRelease.txt \
|
||||||
Modes.txt \
|
Modes.txt \
|
||||||
PAM.txt \
|
PAM.txt \
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
ngIRCd - Next Generation IRC Server
|
ngIRCd - Next Generation IRC Server
|
||||||
http://ngircd.barton.de/
|
http://ngircd.barton.de/
|
||||||
|
|
||||||
(c)2001-2014 Alexander Barton and Contributors.
|
(c)2001-2015 Alexander Barton and Contributors.
|
||||||
ngIRCd is free software and published under the
|
ngIRCd is free software and published under the
|
||||||
terms of the GNU General Public License.
|
terms of the GNU General Public License.
|
||||||
|
|
||||||
@@ -28,6 +28,7 @@ channels he is using at the moment.
|
|||||||
C 19 Only users that share a channel are allowed to send messages.
|
C 19 Only users that share a channel are allowed to send messages.
|
||||||
F 22 Relaxed flood protection (only settable by IRC Operators).
|
F 22 Relaxed flood protection (only settable by IRC Operators).
|
||||||
i 0.0.1 User is "invisible".
|
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.
|
o 0.0.1 User is IRC operator.
|
||||||
q 20 User is protected, can not be kicked from a channel.
|
q 20 User is protected, can not be kicked from a channel.
|
||||||
r 0.0.1 User is restricted.
|
r 0.0.1 User is restricted.
|
||||||
@@ -55,6 +56,7 @@ users to lists (e.g. "invite list", "ban list"), others have parameters
|
|||||||
m 0.3.0 Channel is moderated, only "voiced" users can send messages.
|
m 0.3.0 Channel is moderated, only "voiced" users can send messages.
|
||||||
M 20 Only registered users (and IRC Ops) 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 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.
|
O 18 Only IRC operators are allowed to join this channel.
|
||||||
P 0.5.0 Channel is "persistent".
|
P 0.5.0 Channel is "persistent".
|
||||||
Q 20 Nobody can be kicked from the channel.
|
Q 20 Nobody can be kicked from the channel.
|
||||||
@@ -73,17 +75,21 @@ channel of which he is a member.
|
|||||||
|
|
||||||
mode since description
|
mode since description
|
||||||
|
|
||||||
q 20 User is channel owner can only be set by a service, other
|
q 20 User is channel owner. This mode can only be set by an IRC
|
||||||
owner and irc op. Can promote other users to q, a, o, h, v.
|
service, other owner or IRC operator. Channel owners can
|
||||||
a 20 User is channel admin and can promote other users to v, h, o
|
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.
|
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
|
h 20 User is half op and can set channel modes imntvIbek and kick
|
||||||
voiced and normal users.
|
voiced and normal users. Prefix: "%".
|
||||||
v 0.2.0 User is "voiced" and can speak even if channel is moderated.
|
v 0.2.0 User is "voiced" and can speak even if channel is moderated.
|
||||||
|
Prefix: "+".
|
||||||
|
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|
||||||
(1) This mode is not set by ngIRCd itself but by services. ngIRCd handles
|
(1) This mode is not set by ngIRCd itself but by services. ngIRCd handles
|
||||||
the mode transparently and possibly adjusts its behaviour.
|
the mode transparently and possibly adjusts its behavior.
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ A very simple -- and quite useless ;-) -- example would be:
|
|||||||
Here the "pam_debug" module will be called each time a client connects to
|
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 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:
|
Please note ONE VERY IMPORTANT THING:
|
||||||
|
|
||||||
All the PAM modules are executed with the privileges of the user ngIRCd
|
All the PAM modules are executed with the privileges of the user ngIRCd
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
ngIRCd - Next Generation IRC Server
|
ngIRCd - Next Generation IRC Server
|
||||||
http://ngircd.barton.de/
|
http://ngircd.barton.de/
|
||||||
|
|
||||||
(c)2001-2013 Alexander Barton and Contributors.
|
(c)2001-2016 Alexander Barton and Contributors.
|
||||||
ngIRCd is free software and published under the
|
ngIRCd is free software and published under the
|
||||||
terms of the GNU General Public License.
|
terms of the GNU General Public License.
|
||||||
|
|
||||||
@@ -32,6 +32,7 @@ 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-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.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.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/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
|
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
|
hppa1.1/unknown/linux-gnu gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y
|
||||||
@@ -40,34 +41,37 @@ 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/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/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/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.9 gcc 3.2.2 CVSHEAD 04-02-24 alex Y Y Y Y
|
||||||
i386/pc/solaris2.11 gcc 4.5.2 21~rc2 13-10-27 alex Y Y N Y 4
|
i386/pc/solaris2.11 gcc 4.8.2 23 16-02-07 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/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/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 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
|
||||||
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/unkn./kfreebsd7.2-gnu gcc 4.3.4 15 09-12-02 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.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/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/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 19 12-02-29 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/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 21 13-11-17 goetz 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/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/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.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
|
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/haiku gcc 2.95.3 19.2~138 12-10-11 user Y Y N N
|
||||||
i586/pc/interix3.5 gcc 3.3 19 12-02-29 alex Y Y N Y
|
i586/pc/interix3.5 gcc 3.3 23 16-01-29 alex Y Y N Y
|
||||||
i686/pc/cygwin gcc 4.8.3 22~rc1-3 14-10-10 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.7.2 21~38 14-01-06 goetz Y Y Y Y 1
|
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 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 3.3.5 14.1 09-08-04 alex Y Y Y Y 1
|
||||||
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
|
|
||||||
i686/pc/linux-gnu gcc 4.3.2 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/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 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.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 gcc 2.7.2 19 12-02-26 alex Y Y N Y
|
||||||
@@ -89,22 +93,27 @@ 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/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/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/darwin13.0.0 A-clang 5.0 21 14-01-02 alex Y Y Y Y 3
|
||||||
x86_64/apple/darwin14.0.0 A-clang 6.0 22~rc1-3 14-10-10 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.3.0 A-clang 8.0 24~rc1-7 17-01-20 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/unknown/dragonfly3.4 gcc 4.7.2 21 13-11-12 goetz Y Y N Y 3
|
||||||
x86_64/unknown/freebsd8.4 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y y 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/freebsd9.2 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y Y Y 3
|
||||||
x86_64/unknown/freebsd10.0 F-clang 3.3 22~rc1-3 14-10-10 alex Y Y Y Y 3
|
x86_64/unknown/freebsd10.0 F-clang 3.3 22~rc1-3 14-10-10 alex Y Y Y 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/linux-gnu clang 3.3 21 14-01-07 alex Y Y Y Y 1
|
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/unknown/linux-gnu clang 3.4 22~rc1-3 14-10-11 alex Y Y Y Y 1
|
||||||
x86_64/unknown/linux-gnu gcc 4.4.5 22~rc1-3 14-10-10 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 22~rc1-3 14-10-10 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/unknown/linux-gnu gcc 4.8.2 21 13-12-29 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/unknown/linux-gnu gcc 4.9.1 22~rc1-3 14-10-10 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 gcc 6.2.1 24~rc1-7 17-01-20 alex Y Y Y Y 1
|
||||||
|
x86_64/pc/linux-gnu gcc 6.3.1 24~rc1-7 17-01-20 alex Y Y Y Y 1
|
||||||
|
x86_64/unknown/linux-gnu icc 16 23 16-01-13 goetz Y Y Y Y 1
|
||||||
x86_64/unknown/linux-gnu nwcc 0.8.2 21 13-12-01 goetz Y Y Y Y 1
|
x86_64/unknown/linux-gnu 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 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/linux-gnu Sun C 5.12 21.1 14-03-27 goetz Y Y Y Y 1
|
||||||
x86_64/unknown/linux-gnu tcc 0.9.25 21.1 14-03-27 goetz Y Y Y Y 1
|
|
||||||
x86_64/unknown/openbsd4.7 gcc 3.3.5 20~rc1 12-02-26 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/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.1 gcc 4.2.1 21 13-12-28 alex Y Y Y Y 3
|
||||||
|
|||||||
13
doc/RFC.txt
13
doc/RFC.txt
@@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
ngIRCd - Next Generation IRC Server
|
ngIRCd - Next Generation IRC Server
|
||||||
|
http://ngircd.barton.de/
|
||||||
|
|
||||||
(c)2001-2003 by Alexander Barton,
|
(c)2001-2017 Alexander Barton and Contributors.
|
||||||
alex@barton.de, http://www.barton.de/
|
|
||||||
|
|
||||||
ngIRCd is free software and published under the
|
ngIRCd is free software and published under the
|
||||||
terms of the GNU General Public License.
|
terms of the GNU General Public License.
|
||||||
|
|
||||||
@@ -11,7 +10,8 @@
|
|||||||
|
|
||||||
|
|
||||||
The Internet Relay Chat (IRC) protocol is documented in these Request for
|
The Internet Relay Chat (IRC) protocol is documented in these Request for
|
||||||
Comments (RFC), which you can get e.g. via <http://www.faqs.org/>:
|
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",
|
1459 Oikarinen, J. & D. Reed, "Internet Relay Chat Protocol",
|
||||||
May 1993, [IRC].
|
May 1993, [IRC].
|
||||||
@@ -28,6 +28,5 @@ Comments (RFC), which you can get e.g. via <http://www.faqs.org/>:
|
|||||||
2813 Kalt, C., "Internet Relay Chat: Server Protocol",
|
2813 Kalt, C., "Internet Relay Chat: Server Protocol",
|
||||||
April 2000, [IRC-SERVER].
|
April 2000, [IRC-SERVER].
|
||||||
|
|
||||||
|
7194 Hartmann, R., "Default Port for Internet Relay Chat (IRC) via TLS/SSL",
|
||||||
--
|
August 2014.
|
||||||
$Id: RFC.txt,v 1.6 2003/03/07 20:42:20 alex Exp $
|
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ services instead of regular IRC users.
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
[GLOBAL]
|
||||||
|
Name = server.irc.net
|
||||||
|
Ports = 6667
|
||||||
|
|
||||||
[SERVER]
|
[SERVER]
|
||||||
Name = services.irc.net
|
Name = services.irc.net
|
||||||
MyPassword = 123abc
|
MyPassword = 123abc
|
||||||
@@ -104,6 +108,10 @@ The following settings need to be in atheme.conf:
|
|||||||
|
|
||||||
loadmodule "modules/protocol/ngircd";
|
loadmodule "modules/protocol/ngircd";
|
||||||
|
|
||||||
|
serverinfo {
|
||||||
|
name = "services.irc.net";
|
||||||
|
}
|
||||||
|
|
||||||
uplink "server.irc.net" {
|
uplink "server.irc.net" {
|
||||||
password = "123abc";
|
password = "123abc";
|
||||||
port = 6667;
|
port = 6667;
|
||||||
|
|||||||
@@ -193,9 +193,9 @@
|
|||||||
;MorePrivacy = no
|
;MorePrivacy = no
|
||||||
|
|
||||||
# Normally ngIRCd doesn't send any messages to a client until it is
|
# Normally ngIRCd doesn't send any messages to a client until it is
|
||||||
# registered. Enable this option to let the daemon send "NOTICE AUTH"
|
# registered. Enable this option to let the daemon send "NOTICE *"
|
||||||
# messages to clients while connecting.
|
# messages to clients while connecting.
|
||||||
;NoticeAuth = no
|
;NoticeBeforeRegistration = no
|
||||||
|
|
||||||
# Should IRC Operators be allowed to use the MODE command even if
|
# Should IRC Operators be allowed to use the MODE command even if
|
||||||
# they are not(!) channel-operators?
|
# they are not(!) channel-operators?
|
||||||
@@ -226,6 +226,15 @@
|
|||||||
# character prepended to their respective user names!
|
# character prepended to their respective user names!
|
||||||
;PAMIsOptional = no
|
;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,
|
# Let ngIRCd send an "authentication PING" when a new client connects,
|
||||||
# and register this client only after receiving the corresponding
|
# and register this client only after receiving the corresponding
|
||||||
# "PONG" reply.
|
# "PONG" reply.
|
||||||
|
|||||||
1
doc/src/.gitignore
vendored
1
doc/src/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
html
|
|
||||||
2
man/.gitignore
vendored
2
man/.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
ngircd.8
|
|
||||||
ngircd.conf.5
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" ngircd(8) manual page template
|
.\" ngircd(8) manual page template
|
||||||
.\"
|
.\"
|
||||||
.TH ngircd 8 "Oct 2013" ngIRCd "ngIRCd Manual"
|
.TH ngircd 8 "Jan 2018" ngIRCd "ngIRCd Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ngIRCd \- the "next generation" IRC daemon
|
ngIRCd \- the "next generation" IRC daemon
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" ngircd.conf(5) manual page template
|
.\" ngircd.conf(5) manual page template
|
||||||
.\"
|
.\"
|
||||||
.TH ngircd.conf 5 "Oct 2014" ngIRCd "ngIRCd Manual"
|
.TH ngircd.conf 5 "Jan 2018" ngIRCd "ngIRCd Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ngircd.conf \- configuration file of ngIRCd
|
ngircd.conf \- configuration file of ngIRCd
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -83,7 +83,7 @@ blocks are used to configure pre-defined ("persistent") IRC channels.
|
|||||||
.PP
|
.PP
|
||||||
There can be more than one [Operator], [Server] and [Channel] section per
|
There can be more than one [Operator], [Server] and [Channel] section per
|
||||||
configuration file, one for each operator, server, and channel. [Global],
|
configuration file, one for each operator, server, and channel. [Global],
|
||||||
[Limits], [Options], and [SSL] sections can occure multiple times, too, but
|
[Limits], [Options], and [SSL] sections can occur multiple times, too, but
|
||||||
each variable overwrites itself, only the last assignment is relevant.
|
each variable overwrites itself, only the last assignment is relevant.
|
||||||
.SH [GLOBAL]
|
.SH [GLOBAL]
|
||||||
The
|
The
|
||||||
@@ -252,8 +252,8 @@ The Salt for cloaked hostname hashing. When undefined a random hash is
|
|||||||
generated after each server start.
|
generated after each server start.
|
||||||
.TP
|
.TP
|
||||||
\fBCloakUserToNick\fR (boolean)
|
\fBCloakUserToNick\fR (boolean)
|
||||||
Set every clients' user name to their nickname and hide the one supplied
|
Set every clients' user name and real name to their nickname and hide the one
|
||||||
by the IRC client. Default: no.
|
supplied by the IRC client. Default: no.
|
||||||
.TP
|
.TP
|
||||||
\fBConnectIPv4\fR (boolean)
|
\fBConnectIPv4\fR (boolean)
|
||||||
Set this to no if you do not want ngIRCd to connect to other IRC servers using
|
Set this to no if you do not want ngIRCd to connect to other IRC servers using
|
||||||
@@ -291,16 +291,17 @@ Default: none.
|
|||||||
.TP
|
.TP
|
||||||
\fBMorePrivacy\fR (boolean)
|
\fBMorePrivacy\fR (boolean)
|
||||||
This will cause ngIRCd to censor user idle time, logon time as well as the
|
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
|
PART/QUIT messages (that are sometimes used to inform everyone about which
|
||||||
client software is being used). WHOWAS requests are also silently ignored.
|
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
|
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
|
anonymizing software such as TOR or I2P and one does not wish to make it
|
||||||
too easy to collect statistics on the users.
|
too easy to collect statistics on the users.
|
||||||
Default: no.
|
Default: no.
|
||||||
.TP
|
.TP
|
||||||
\fBNoticeAuth\fR (boolean)
|
\fBNoticeBeforeRegistration\fR (boolean)
|
||||||
Normally ngIRCd doesn't send any messages to a client until it is registered.
|
Normally ngIRCd doesn't send any messages to a client until it is registered.
|
||||||
Enable this option to let the daemon send "NOTICE AUTH" messages to clients
|
Enable this option to let the daemon send "NOTICE *" messages to clients
|
||||||
while connecting. Default: no.
|
while connecting. Default: no.
|
||||||
.TP
|
.TP
|
||||||
\fBOperCanUseMode\fR (boolean)
|
\fBOperCanUseMode\fR (boolean)
|
||||||
@@ -338,6 +339,14 @@ able to distinguish between Ident'ified and PAM-authenticated users: both
|
|||||||
don't have a "~" character prepended to their respective user names!
|
don't have a "~" character prepended to their respective user names!
|
||||||
Default: no.
|
Default: no.
|
||||||
.TP
|
.TP
|
||||||
|
\fBPAMServiceName\fR (string)
|
||||||
|
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.
|
||||||
|
Default: ngircd.
|
||||||
|
.TP
|
||||||
\fBRequireAuthPing\fR (boolean)
|
\fBRequireAuthPing\fR (boolean)
|
||||||
Let ngIRCd send an "authentication PING" when a new client connects, and
|
Let ngIRCd send an "authentication PING" when a new client connects, and
|
||||||
register this client only after receiving the corresponding "PONG" reply.
|
register this client only after receiving the corresponding "PONG" reply.
|
||||||
|
|||||||
4
src/.gitignore
vendored
4
src/.gitignore
vendored
@@ -1,4 +0,0 @@
|
|||||||
config.h
|
|
||||||
config.h.in
|
|
||||||
config.h.in~
|
|
||||||
stamp-h1
|
|
||||||
1
src/ipaddr/.gitignore
vendored
1
src/ipaddr/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
Makefile.am
|
|
||||||
5
src/ngircd/.gitignore
vendored
5
src/ngircd/.gitignore
vendored
@@ -1,5 +0,0 @@
|
|||||||
Makefile.am
|
|
||||||
check-help
|
|
||||||
check-version
|
|
||||||
ngircd
|
|
||||||
ngircd.exe
|
|
||||||
@@ -352,14 +352,19 @@ Channel_Kick(CLIENT *Peer, CLIENT *Target, CLIENT *Origin, const char *Name,
|
|||||||
!Channel_UserHasMode(chan, Target, 'q') &&
|
!Channel_UserHasMode(chan, Target, 'q') &&
|
||||||
!Channel_UserHasMode(chan, Target, 'a'))
|
!Channel_UserHasMode(chan, Target, 'a'))
|
||||||
can_kick = true;
|
can_kick = true;
|
||||||
|
|
||||||
/* Half Op can't kick owner | admin | op */
|
/* Half Op can't kick owner | admin | op */
|
||||||
else if (Channel_UserHasMode(chan, Peer, 'h') &&
|
else if (Channel_UserHasMode(chan, Peer, 'h') &&
|
||||||
!Channel_UserHasMode(chan, Target, 'q') &&
|
!Channel_UserHasMode(chan, Target, 'q') &&
|
||||||
!Channel_UserHasMode(chan, Target, 'a') &&
|
!Channel_UserHasMode(chan, Target, 'a') &&
|
||||||
!Channel_UserHasMode(chan, Target, 'o'))
|
!Channel_UserHasMode(chan, Target, 'o'))
|
||||||
can_kick = true;
|
can_kick = true;
|
||||||
|
|
||||||
|
/* IRC operators & IRCd with OperCanMode enabled
|
||||||
|
* can kick anyways regardless of privilege */
|
||||||
|
else if(Client_HasMode(Origin, 'o') && Conf_OperCanMode)
|
||||||
|
can_kick = true;
|
||||||
|
|
||||||
if(!can_kick) {
|
if(!can_kick) {
|
||||||
IRC_WriteErrClient(Origin, ERR_CHANOPPRIVTOOLOW_MSG,
|
IRC_WriteErrClient(Origin, ERR_CHANOPPRIVTOOLOW_MSG,
|
||||||
Client_ID(Origin), Name);
|
Client_ID(Origin), Name);
|
||||||
@@ -1039,7 +1044,7 @@ Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const ch
|
|||||||
switch( Type )
|
switch( Type )
|
||||||
{
|
{
|
||||||
case REMOVE_QUIT:
|
case REMOVE_QUIT:
|
||||||
/* QUIT: other servers have already been notified,
|
/* QUIT: other servers have already been notified,
|
||||||
* see Client_Destroy(); so only inform other clients
|
* see Client_Destroy(); so only inform other clients
|
||||||
* in same channel. */
|
* in same channel. */
|
||||||
assert( InformServer == false );
|
assert( InformServer == false );
|
||||||
@@ -1093,29 +1098,29 @@ Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const ch
|
|||||||
|
|
||||||
|
|
||||||
GLOBAL bool
|
GLOBAL bool
|
||||||
Channel_AddBan(CHANNEL *c, const char *mask )
|
Channel_AddBan(CHANNEL *c, const char *mask, const char *who )
|
||||||
{
|
{
|
||||||
struct list_head *h = Channel_GetListBans(c);
|
struct list_head *h = Channel_GetListBans(c);
|
||||||
LogDebug("Adding \"%s\" to \"%s\" ban list", mask, Channel_Name(c));
|
LogDebug("Adding \"%s\" to \"%s\" ban list", mask, Channel_Name(c));
|
||||||
return Lists_Add(h, mask, false, NULL);
|
return Lists_Add(h, mask, time(NULL), who, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GLOBAL bool
|
GLOBAL bool
|
||||||
Channel_AddExcept(CHANNEL *c, const char *mask )
|
Channel_AddExcept(CHANNEL *c, const char *mask, const char *who )
|
||||||
{
|
{
|
||||||
struct list_head *h = Channel_GetListExcepts(c);
|
struct list_head *h = Channel_GetListExcepts(c);
|
||||||
LogDebug("Adding \"%s\" to \"%s\" exception list", mask, Channel_Name(c));
|
LogDebug("Adding \"%s\" to \"%s\" exception list", mask, Channel_Name(c));
|
||||||
return Lists_Add(h, mask, false, NULL);
|
return Lists_Add(h, mask, time(NULL), who, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GLOBAL bool
|
GLOBAL bool
|
||||||
Channel_AddInvite(CHANNEL *c, const char *mask, bool onlyonce)
|
Channel_AddInvite(CHANNEL *c, const char *mask, bool onlyonce, const char *who )
|
||||||
{
|
{
|
||||||
struct list_head *h = Channel_GetListInvites(c);
|
struct list_head *h = Channel_GetListInvites(c);
|
||||||
LogDebug("Adding \"%s\" to \"%s\" invite list", mask, Channel_Name(c));
|
LogDebug("Adding \"%s\" to \"%s\" invite list", mask, Channel_Name(c));
|
||||||
return Lists_Add(h, mask, onlyonce, NULL);
|
return Lists_Add(h, mask, time(NULL), who, onlyonce);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1132,7 +1137,9 @@ ShowChannelList(struct list_head *head, CLIENT *Client, CHANNEL *Channel,
|
|||||||
while (e) {
|
while (e) {
|
||||||
if (!IRC_WriteStrClient(Client, msg, Client_ID(Client),
|
if (!IRC_WriteStrClient(Client, msg, Client_ID(Client),
|
||||||
Channel_Name(Channel),
|
Channel_Name(Channel),
|
||||||
Lists_GetMask(e)))
|
Lists_GetMask(e),
|
||||||
|
Lists_GetReason(e),
|
||||||
|
Lists_GetValidity(e)))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
e = Lists_GetNext(e);
|
e = Lists_GetNext(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,10 +127,10 @@ GLOBAL char *Channel_TopicWho PARAMS(( CHANNEL *Chan ));
|
|||||||
GLOBAL unsigned int Channel_CreationTime PARAMS(( CHANNEL *Chan ));
|
GLOBAL unsigned int Channel_CreationTime PARAMS(( CHANNEL *Chan ));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GLOBAL bool Channel_AddBan PARAMS((CHANNEL *c, const char *Mask));
|
GLOBAL bool Channel_AddBan PARAMS((CHANNEL *c, const char *Mask, const char *who));
|
||||||
GLOBAL bool Channel_AddExcept PARAMS((CHANNEL *c, const char *Mask));
|
GLOBAL bool Channel_AddExcept PARAMS((CHANNEL *c, const char *Mask, const char *who));
|
||||||
GLOBAL bool Channel_AddInvite PARAMS((CHANNEL *c, const char *Mask,
|
GLOBAL bool Channel_AddInvite PARAMS((CHANNEL *c, const char *Mask,
|
||||||
bool OnlyOnce));
|
bool OnlyOnce, const char *who));
|
||||||
|
|
||||||
GLOBAL bool Channel_ShowBans PARAMS((CLIENT *client, CHANNEL *c));
|
GLOBAL bool Channel_ShowBans PARAMS((CLIENT *client, CHANNEL *c));
|
||||||
GLOBAL bool Channel_ShowExcepts PARAMS((CLIENT *client, CHANNEL *c));
|
GLOBAL bool Channel_ShowExcepts PARAMS((CLIENT *client, CHANNEL *c));
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ Class_AddMask(const int Class, const char *Pattern, time_t ValidUntil,
|
|||||||
|
|
||||||
Lists_MakeMask(Pattern, mask, sizeof(mask));
|
Lists_MakeMask(Pattern, mask, sizeof(mask));
|
||||||
return Lists_Add(&My_Classes[Class], mask,
|
return Lists_Add(&My_Classes[Class], mask,
|
||||||
ValidUntil, Reason);
|
ValidUntil, Reason, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLOBAL void
|
GLOBAL void
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ GLOBAL void
|
|||||||
Client_Init( void )
|
Client_Init( void )
|
||||||
{
|
{
|
||||||
struct hostent *h;
|
struct hostent *h;
|
||||||
|
|
||||||
This_Server = New_Client_Struct( );
|
This_Server = New_Client_Struct( );
|
||||||
if( ! This_Server )
|
if( ! This_Server )
|
||||||
{
|
{
|
||||||
@@ -98,7 +98,7 @@ Client_Init( void )
|
|||||||
Client_SetInfo( This_Server, Conf_ServerInfo );
|
Client_SetInfo( This_Server, Conf_ServerInfo );
|
||||||
|
|
||||||
My_Clients = This_Server;
|
My_Clients = This_Server;
|
||||||
|
|
||||||
memset( &My_Whowas, 0, sizeof( My_Whowas ));
|
memset( &My_Whowas, 0, sizeof( My_Whowas ));
|
||||||
} /* Client_Init */
|
} /* Client_Init */
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ Client_Exit( void )
|
|||||||
|
|
||||||
if( NGIRCd_SignalRestart ) Client_Destroy( This_Server, "Server going down (restarting).", NULL, false );
|
if( NGIRCd_SignalRestart ) Client_Destroy( This_Server, "Server going down (restarting).", NULL, false );
|
||||||
else Client_Destroy( This_Server, "Server going down.", NULL, false );
|
else Client_Destroy( This_Server, "Server going down.", NULL, false );
|
||||||
|
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
c = My_Clients;
|
c = My_Clients;
|
||||||
while(c) {
|
while(c) {
|
||||||
@@ -228,7 +228,7 @@ GLOBAL void
|
|||||||
Client_Destroy( CLIENT *Client, const char *LogMsg, const char *FwdMsg, bool SendQuit )
|
Client_Destroy( CLIENT *Client, const char *LogMsg, const char *FwdMsg, bool SendQuit )
|
||||||
{
|
{
|
||||||
/* remove a client */
|
/* remove a client */
|
||||||
|
|
||||||
CLIENT *last, *c;
|
CLIENT *last, *c;
|
||||||
char msg[COMMAND_LEN];
|
char msg[COMMAND_LEN];
|
||||||
const char *txt;
|
const char *txt;
|
||||||
@@ -381,7 +381,7 @@ Client_SetID( CLIENT *Client, const char *ID )
|
|||||||
{
|
{
|
||||||
assert( Client != NULL );
|
assert( Client != NULL );
|
||||||
assert( ID != NULL );
|
assert( ID != NULL );
|
||||||
|
|
||||||
strlcpy( Client->id, ID, sizeof( Client->id ));
|
strlcpy( Client->id, ID, sizeof( Client->id ));
|
||||||
|
|
||||||
if (Conf_CloakUserToNick) {
|
if (Conf_CloakUserToNick) {
|
||||||
@@ -698,7 +698,7 @@ Client_ID( CLIENT *Client )
|
|||||||
if(Client->type == CLIENT_USER)
|
if(Client->type == CLIENT_USER)
|
||||||
assert(strlen(Client->id) < Conf_MaxNickLength);
|
assert(strlen(Client->id) < Conf_MaxNickLength);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( Client->id[0] ) return Client->id;
|
if( Client->id[0] ) return Client->id;
|
||||||
else return "*";
|
else return "*";
|
||||||
} /* Client_ID */
|
} /* Client_ID */
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ Conf_Test( void )
|
|||||||
? (const char*) array_start(&Conf_Motd) : "");
|
? (const char*) array_start(&Conf_Motd) : "");
|
||||||
}
|
}
|
||||||
printf(" Network = %s\n", Conf_Network);
|
printf(" Network = %s\n", Conf_Network);
|
||||||
if (!Conf_PAM)
|
if (!Conf_PAM)
|
||||||
printf(" Password = %s\n", Conf_ServerPwd);
|
printf(" Password = %s\n", Conf_ServerPwd);
|
||||||
printf(" PidFile = %s\n", Conf_PidFile);
|
printf(" PidFile = %s\n", Conf_PidFile);
|
||||||
printf(" Ports = ");
|
printf(" Ports = ");
|
||||||
@@ -412,13 +412,14 @@ Conf_Test( void )
|
|||||||
#endif
|
#endif
|
||||||
printf(" IncludeDir = %s\n", Conf_IncludeDir);
|
printf(" IncludeDir = %s\n", Conf_IncludeDir);
|
||||||
printf(" MorePrivacy = %s\n", yesno_to_str(Conf_MorePrivacy));
|
printf(" MorePrivacy = %s\n", yesno_to_str(Conf_MorePrivacy));
|
||||||
printf(" NoticeAuth = %s\n", yesno_to_str(Conf_NoticeAuth));
|
printf(" NoticeBeforeRegistration = %s\n", yesno_to_str(Conf_NoticeBeforeRegistration));
|
||||||
printf(" OperCanUseMode = %s\n", yesno_to_str(Conf_OperCanMode));
|
printf(" OperCanUseMode = %s\n", yesno_to_str(Conf_OperCanMode));
|
||||||
printf(" OperChanPAutoOp = %s\n", yesno_to_str(Conf_OperChanPAutoOp));
|
printf(" OperChanPAutoOp = %s\n", yesno_to_str(Conf_OperChanPAutoOp));
|
||||||
printf(" OperServerMode = %s\n", yesno_to_str(Conf_OperServerMode));
|
printf(" OperServerMode = %s\n", yesno_to_str(Conf_OperServerMode));
|
||||||
#ifdef PAM
|
#ifdef PAM
|
||||||
printf(" PAM = %s\n", yesno_to_str(Conf_PAM));
|
printf(" PAM = %s\n", yesno_to_str(Conf_PAM));
|
||||||
printf(" PAMIsOptional = %s\n", yesno_to_str(Conf_PAMIsOptional));
|
printf(" PAMIsOptional = %s\n", yesno_to_str(Conf_PAMIsOptional));
|
||||||
|
printf(" PAMServiceName = %s\n", Conf_PAMServiceName);
|
||||||
#endif
|
#endif
|
||||||
#ifndef STRICT_RFC
|
#ifndef STRICT_RFC
|
||||||
printf(" RequireAuthPing = %s\n", yesno_to_str(Conf_AuthPing));
|
printf(" RequireAuthPing = %s\n", yesno_to_str(Conf_AuthPing));
|
||||||
@@ -797,7 +798,7 @@ Set_Defaults(bool InitServers)
|
|||||||
#endif
|
#endif
|
||||||
strcpy(Conf_IncludeDir, "");
|
strcpy(Conf_IncludeDir, "");
|
||||||
Conf_MorePrivacy = false;
|
Conf_MorePrivacy = false;
|
||||||
Conf_NoticeAuth = false;
|
Conf_NoticeBeforeRegistration = false;
|
||||||
Conf_OperCanMode = false;
|
Conf_OperCanMode = false;
|
||||||
Conf_OperChanPAutoOp = true;
|
Conf_OperChanPAutoOp = true;
|
||||||
Conf_OperServerMode = false;
|
Conf_OperServerMode = false;
|
||||||
@@ -807,6 +808,7 @@ Set_Defaults(bool InitServers)
|
|||||||
Conf_PAM = false;
|
Conf_PAM = false;
|
||||||
#endif
|
#endif
|
||||||
Conf_PAMIsOptional = false;
|
Conf_PAMIsOptional = false;
|
||||||
|
strcpy(Conf_PAMServiceName, "ngircd");
|
||||||
Conf_ScrubCTCP = false;
|
Conf_ScrubCTCP = false;
|
||||||
#ifdef SYSLOG
|
#ifdef SYSLOG
|
||||||
#ifdef LOG_LOCAL5
|
#ifdef LOG_LOCAL5
|
||||||
@@ -1797,7 +1799,19 @@ Handle_OPTIONS(const char *File, int Line, char *Var, char *Arg)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (strcasecmp(Var, "NoticeAuth") == 0) {
|
if (strcasecmp(Var, "NoticeAuth") == 0) {
|
||||||
Conf_NoticeAuth = Check_ArgIsTrue(Arg);
|
/*
|
||||||
|
* TODO: This section and support for "NoticeAuth" variable
|
||||||
|
* could be removed starting with ngIRCd release 24 (one
|
||||||
|
* release after marking it "deprecated") ...
|
||||||
|
*/
|
||||||
|
Config_Error(LOG_WARNING,
|
||||||
|
"%s, line %d (section \"Options\"): \"%s\" is deprecated, please use \"NoticeBeforeRegistration\"!",
|
||||||
|
File, Line, Var);
|
||||||
|
Conf_NoticeBeforeRegistration = Check_ArgIsTrue(Arg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (strcasecmp(Var, "NoticeBeforeRegistration") == 0) {
|
||||||
|
Conf_NoticeBeforeRegistration = Check_ArgIsTrue(Arg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (strcasecmp(Var, "OperCanUseMode") == 0) {
|
if (strcasecmp(Var, "OperCanUseMode") == 0) {
|
||||||
@@ -1821,6 +1835,12 @@ Handle_OPTIONS(const char *File, int Line, char *Var, char *Arg)
|
|||||||
Conf_PAMIsOptional = Check_ArgIsTrue(Arg);
|
Conf_PAMIsOptional = Check_ArgIsTrue(Arg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (strcasecmp(Var, "PAMServiceName") == 0) {
|
||||||
|
len = strlcpy(Conf_PAMServiceName, Arg, sizeof(Conf_PAMServiceName));
|
||||||
|
if (len >= sizeof(Conf_PAMServiceName))
|
||||||
|
Config_Error_TooLong(File, Line, Var);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (strcasecmp(Var, "PredefChannelsOnly") == 0) {
|
if (strcasecmp(Var, "PredefChannelsOnly") == 0) {
|
||||||
/*
|
/*
|
||||||
* TODO: This section and support for "PredefChannelsOnly"
|
* TODO: This section and support for "PredefChannelsOnly"
|
||||||
|
|||||||
@@ -194,8 +194,8 @@ GLOBAL bool Conf_Ident;
|
|||||||
/** Enable "more privacy" mode and "censor" some user-related information */
|
/** Enable "more privacy" mode and "censor" some user-related information */
|
||||||
GLOBAL bool Conf_MorePrivacy;
|
GLOBAL bool Conf_MorePrivacy;
|
||||||
|
|
||||||
/** Enable NOTICE AUTH messages on connect */
|
/** Enable "NOTICE *" messages on connect */
|
||||||
GLOBAL bool Conf_NoticeAuth;
|
GLOBAL bool Conf_NoticeBeforeRegistration;
|
||||||
|
|
||||||
/** Enable all usage of PAM, even when compiled with support for it */
|
/** Enable all usage of PAM, even when compiled with support for it */
|
||||||
GLOBAL bool Conf_PAM;
|
GLOBAL bool Conf_PAM;
|
||||||
@@ -203,6 +203,9 @@ GLOBAL bool Conf_PAM;
|
|||||||
/** Don't require all clients to send a password an to be PAM authenticated */
|
/** Don't require all clients to send a password an to be PAM authenticated */
|
||||||
GLOBAL bool Conf_PAMIsOptional;
|
GLOBAL bool Conf_PAMIsOptional;
|
||||||
|
|
||||||
|
/** The service name to use for PAM */
|
||||||
|
GLOBAL char Conf_PAMServiceName[MAX_PAM_SERVICE_NAME_LEN];
|
||||||
|
|
||||||
/** Disable all CTCP commands except for /me ? */
|
/** Disable all CTCP commands except for /me ? */
|
||||||
GLOBAL bool Conf_ScrubCTCP;
|
GLOBAL bool Conf_ScrubCTCP;
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ GLOBAL CONN_ID
|
|||||||
Conn_First( void )
|
Conn_First( void )
|
||||||
{
|
{
|
||||||
CONN_ID i;
|
CONN_ID i;
|
||||||
|
|
||||||
for( i = 0; i < Pool_Size; i++ )
|
for( i = 0; i < Pool_Size; i++ )
|
||||||
{
|
{
|
||||||
if( My_Connections[i].sock != NONE ) return i;
|
if( My_Connections[i].sock != NONE ) return i;
|
||||||
@@ -152,7 +152,7 @@ Conn_Next( CONN_ID Idx )
|
|||||||
CONN_ID i = NONE;
|
CONN_ID i = NONE;
|
||||||
|
|
||||||
assert( Idx > NONE );
|
assert( Idx > NONE );
|
||||||
|
|
||||||
for( i = Idx + 1; i < Pool_Size; i++ )
|
for( i = Idx + 1; i < Pool_Size; i++ )
|
||||||
{
|
{
|
||||||
if( My_Connections[i].sock != NONE ) return i;
|
if( My_Connections[i].sock != NONE ) return i;
|
||||||
|
|||||||
@@ -283,10 +283,12 @@ ConnSSL_InitLibrary( void )
|
|||||||
#ifdef HAVE_LIBSSL
|
#ifdef HAVE_LIBSSL
|
||||||
SSL_CTX *newctx;
|
SSL_CTX *newctx;
|
||||||
|
|
||||||
|
#if OPENSSL_API_COMPAT < 0x10100000L
|
||||||
if (!ssl_ctx) {
|
if (!ssl_ctx) {
|
||||||
SSL_library_init();
|
SSL_library_init();
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!RAND_status()) {
|
if (!RAND_status()) {
|
||||||
Log(LOG_ERR, "OpenSSL PRNG not seeded: /dev/urandom missing?");
|
Log(LOG_ERR, "OpenSSL PRNG not seeded: /dev/urandom missing?");
|
||||||
@@ -317,6 +319,7 @@ ConnSSL_InitLibrary( void )
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SSL_CTX_set_session_id_context(newctx, (unsigned char *)"ngircd", 6);
|
||||||
SSL_CTX_set_options(newctx, SSL_OP_SINGLE_DH_USE|SSL_OP_NO_SSLv2);
|
SSL_CTX_set_options(newctx, SSL_OP_SINGLE_DH_USE|SSL_OP_NO_SSLv2);
|
||||||
SSL_CTX_set_mode(newctx, SSL_MODE_ENABLE_PARTIAL_WRITE);
|
SSL_CTX_set_mode(newctx, SSL_MODE_ENABLE_PARTIAL_WRITE);
|
||||||
SSL_CTX_set_verify(newctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
|
SSL_CTX_set_verify(newctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
|
||||||
@@ -744,7 +747,7 @@ ConnSSL_InitCertFp( CONNECTION *c )
|
|||||||
gnutls_x509_crt_deinit(cert);
|
gnutls_x509_crt_deinit(cert);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gnutls_x509_crt_import(cert, &cert_list[0],
|
if (gnutls_x509_crt_import(cert, &cert_list[0],
|
||||||
GNUTLS_X509_FMT_DER) != GNUTLS_E_SUCCESS) {
|
GNUTLS_X509_FMT_DER) != GNUTLS_E_SUCCESS) {
|
||||||
gnutls_x509_crt_deinit(cert);
|
gnutls_x509_crt_deinit(cert);
|
||||||
@@ -911,5 +914,3 @@ ConnSSL_InitLibrary(void)
|
|||||||
|
|
||||||
#endif /* SSL_SUPPORT */
|
#endif /* SSL_SUPPORT */
|
||||||
/* -eof- */
|
/* -eof- */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ Zip_Flush( CONN_ID Idx )
|
|||||||
}
|
}
|
||||||
|
|
||||||
My_Connections[Idx].bytes_out += zipbuf_used;
|
My_Connections[Idx].bytes_out += zipbuf_used;
|
||||||
My_Connections[Idx].zip.bytes_out += array_bytes(&My_Connections[Idx].zip.wbuf);
|
My_Connections[Idx].zip.bytes_out += array_bytes(&My_Connections[Idx].zip.wbuf);
|
||||||
array_trunc(&My_Connections[Idx].zip.wbuf);
|
array_trunc(&My_Connections[Idx].zip.wbuf);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -198,7 +198,7 @@ Unzip_Buffer( CONN_ID Idx )
|
|||||||
int unzipbuf_used = 0;
|
int unzipbuf_used = 0;
|
||||||
unsigned int z_rdatalen;
|
unsigned int z_rdatalen;
|
||||||
unsigned int in_len;
|
unsigned int in_len;
|
||||||
|
|
||||||
z_stream *in;
|
z_stream *in;
|
||||||
|
|
||||||
assert( Idx > NONE );
|
assert( Idx > NONE );
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
* Copyright (c)2001-2018 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -182,7 +182,6 @@ cb_connserver(int sock, UNUSED short what)
|
|||||||
CONN_ID idx = Socket2Index( sock );
|
CONN_ID idx = Socket2Index( sock );
|
||||||
|
|
||||||
if (idx <= NONE) {
|
if (idx <= NONE) {
|
||||||
LogDebug("cb_connserver wants to write on unknown socket?!");
|
|
||||||
io_close(sock);
|
io_close(sock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -280,12 +279,11 @@ cb_clientserver(int sock, short what)
|
|||||||
{
|
{
|
||||||
CONN_ID idx = Socket2Index(sock);
|
CONN_ID idx = Socket2Index(sock);
|
||||||
|
|
||||||
assert(idx >= 0);
|
if (idx <= NONE) {
|
||||||
|
|
||||||
if (idx < 0) {
|
|
||||||
io_close(sock);
|
io_close(sock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SSL_SUPPORT
|
#ifdef SSL_SUPPORT
|
||||||
if (what & IO_WANTREAD
|
if (what & IO_WANTREAD
|
||||||
|| (Conn_OPTION_ISSET(&My_Connections[idx], CONN_SSL_WANT_WRITE))) {
|
|| (Conn_OPTION_ISSET(&My_Connections[idx], CONN_SSL_WANT_WRITE))) {
|
||||||
@@ -307,32 +305,20 @@ cb_clientserver(int sock, short what)
|
|||||||
GLOBAL void
|
GLOBAL void
|
||||||
Conn_Init( void )
|
Conn_Init( void )
|
||||||
{
|
{
|
||||||
CONN_ID i;
|
int size;
|
||||||
|
|
||||||
Pool_Size = CONNECTION_POOL;
|
/* Initialize the "connection pool".
|
||||||
if ((Conf_MaxConnections > 0) &&
|
* FIXME: My_Connetions/Pool_Size is needed by other parts of the
|
||||||
(Pool_Size > Conf_MaxConnections))
|
* code; remove them! */
|
||||||
Pool_Size = Conf_MaxConnections;
|
Pool_Size = 0;
|
||||||
|
size = Conf_MaxConnections > 0 ? Conf_MaxConnections : CONNECTION_POOL;
|
||||||
if (!array_alloc(&My_ConnArray, sizeof(CONNECTION), (size_t)Pool_Size)) {
|
if (Socket2Index(size) <= NONE) {
|
||||||
Log(LOG_EMERG, "Can't allocate memory! [Conn_Init]");
|
Log(LOG_EMERG, "Failed to initialize connection pool!");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: My_Connetions/Pool_Size is needed by other parts of the
|
/* Initialize "listener" array. */
|
||||||
* code; remove them! */
|
|
||||||
My_Connections = (CONNECTION*) array_start(&My_ConnArray);
|
|
||||||
|
|
||||||
LogDebug("Allocated connection pool for %d items (%ld bytes).",
|
|
||||||
array_length(&My_ConnArray, sizeof(CONNECTION)),
|
|
||||||
array_bytes(&My_ConnArray));
|
|
||||||
|
|
||||||
assert(array_length(&My_ConnArray, sizeof(CONNECTION)) >= (size_t)Pool_Size);
|
|
||||||
|
|
||||||
array_free( &My_Listeners );
|
array_free( &My_Listeners );
|
||||||
|
|
||||||
for (i = 0; i < Pool_Size; i++)
|
|
||||||
Init_Conn_Struct(i);
|
|
||||||
} /* Conn_Init */
|
} /* Conn_Init */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -570,8 +556,8 @@ InitSinaddrListenAddr(ng_ipaddr_t *addr, const char *listen_addrstr, UINT16 Port
|
|||||||
if (!ret) {
|
if (!ret) {
|
||||||
assert(listen_addrstr);
|
assert(listen_addrstr);
|
||||||
Log(LOG_CRIT,
|
Log(LOG_CRIT,
|
||||||
"Can't bind to [%s]:%u: can't convert ip address \"%s\"!",
|
"Can't listen on [%s]:%u: Failed to parse IP address!",
|
||||||
listen_addrstr, Port, listen_addrstr);
|
listen_addrstr, Port);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -796,7 +782,7 @@ Conn_Handler(void)
|
|||||||
GLOBAL bool
|
GLOBAL bool
|
||||||
Conn_WriteStr(CONN_ID Idx, const char *Format, ...)
|
Conn_WriteStr(CONN_ID Idx, const char *Format, ...)
|
||||||
#else
|
#else
|
||||||
GLOBAL bool
|
GLOBAL bool
|
||||||
Conn_WriteStr(Idx, Format, va_alist)
|
Conn_WriteStr(Idx, Format, va_alist)
|
||||||
CONN_ID Idx;
|
CONN_ID Idx;
|
||||||
const char *Format;
|
const char *Format;
|
||||||
@@ -829,7 +815,7 @@ va_dcl
|
|||||||
* IRC_WriteXXX() functions when the prefix of this server had
|
* IRC_WriteXXX() functions when the prefix of this server had
|
||||||
* to be added to an already "quite long" command line which
|
* to be added to an already "quite long" command line which
|
||||||
* has been received from a regular IRC client, for example.
|
* has been received from a regular IRC client, for example.
|
||||||
*
|
*
|
||||||
* We are not allowed to send such "oversized" messages to
|
* We are not allowed to send such "oversized" messages to
|
||||||
* other servers and clients, see RFC 2812 2.3 and 2813 3.3
|
* other servers and clients, see RFC 2812 2.3 and 2813 3.3
|
||||||
* ("these messages SHALL NOT exceed 512 characters in length,
|
* ("these messages SHALL NOT exceed 512 characters in length,
|
||||||
@@ -1378,8 +1364,8 @@ New_Connection(int Sock, UNUSED bool IsSSL)
|
|||||||
/* Check global connection limit */
|
/* Check global connection limit */
|
||||||
if ((Conf_MaxConnections > 0) &&
|
if ((Conf_MaxConnections > 0) &&
|
||||||
(NumConnections >= (size_t) Conf_MaxConnections)) {
|
(NumConnections >= (size_t) Conf_MaxConnections)) {
|
||||||
Log(LOG_ALERT, "Can't accept connection: limit (%d) reached!",
|
Log(LOG_ALERT, "Can't accept new connection on socket %d: Limit (%d) reached!",
|
||||||
Conf_MaxConnections);
|
Sock, Conf_MaxConnections);
|
||||||
Simple_Message(new_sock, "ERROR :Connection limit reached");
|
Simple_Message(new_sock, "ERROR :Connection limit reached");
|
||||||
close(new_sock);
|
close(new_sock);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1398,23 +1384,10 @@ New_Connection(int Sock, UNUSED bool IsSSL)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_sock >= Pool_Size) {
|
if (Socket2Index(new_sock) <= NONE) {
|
||||||
if (!array_alloc(&My_ConnArray, sizeof(CONNECTION),
|
Simple_Message(new_sock, "ERROR: Internal error");
|
||||||
(size_t) new_sock)) {
|
close(new_sock);
|
||||||
Log(LOG_EMERG,
|
return -1;
|
||||||
"Can't allocate memory! [New_Connection]");
|
|
||||||
Simple_Message(new_sock, "ERROR: Internal error");
|
|
||||||
close(new_sock);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
LogDebug("Bumped connection pool to %ld items (internal: %ld items, %ld bytes)",
|
|
||||||
new_sock, array_length(&My_ConnArray,
|
|
||||||
sizeof(CONNECTION)), array_bytes(&My_ConnArray));
|
|
||||||
|
|
||||||
/* Adjust pointer to new block */
|
|
||||||
My_Connections = array_start(&My_ConnArray);
|
|
||||||
while (Pool_Size <= new_sock)
|
|
||||||
Init_Conn_Struct(Pool_Size++);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* register callback */
|
/* register callback */
|
||||||
@@ -1487,16 +1460,16 @@ Conn_StartLogin(CONN_ID Idx)
|
|||||||
ident_sock = My_Connections[Idx].sock;
|
ident_sock = My_Connections[Idx].sock;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (Conf_NoticeAuth) {
|
if (Conf_NoticeBeforeRegistration) {
|
||||||
/* Send "NOTICE AUTH" messages to the client */
|
/* Send "NOTICE *" messages to the client */
|
||||||
#ifdef IDENTAUTH
|
#ifdef IDENTAUTH
|
||||||
if (Conf_Ident)
|
if (Conf_Ident)
|
||||||
(void)Conn_WriteStr(Idx,
|
(void)Conn_WriteStr(Idx,
|
||||||
"NOTICE AUTH :*** Looking up your hostname and checking ident");
|
"NOTICE * :*** Looking up your hostname and checking ident");
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
(void)Conn_WriteStr(Idx,
|
(void)Conn_WriteStr(Idx,
|
||||||
"NOTICE AUTH :*** Looking up your hostname");
|
"NOTICE * :*** Looking up your hostname");
|
||||||
/* Send buffered data to the client, but break on errors
|
/* Send buffered data to the client, but break on errors
|
||||||
* because Handle_Write() would have closed the connection
|
* because Handle_Write() would have closed the connection
|
||||||
* again in this case! */
|
* again in this case! */
|
||||||
@@ -1523,24 +1496,38 @@ Account_Connection(void)
|
|||||||
} /* Account_Connection */
|
} /* Account_Connection */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translate socket handle into connection index.
|
* Translate socket handle into connection index (for historical reasons, it is
|
||||||
|
* a 1:1 mapping today) and enlarge the "connection pool" accordingly.
|
||||||
*
|
*
|
||||||
* @param Sock Socket handle.
|
* @param Sock Socket handle.
|
||||||
* @returns Connecion index or NONE, if no connection could be found.
|
* @returns Connecion index or NONE when the pool is too small.
|
||||||
*/
|
*/
|
||||||
static CONN_ID
|
static CONN_ID
|
||||||
Socket2Index( int Sock )
|
Socket2Index( int Sock )
|
||||||
{
|
{
|
||||||
assert( Sock >= 0 );
|
assert(Sock > 0);
|
||||||
|
assert(Pool_Size >= 0);
|
||||||
|
|
||||||
if( Sock >= Pool_Size || My_Connections[Sock].sock != Sock ) {
|
if (Sock < Pool_Size)
|
||||||
/* the Connection was already closed again, likely due to
|
return Sock;
|
||||||
* an error. */
|
|
||||||
LogDebug("Socket2Index: can't get connection for socket %d!", Sock);
|
/* Try to allocate more memory ... */
|
||||||
|
if (!array_alloc(&My_ConnArray, sizeof(CONNECTION), (size_t)Sock)) {
|
||||||
|
Log(LOG_EMERG,
|
||||||
|
"Can't allocate memory to enlarge connection pool!");
|
||||||
return NONE;
|
return NONE;
|
||||||
}
|
}
|
||||||
|
LogDebug("Enlarged connection pool for %ld sockets (%ld items, %ld bytes)",
|
||||||
|
Sock, array_length(&My_ConnArray, sizeof(CONNECTION)),
|
||||||
|
array_bytes(&My_ConnArray));
|
||||||
|
|
||||||
|
/* Adjust pointer to new block, update size and initialize new items. */
|
||||||
|
My_Connections = array_start(&My_ConnArray);
|
||||||
|
while (Pool_Size <= Sock)
|
||||||
|
Init_Conn_Struct(Pool_Size++);
|
||||||
|
|
||||||
return Sock;
|
return Sock;
|
||||||
} /* Socket2Index */
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read data from the network to the read buffer. If an error occurs,
|
* Read data from the network to the read buffer. If an error occurs,
|
||||||
@@ -1583,7 +1570,7 @@ Read_Request( CONN_ID Idx )
|
|||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
LogDebug("Client \"%s:%u\" is closing connection %d ...",
|
LogDebug("Client \"%s:%u\" is closing connection %d ...",
|
||||||
My_Connections[Idx].host,
|
My_Connections[Idx].host,
|
||||||
ng_ipaddr_tostr(&My_Connections[Idx].addr), Idx);
|
ng_ipaddr_getport(&My_Connections[Idx].addr), Idx);
|
||||||
Conn_Close(Idx, NULL, "Client closed connection", false);
|
Conn_Close(Idx, NULL, "Client closed connection", false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1931,8 +1918,11 @@ Check_Servers(void)
|
|||||||
Conf_Server[i].lasttry = time_now;
|
Conf_Server[i].lasttry = time_now;
|
||||||
Conf_Server[i].conn_id = SERVER_WAIT;
|
Conf_Server[i].conn_id = SERVER_WAIT;
|
||||||
assert(Proc_GetPipeFd(&Conf_Server[i].res_stat) < 0);
|
assert(Proc_GetPipeFd(&Conf_Server[i].res_stat) < 0);
|
||||||
Resolve_Name(&Conf_Server[i].res_stat, Conf_Server[i].host,
|
|
||||||
cb_Connect_to_Server);
|
/* Start resolver subprocess ... */
|
||||||
|
if (!Resolve_Name(&Conf_Server[i].res_stat, Conf_Server[i].host,
|
||||||
|
cb_Connect_to_Server))
|
||||||
|
Conf_Server[i].conn_id = NONE;
|
||||||
}
|
}
|
||||||
} /* Check_Servers */
|
} /* Check_Servers */
|
||||||
|
|
||||||
@@ -2007,10 +1997,7 @@ New_Server( int Server , ng_ipaddr_t *dest)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!array_alloc(&My_ConnArray, sizeof(CONNECTION), (size_t)new_sock)) {
|
if (Socket2Index(new_sock) <= NONE) {
|
||||||
Log(LOG_ALERT,
|
|
||||||
"Cannot allocate memory for server connection (socket %d)",
|
|
||||||
new_sock);
|
|
||||||
close( new_sock );
|
close( new_sock );
|
||||||
Conf_Server[Server].conn_id = NONE;
|
Conf_Server[Server].conn_id = NONE;
|
||||||
return;
|
return;
|
||||||
@@ -2024,8 +2011,6 @@ New_Server( int Server , ng_ipaddr_t *dest)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
My_Connections = array_start(&My_ConnArray);
|
|
||||||
|
|
||||||
assert(My_Connections[new_sock].sock <= 0);
|
assert(My_Connections[new_sock].sock <= 0);
|
||||||
|
|
||||||
Init_Conn_Struct(new_sock);
|
Init_Conn_Struct(new_sock);
|
||||||
@@ -2265,9 +2250,9 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
|
|||||||
strlcpy(My_Connections[i].host, readbuf,
|
strlcpy(My_Connections[i].host, readbuf,
|
||||||
sizeof(My_Connections[i].host));
|
sizeof(My_Connections[i].host));
|
||||||
Client_SetHostname(c, readbuf);
|
Client_SetHostname(c, readbuf);
|
||||||
if (Conf_NoticeAuth)
|
if (Conf_NoticeBeforeRegistration)
|
||||||
(void)Conn_WriteStr(i,
|
(void)Conn_WriteStr(i,
|
||||||
"NOTICE AUTH :*** Found your hostname: %s",
|
"NOTICE * :*** Found your hostname: %s",
|
||||||
My_Connections[i].host);
|
My_Connections[i].host);
|
||||||
#ifdef IDENTAUTH
|
#ifdef IDENTAUTH
|
||||||
++identptr;
|
++identptr;
|
||||||
@@ -2291,22 +2276,22 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
|
|||||||
i, identptr);
|
i, identptr);
|
||||||
Client_SetUser(c, identptr, true);
|
Client_SetUser(c, identptr, true);
|
||||||
}
|
}
|
||||||
if (Conf_NoticeAuth) {
|
if (Conf_NoticeBeforeRegistration) {
|
||||||
(void)Conn_WriteStr(i,
|
(void)Conn_WriteStr(i,
|
||||||
"NOTICE AUTH :*** Got %sident response%s%s",
|
"NOTICE * :*** Got %sident response%s%s",
|
||||||
*ptr ? "invalid " : "",
|
*ptr ? "invalid " : "",
|
||||||
*ptr ? "" : ": ",
|
*ptr ? "" : ": ",
|
||||||
*ptr ? "" : identptr);
|
*ptr ? "" : identptr);
|
||||||
}
|
}
|
||||||
} else if(Conf_Ident) {
|
} else if(Conf_Ident) {
|
||||||
Log(LOG_INFO, "IDENT lookup for connection %d: no result.", i);
|
Log(LOG_INFO, "IDENT lookup for connection %d: no result.", i);
|
||||||
if (Conf_NoticeAuth)
|
if (Conf_NoticeBeforeRegistration)
|
||||||
(void)Conn_WriteStr(i,
|
(void)Conn_WriteStr(i,
|
||||||
"NOTICE AUTH :*** No ident response");
|
"NOTICE * :*** No ident response");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (Conf_NoticeAuth) {
|
if (Conf_NoticeBeforeRegistration) {
|
||||||
/* Send buffered data to the client, but break on
|
/* Send buffered data to the client, but break on
|
||||||
* errors because Handle_Write() would have closed
|
* errors because Handle_Write() would have closed
|
||||||
* the connection again in this case! */
|
* the connection again in this case! */
|
||||||
@@ -2364,7 +2349,7 @@ Simple_Message(int Sock, const char *Msg)
|
|||||||
* @returns Pointer to CLIENT structure.
|
* @returns Pointer to CLIENT structure.
|
||||||
*/
|
*/
|
||||||
GLOBAL CLIENT *
|
GLOBAL CLIENT *
|
||||||
Conn_GetClient( CONN_ID Idx )
|
Conn_GetClient( CONN_ID Idx )
|
||||||
{
|
{
|
||||||
CONNECTION *c;
|
CONNECTION *c;
|
||||||
|
|
||||||
@@ -2472,9 +2457,7 @@ cb_clientserver_ssl(int sock, UNUSED short what)
|
|||||||
{
|
{
|
||||||
CONN_ID idx = Socket2Index(sock);
|
CONN_ID idx = Socket2Index(sock);
|
||||||
|
|
||||||
assert(idx >= 0);
|
if (idx <= NONE) {
|
||||||
|
|
||||||
if (idx < 0) {
|
|
||||||
io_close(sock);
|
io_close(sock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2524,12 +2507,13 @@ cb_connserver_login_ssl(int sock, short unused)
|
|||||||
{
|
{
|
||||||
CONN_ID idx = Socket2Index(sock);
|
CONN_ID idx = Socket2Index(sock);
|
||||||
|
|
||||||
assert(idx >= 0);
|
(void) unused;
|
||||||
if (idx < 0) {
|
|
||||||
|
if (idx <= NONE) {
|
||||||
io_close(sock);
|
io_close(sock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(void) unused;
|
|
||||||
switch (ConnSSL_Connect( &My_Connections[idx])) {
|
switch (ConnSSL_Connect( &My_Connections[idx])) {
|
||||||
case 1: break;
|
case 1: break;
|
||||||
case 0: LogDebug("ConnSSL_Connect: not ready");
|
case 0: LogDebug("ConnSSL_Connect: not ready");
|
||||||
|
|||||||
@@ -61,6 +61,9 @@
|
|||||||
/** Size of default connection pool. */
|
/** Size of default connection pool. */
|
||||||
#define CONNECTION_POOL 100
|
#define CONNECTION_POOL 100
|
||||||
|
|
||||||
|
/** Size of buffer for PAM service name. */
|
||||||
|
#define MAX_PAM_SERVICE_NAME_LEN 64
|
||||||
|
|
||||||
|
|
||||||
/* Hard-coded (default) options */
|
/* Hard-coded (default) options */
|
||||||
|
|
||||||
@@ -177,7 +180,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Supported user modes. */
|
/** Supported user modes. */
|
||||||
#define USERMODES "abBcCFioqrRswx"
|
#define USERMODES "abBcCFiIoqrRswx"
|
||||||
|
|
||||||
/** Supported channel modes. */
|
/** Supported channel modes. */
|
||||||
#define CHANMODES "abehiIklmMnoOPqQrRstvVz"
|
#define CHANMODES "abehiIklmMnoOPqQrRstvVz"
|
||||||
@@ -206,6 +209,9 @@
|
|||||||
/** Max. number of channel modes with arguments per MODE command. */
|
/** Max. number of channel modes with arguments per MODE command. */
|
||||||
#define MAX_HNDL_MODES_ARG 5
|
#define MAX_HNDL_MODES_ARG 5
|
||||||
|
|
||||||
|
/** Max. number of targets per PRIVMSG/NOTICE/... command. */
|
||||||
|
#define MAX_HNDL_TARGETS 25
|
||||||
|
|
||||||
/** Max. number of WHO replies. */
|
/** Max. number of WHO replies. */
|
||||||
#define MAX_RPL_WHO 25
|
#define MAX_RPL_WHO 25
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors.
|
* Copyright (c)2001-2018 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -497,7 +497,7 @@ IRC_TOPIC( CLIENT *Client, REQUEST *Req )
|
|||||||
topic_power = true;
|
topic_power = true;
|
||||||
|
|
||||||
if (Req->argc == 1) {
|
if (Req->argc == 1) {
|
||||||
/* Request actual topic */
|
/* Request current topic */
|
||||||
topic = Channel_Topic(chan);
|
topic = Channel_Topic(chan);
|
||||||
if (*topic) {
|
if (*topic) {
|
||||||
r = IRC_WriteStrClient(from, RPL_TOPIC_MSG,
|
r = IRC_WriteStrClient(from, RPL_TOPIC_MSG,
|
||||||
@@ -532,8 +532,6 @@ IRC_TOPIC( CLIENT *Client, REQUEST *Req )
|
|||||||
Channel_Name(chan));
|
Channel_Name(chan));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set new topic */
|
|
||||||
Channel_SetTopic(chan, from, Req->argv[1]);
|
|
||||||
LogDebug("%s \"%s\" set topic on \"%s\": %s",
|
LogDebug("%s \"%s\" set topic on \"%s\": %s",
|
||||||
Client_TypeText(from), Client_Mask(from), Channel_Name(chan),
|
Client_TypeText(from), Client_Mask(from), Channel_Name(chan),
|
||||||
Req->argv[1][0] ? Req->argv[1] : "<none>");
|
Req->argv[1][0] ? Req->argv[1] : "<none>");
|
||||||
@@ -545,9 +543,17 @@ IRC_TOPIC( CLIENT *Client, REQUEST *Req )
|
|||||||
if (!Channel_IsLocal(chan))
|
if (!Channel_IsLocal(chan))
|
||||||
IRC_WriteStrServersPrefix(Client, from, "TOPIC %s :%s",
|
IRC_WriteStrServersPrefix(Client, from, "TOPIC %s :%s",
|
||||||
Req->argv[0], Req->argv[1]);
|
Req->argv[0], Req->argv[1]);
|
||||||
IRC_WriteStrChannelPrefix(Client, chan, from, false, "TOPIC %s :%s",
|
|
||||||
Req->argv[0], Req->argv[1]);
|
|
||||||
|
|
||||||
|
/* Infrom local clients, but only when the topic really changed. */
|
||||||
|
if (strcmp(Req->argv[1], Channel_Topic(chan)) != 0)
|
||||||
|
IRC_WriteStrChannelPrefix(Client, chan, from, false,
|
||||||
|
"TOPIC %s :%s", Req->argv[0],
|
||||||
|
Req->argv[1]);
|
||||||
|
|
||||||
|
/* Update topic, setter, and timestamp. */
|
||||||
|
Channel_SetTopic(chan, from, Req->argv[1]);
|
||||||
|
|
||||||
|
/* Send confirmation when the local client is a user. */
|
||||||
if (Client_Type(Client) == CLIENT_USER)
|
if (Client_Type(Client) == CLIENT_USER)
|
||||||
return IRC_WriteStrClientPrefix(Client, Client, "TOPIC %s :%s",
|
return IRC_WriteStrClientPrefix(Client, Client, "TOPIC %s :%s",
|
||||||
Req->argv[0], Req->argv[1]);
|
Req->argv[0], Req->argv[1]);
|
||||||
@@ -597,6 +603,10 @@ IRC_LIST( CLIENT *Client, REQUEST *Req )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Send list head */
|
||||||
|
if (!IRC_WriteStrClient(from, RPL_LISTSTART_MSG, Client_ID(from)))
|
||||||
|
return DISCONNECTED;
|
||||||
|
|
||||||
while (pattern) {
|
while (pattern) {
|
||||||
/* Loop through all the channels */
|
/* Loop through all the channels */
|
||||||
if (Req->argc > 0)
|
if (Req->argc > 0)
|
||||||
@@ -608,9 +618,7 @@ IRC_LIST( CLIENT *Client, REQUEST *Req )
|
|||||||
/* Gotcha! */
|
/* Gotcha! */
|
||||||
if (!Channel_HasMode(chan, 's')
|
if (!Channel_HasMode(chan, 's')
|
||||||
|| Channel_IsMemberOf(chan, from)
|
|| Channel_IsMemberOf(chan, from)
|
||||||
|| (!Conf_MorePrivacy
|
|| Client_HasMode(from, 'o'))
|
||||||
&& Client_HasMode(Client, 'o')
|
|
||||||
&& Client_Conn(Client) > NONE))
|
|
||||||
{
|
{
|
||||||
if ((Conf_MaxListSize > 0)
|
if ((Conf_MaxListSize > 0)
|
||||||
&& IRC_CheckListTooBig(from, count,
|
&& IRC_CheckListTooBig(from, count,
|
||||||
|
|||||||
@@ -313,48 +313,50 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c)
|
|||||||
Client_Info(Client_Introducer(c))))
|
Client_Info(Client_Introducer(c))))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
|
|
||||||
/* Channels */
|
/* Channels, show only if client has no +I or if from is oper */
|
||||||
snprintf(str, sizeof(str), RPL_WHOISCHANNELS_MSG,
|
if(!(Client_HasMode(c, 'I')) || Client_HasMode(from, 'o')) {
|
||||||
Client_ID(from), Client_ID(c));
|
snprintf(str, sizeof(str), RPL_WHOISCHANNELS_MSG,
|
||||||
cl2chan = Channel_FirstChannelOf(c);
|
Client_ID(from), Client_ID(c));
|
||||||
while (cl2chan) {
|
cl2chan = Channel_FirstChannelOf(c);
|
||||||
chan = Channel_GetChannel(cl2chan);
|
while (cl2chan) {
|
||||||
assert(chan != NULL);
|
chan = Channel_GetChannel(cl2chan);
|
||||||
|
assert(chan != NULL);
|
||||||
|
|
||||||
/* next */
|
/* next */
|
||||||
cl2chan = Channel_NextChannelOf(c, cl2chan);
|
cl2chan = Channel_NextChannelOf(c, cl2chan);
|
||||||
|
|
||||||
/* Secret channel? */
|
/* Secret channel? */
|
||||||
if (Channel_HasMode(chan, 's')
|
if (Channel_HasMode(chan, 's')
|
||||||
&& !Channel_IsMemberOf(chan, Client))
|
&& !Channel_IsMemberOf(chan, Client))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Local channel and request is not from a user? */
|
/* Local channel and request is not from a user? */
|
||||||
if (Client_Type(Client) == CLIENT_SERVER
|
if (Client_Type(Client) == CLIENT_SERVER
|
||||||
&& Channel_IsLocal(chan))
|
&& Channel_IsLocal(chan))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Concatenate channel names */
|
/* Concatenate channel names */
|
||||||
if (str[strlen(str) - 1] != ':')
|
if (str[strlen(str) - 1] != ':')
|
||||||
strlcat(str, " ", sizeof(str));
|
strlcat(str, " ", sizeof(str));
|
||||||
|
|
||||||
who_flags_qualifier(Client, Channel_UserModes(chan, c),
|
who_flags_qualifier(Client, Channel_UserModes(chan, c),
|
||||||
str, sizeof(str));
|
str, sizeof(str));
|
||||||
strlcat(str, Channel_Name(chan), sizeof(str));
|
strlcat(str, Channel_Name(chan), sizeof(str));
|
||||||
|
|
||||||
if (strlen(str) > (COMMAND_LEN - CHANNEL_NAME_LEN - 4)) {
|
if (strlen(str) > (COMMAND_LEN - CHANNEL_NAME_LEN - 4)) {
|
||||||
/* Line becomes too long: send it! */
|
/* Line becomes too long: send it! */
|
||||||
|
if (!IRC_WriteStrClient(Client, "%s", str))
|
||||||
|
return DISCONNECTED;
|
||||||
|
snprintf(str, sizeof(str), RPL_WHOISCHANNELS_MSG,
|
||||||
|
Client_ID(from), Client_ID(c));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(str[strlen(str) - 1] != ':') {
|
||||||
|
/* There is data left to send: */
|
||||||
if (!IRC_WriteStrClient(Client, "%s", str))
|
if (!IRC_WriteStrClient(Client, "%s", str))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
snprintf(str, sizeof(str), RPL_WHOISCHANNELS_MSG,
|
|
||||||
Client_ID(from), Client_ID(c));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(str[strlen(str) - 1] != ':') {
|
|
||||||
/* There is data left to send: */
|
|
||||||
if (!IRC_WriteStrClient(Client, "%s", str))
|
|
||||||
return DISCONNECTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* IRC-Services? */
|
/* IRC-Services? */
|
||||||
if (Client_Type(c) == CLIENT_SERVICE &&
|
if (Client_Type(c) == CLIENT_SERVICE &&
|
||||||
@@ -405,7 +407,7 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c)
|
|||||||
|
|
||||||
/* Local client and requester is the user itself or an IRC Op? */
|
/* Local client and requester is the user itself or an IRC Op? */
|
||||||
if (Client_Conn(c) > NONE &&
|
if (Client_Conn(c) > NONE &&
|
||||||
(from == c || (!Conf_MorePrivacy && Client_HasMode(from, 'o')))) {
|
(from == c || Client_HasMode(from, 'o'))) {
|
||||||
/* Client hostname */
|
/* Client hostname */
|
||||||
if (!IRC_WriteStrClient(from, RPL_WHOISHOST_MSG,
|
if (!IRC_WriteStrClient(from, RPL_WHOISHOST_MSG,
|
||||||
Client_ID(from), Client_ID(c),
|
Client_ID(from), Client_ID(c),
|
||||||
@@ -556,7 +558,15 @@ IRC_INFO(CLIENT * Client, REQUEST * Req)
|
|||||||
NGIRCd_Version))
|
NGIRCd_Version))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
|
|
||||||
#if defined(__DATE__) && defined(__TIME__)
|
#if defined(BIRTHDATE)
|
||||||
|
char t_str[60];
|
||||||
|
time_t t = BIRTHDATE;
|
||||||
|
(void)strftime(t_str, sizeof(t_str), "%a %b %d %Y at %H:%M:%S (%Z)",
|
||||||
|
localtime(&t));
|
||||||
|
snprintf(msg, sizeof(msg), "Birth Date: %s", t_str);
|
||||||
|
if (!IRC_WriteStrClient(Client, RPL_INFO_MSG, Client_ID(prefix), msg))
|
||||||
|
return DISCONNECTED;
|
||||||
|
#elif defined(__DATE__) && defined(__TIME__)
|
||||||
snprintf(msg, sizeof(msg), "Birth Date: %s at %s", __DATE__, __TIME__);
|
snprintf(msg, sizeof(msg), "Birth Date: %s at %s", __DATE__, __TIME__);
|
||||||
if (!IRC_WriteStrClient(Client, RPL_INFO_MSG, Client_ID(prefix), msg))
|
if (!IRC_WriteStrClient(Client, RPL_INFO_MSG, Client_ID(prefix), msg))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
@@ -884,16 +894,16 @@ IRC_STATS( CLIENT *Client, REQUEST *Req )
|
|||||||
list = Class_GetList(CLASS_GLINE);
|
list = Class_GetList(CLASS_GLINE);
|
||||||
else
|
else
|
||||||
list = Class_GetList(CLASS_KLINE);
|
list = Class_GetList(CLASS_KLINE);
|
||||||
list_item = Lists_GetFirst(list);
|
list_item = Lists_GetFirst(list);
|
||||||
while (list_item) {
|
while (list_item) {
|
||||||
if (!IRC_WriteStrClient(from, RPL_STATSXLINE_MSG,
|
if (!IRC_WriteStrClient(from, RPL_STATSXLINE_MSG,
|
||||||
Client_ID(from), query,
|
Client_ID(from), query,
|
||||||
Lists_GetMask(list_item),
|
Lists_GetMask(list_item),
|
||||||
Lists_GetValidity(list_item),
|
Lists_GetValidity(list_item),
|
||||||
Lists_GetReason(list_item)))
|
Lists_GetReason(list_item)))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
list_item = Lists_GetNext(list_item);
|
list_item = Lists_GetNext(list_item);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'L': /* Link status (servers and user links) */
|
case 'L': /* Link status (servers and user links) */
|
||||||
if (!Op_Check(from, Req))
|
if (!Op_Check(from, Req))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
* Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -172,6 +172,7 @@ GLOBAL bool
|
|||||||
IRC_NICK( CLIENT *Client, REQUEST *Req )
|
IRC_NICK( CLIENT *Client, REQUEST *Req )
|
||||||
{
|
{
|
||||||
CLIENT *intr_c, *target, *c;
|
CLIENT *intr_c, *target, *c;
|
||||||
|
CHANNEL *chan;
|
||||||
char *nick, *user, *hostname, *modes, *info;
|
char *nick, *user, *hostname, *modes, *info;
|
||||||
int token, hops;
|
int token, hops;
|
||||||
|
|
||||||
@@ -195,6 +196,7 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
|
|||||||
|
|
||||||
/* Search "target" client */
|
/* Search "target" client */
|
||||||
if (Client_Type(Client) == CLIENT_SERVER) {
|
if (Client_Type(Client) == CLIENT_SERVER) {
|
||||||
|
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||||
target = Client_Search(Req->prefix);
|
target = Client_Search(Req->prefix);
|
||||||
if (!target)
|
if (!target)
|
||||||
return IRC_WriteErrClient(Client,
|
return IRC_WriteErrClient(Client,
|
||||||
@@ -259,6 +261,22 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
|
|||||||
Client_SetType( Client, CLIENT_GOTNICK );
|
Client_SetType( Client, CLIENT_GOTNICK );
|
||||||
} else {
|
} else {
|
||||||
/* Nickname change */
|
/* Nickname change */
|
||||||
|
|
||||||
|
/* Check that the user isn't on any channels set +N */
|
||||||
|
if(Client_Type(Client) == CLIENT_USER &&
|
||||||
|
!Client_HasMode(Client, 'o')) {
|
||||||
|
chan = Channel_First();
|
||||||
|
while (chan) {
|
||||||
|
if(Channel_HasMode(chan, 'N') &&
|
||||||
|
Channel_IsMemberOf(chan, Client))
|
||||||
|
return IRC_WriteErrClient(Client,
|
||||||
|
ERR_NONICKCHANGE_MSG,
|
||||||
|
Client_ID(Client),
|
||||||
|
Channel_Name(chan));
|
||||||
|
chan = Channel_Next(chan);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Change_Nick(Client, target, Req->argv[0],
|
Change_Nick(Client, target, Req->argv[0],
|
||||||
Client_Type(Client) == CLIENT_USER ? true : false);
|
Client_Type(Client) == CLIENT_USER ? true : false);
|
||||||
IRC_SetPenalty(target, 2);
|
IRC_SetPenalty(target, 2);
|
||||||
@@ -362,6 +380,8 @@ IRC_SVSNICK(CLIENT *Client, REQUEST *Req)
|
|||||||
assert(Client != NULL);
|
assert(Client != NULL);
|
||||||
assert(Req != NULL);
|
assert(Req != NULL);
|
||||||
|
|
||||||
|
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||||
|
|
||||||
/* Search the originator */
|
/* Search the originator */
|
||||||
from = Client_Search(Req->prefix);
|
from = Client_Search(Req->prefix);
|
||||||
if (!from)
|
if (!from)
|
||||||
@@ -464,6 +484,7 @@ IRC_USER(CLIENT * Client, REQUEST * Req)
|
|||||||
Client_Type(Client) == CLIENT_SERVICE) {
|
Client_Type(Client) == CLIENT_SERVICE) {
|
||||||
/* Server/service updating an user */
|
/* Server/service updating an user */
|
||||||
_IRC_ARGC_EQ_OR_RETURN_(Client, Req, 4)
|
_IRC_ARGC_EQ_OR_RETURN_(Client, Req, 4)
|
||||||
|
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||||
|
|
||||||
c = Client_Search(Req->prefix);
|
c = Client_Search(Req->prefix);
|
||||||
if (!c)
|
if (!c)
|
||||||
@@ -636,6 +657,8 @@ IRC_QUIT( CLIENT *Client, REQUEST *Req )
|
|||||||
|
|
||||||
if (Client_Type(Client) == CLIENT_SERVER) {
|
if (Client_Type(Client) == CLIENT_SERVER) {
|
||||||
/* Server */
|
/* Server */
|
||||||
|
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||||
|
|
||||||
target = Client_Search(Req->prefix);
|
target = Client_Search(Req->prefix);
|
||||||
if (!target) {
|
if (!target) {
|
||||||
Log(LOG_WARNING,
|
Log(LOG_WARNING,
|
||||||
@@ -724,9 +747,10 @@ IRC_PING(CLIENT *Client, REQUEST *Req)
|
|||||||
|
|
||||||
if (target != Client_ThisServer()) {
|
if (target != Client_ThisServer()) {
|
||||||
/* Ok, we have to forward the PING */
|
/* Ok, we have to forward the PING */
|
||||||
if (Client_Type(Client) == CLIENT_SERVER)
|
if (Client_Type(Client) == CLIENT_SERVER) {
|
||||||
|
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||||
from = Client_Search(Req->prefix);
|
from = Client_Search(Req->prefix);
|
||||||
else
|
} else
|
||||||
from = Client;
|
from = Client;
|
||||||
if (!from)
|
if (!from)
|
||||||
return IRC_WriteErrClient(Client,
|
return IRC_WriteErrClient(Client,
|
||||||
@@ -798,6 +822,8 @@ IRC_PONG(CLIENT *Client, REQUEST *Req)
|
|||||||
|
|
||||||
/* Forward? */
|
/* Forward? */
|
||||||
if (Req->argc == 2 && Client_Type(Client) == CLIENT_SERVER) {
|
if (Req->argc == 2 && Client_Type(Client) == CLIENT_SERVER) {
|
||||||
|
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||||
|
|
||||||
target = Client_Search(Req->argv[0]);
|
target = Client_Search(Req->argv[0]);
|
||||||
if (!target)
|
if (!target)
|
||||||
return IRC_WriteErrClient(Client, ERR_NOSUCHSERVER_MSG,
|
return IRC_WriteErrClient(Client, ERR_NOSUCHSERVER_MSG,
|
||||||
@@ -847,13 +873,14 @@ IRC_PONG(CLIENT *Client, REQUEST *Req)
|
|||||||
if (Client_Type(Client) == CLIENT_SERVER && Conn_LastPing(conn) == 0) {
|
if (Client_Type(Client) == CLIENT_SERVER && Conn_LastPing(conn) == 0) {
|
||||||
Log(LOG_INFO,
|
Log(LOG_INFO,
|
||||||
"Synchronization with \"%s\" done (connection %d): %ld second%s [%ld users, %ld channels].",
|
"Synchronization with \"%s\" done (connection %d): %ld second%s [%ld users, %ld channels].",
|
||||||
Client_ID(Client), conn, time(NULL) - Conn_GetSignon(conn),
|
Client_ID(Client), conn,
|
||||||
|
(long)(time(NULL) - Conn_GetSignon(conn)),
|
||||||
time(NULL) - Conn_GetSignon(conn) == 1 ? "" : "s",
|
time(NULL) - Conn_GetSignon(conn) == 1 ? "" : "s",
|
||||||
Client_UserCount(), Channel_CountVisible(NULL));
|
Client_UserCount(), Channel_CountVisible(NULL));
|
||||||
Conn_UpdatePing(conn);
|
Conn_UpdatePing(conn);
|
||||||
} else
|
} else
|
||||||
LogDebug("Connection %d: received PONG. Lag: %ld seconds.",
|
LogDebug("Connection %d: received PONG. Lag: %ld seconds.",
|
||||||
conn, time(NULL) - Conn_LastPing(conn));
|
conn, (long)(time(NULL) - Conn_LastPing(conn)));
|
||||||
|
|
||||||
return CONNECTED;
|
return CONNECTED;
|
||||||
} /* IRC_PONG */
|
} /* IRC_PONG */
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
* Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -65,6 +65,18 @@ if (Req->argc < Min || Req->argc > Max) { \
|
|||||||
Client_ID(Client), Req->command); \
|
Client_ID(Client), Req->command); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make sure that the command has a prefix.
|
||||||
|
*
|
||||||
|
* If there is no prefix, send an error to the client and return from
|
||||||
|
* the function.
|
||||||
|
*/
|
||||||
|
#define _IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req) \
|
||||||
|
if (!Req->prefix) { \
|
||||||
|
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
|
||||||
|
Client_ID(Client), Req->command); \
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get sender of an IRC command.
|
* Get sender of an IRC command.
|
||||||
*
|
*
|
||||||
@@ -73,13 +85,17 @@ if (Req->argc < Min || Req->argc > Max) { \
|
|||||||
* send an error to the client and return from the function.
|
* send an error to the client and return from the function.
|
||||||
*/
|
*/
|
||||||
#define _IRC_GET_SENDER_OR_RETURN_(Sender, Req, Client) \
|
#define _IRC_GET_SENDER_OR_RETURN_(Sender, Req, Client) \
|
||||||
if (Client_Type(Client) == CLIENT_SERVER) \
|
if (Client_Type(Client) == CLIENT_SERVER) { \
|
||||||
|
if (!Req->prefix) \
|
||||||
|
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
|
||||||
|
Client_ID(Client), Req->command); \
|
||||||
Sender = Client_Search(Req->prefix); \
|
Sender = Client_Search(Req->prefix); \
|
||||||
else \
|
} else \
|
||||||
Sender = Client; \
|
Sender = Client; \
|
||||||
if (!Sender) \
|
if (!Sender) \
|
||||||
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG, \
|
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG, \
|
||||||
Client_ID(Client), Req->prefix);
|
Client_ID(Client), \
|
||||||
|
Req->prefix ? Req->prefix : "(none)");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get target of an IRC command and make sure that it is a server.
|
* Get target of an IRC command and make sure that it is a server.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
* Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include "conn-func.h"
|
#include "conn-func.h"
|
||||||
#include "channel.h"
|
#include "channel.h"
|
||||||
|
#include "irc-macros.h"
|
||||||
#include "irc-write.h"
|
#include "irc-write.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "messages.h"
|
#include "messages.h"
|
||||||
@@ -47,6 +48,8 @@ IRC_METADATA(CLIENT *Client, REQUEST *Req)
|
|||||||
assert(Client != NULL);
|
assert(Client != NULL);
|
||||||
assert(Req != NULL);
|
assert(Req != NULL);
|
||||||
|
|
||||||
|
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||||
|
|
||||||
prefix = Client_Search(Req->prefix);
|
prefix = Client_Search(Req->prefix);
|
||||||
if (!prefix)
|
if (!prefix)
|
||||||
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG,
|
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG,
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
|
|||||||
case 'b': /* Block private msgs */
|
case 'b': /* Block private msgs */
|
||||||
case 'C': /* Only messages from clients sharing a channel */
|
case 'C': /* Only messages from clients sharing a channel */
|
||||||
case 'i': /* Invisible */
|
case 'i': /* Invisible */
|
||||||
|
case 'I': /* Hide channel list from WHOIS */
|
||||||
case 's': /* Server messages */
|
case 's': /* Server messages */
|
||||||
case 'w': /* Wallops messages */
|
case 'w': /* Wallops messages */
|
||||||
x[0] = *mode_ptr;
|
x[0] = *mode_ptr;
|
||||||
@@ -378,37 +379,44 @@ Channel_Mode_Answer_Request(CLIENT *Origin, CHANNEL *Channel)
|
|||||||
char the_modes[COMMAND_LEN], the_args[COMMAND_LEN], argadd[CLIENT_PASS_LEN];
|
char the_modes[COMMAND_LEN], the_args[COMMAND_LEN], argadd[CLIENT_PASS_LEN];
|
||||||
const char *mode_ptr;
|
const char *mode_ptr;
|
||||||
|
|
||||||
/* Member or not? -- That's the question! */
|
if (!Channel_IsMemberOf(Channel, Origin)) {
|
||||||
if (!Channel_IsMemberOf(Channel, Origin))
|
/* Not a member: "simple" mode reply */
|
||||||
return IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
|
if (!IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
|
||||||
Client_ID(Origin), Channel_Name(Channel), Channel_Modes(Channel));
|
Client_ID(Origin), Channel_Name(Channel),
|
||||||
|
Channel_Modes(Channel)))
|
||||||
|
return DISCONNECTED;
|
||||||
|
} else {
|
||||||
|
/* The sender is a member: generate extended reply */
|
||||||
|
strlcpy(the_modes, Channel_Modes(Channel), sizeof(the_modes));
|
||||||
|
mode_ptr = the_modes;
|
||||||
|
the_args[0] = '\0';
|
||||||
|
|
||||||
/* The sender is a member: generate extended reply */
|
while(*mode_ptr) {
|
||||||
strlcpy(the_modes, Channel_Modes(Channel), sizeof(the_modes));
|
switch(*mode_ptr) {
|
||||||
mode_ptr = the_modes;
|
case 'l':
|
||||||
the_args[0] = '\0';
|
snprintf(argadd, sizeof(argadd), " %lu",
|
||||||
|
Channel_MaxUsers(Channel));
|
||||||
while(*mode_ptr) {
|
strlcat(the_args, argadd, sizeof(the_args));
|
||||||
switch(*mode_ptr) {
|
break;
|
||||||
case 'l':
|
case 'k':
|
||||||
snprintf(argadd, sizeof(argadd), " %lu", Channel_MaxUsers(Channel));
|
strlcat(the_args, " ", sizeof(the_args));
|
||||||
strlcat(the_args, argadd, sizeof(the_args));
|
strlcat(the_args, Channel_Key(Channel),
|
||||||
break;
|
sizeof(the_args));
|
||||||
case 'k':
|
break;
|
||||||
strlcat(the_args, " ", sizeof(the_args));
|
}
|
||||||
strlcat(the_args, Channel_Key(Channel), sizeof(the_args));
|
mode_ptr++;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
mode_ptr++;
|
if (the_args[0])
|
||||||
}
|
strlcat(the_modes, the_args, sizeof(the_modes));
|
||||||
if (the_args[0])
|
|
||||||
strlcat(the_modes, the_args, sizeof(the_modes));
|
if (!IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
|
||||||
|
Client_ID(Origin), Channel_Name(Channel),
|
||||||
|
the_modes))
|
||||||
|
return DISCONNECTED;
|
||||||
|
}
|
||||||
|
|
||||||
if (!IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
|
|
||||||
Client_ID(Origin), Channel_Name(Channel),
|
|
||||||
the_modes))
|
|
||||||
return DISCONNECTED;
|
|
||||||
#ifndef STRICT_RFC
|
#ifndef STRICT_RFC
|
||||||
|
/* Channel creation time */
|
||||||
if (!IRC_WriteStrClient(Origin, RPL_CREATIONTIME_MSG,
|
if (!IRC_WriteStrClient(Origin, RPL_CREATIONTIME_MSG,
|
||||||
Client_ID(Origin), Channel_Name(Channel),
|
Client_ID(Origin), Channel_Name(Channel),
|
||||||
Channel_CreationTime(Channel)))
|
Channel_CreationTime(Channel)))
|
||||||
@@ -572,6 +580,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
|
|||||||
case 'M': /* Only identified nicks can write */
|
case 'M': /* Only identified nicks can write */
|
||||||
case 'm': /* Moderated */
|
case 'm': /* Moderated */
|
||||||
case 'n': /* Only members can write */
|
case 'n': /* Only members can write */
|
||||||
|
case 'N': /* Can't change nick while on this channel */
|
||||||
case 'Q': /* No kicks */
|
case 'Q': /* No kicks */
|
||||||
case 't': /* Topic locked */
|
case 't': /* Topic locked */
|
||||||
if(is_oper || is_machine || is_owner ||
|
if(is_oper || is_machine || is_owner ||
|
||||||
@@ -1009,15 +1018,15 @@ Add_To_List(char what, CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel,
|
|||||||
|
|
||||||
switch (what) {
|
switch (what) {
|
||||||
case 'I':
|
case 'I':
|
||||||
if (!Channel_AddInvite(Channel, mask, false))
|
if (!Channel_AddInvite(Channel, mask, false, Client_ID(Client)))
|
||||||
return CONNECTED;
|
return CONNECTED;
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
if (!Channel_AddBan(Channel, mask))
|
if (!Channel_AddBan(Channel, mask, Client_ID(Client)))
|
||||||
return CONNECTED;
|
return CONNECTED;
|
||||||
break;
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
if (!Channel_AddExcept(Channel, mask))
|
if (!Channel_AddExcept(Channel, mask, Client_ID(Client)))
|
||||||
return CONNECTED;
|
return CONNECTED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,6 +150,14 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
|
|||||||
return IRC_WriteErrClient(from, ERR_NOSUCHNICK_MSG,
|
return IRC_WriteErrClient(from, ERR_NOSUCHNICK_MSG,
|
||||||
Client_ID(Client), Req->argv[0]);
|
Client_ID(Client), Req->argv[0]);
|
||||||
|
|
||||||
|
if (Req->argv[1][0] == '&') {
|
||||||
|
/* Local channel. Make sure the target user is on this server! */
|
||||||
|
if (Client_Conn(target) == NONE)
|
||||||
|
return IRC_WriteErrClient(from, ERR_USERNOTONSERV_MSG,
|
||||||
|
Client_ID(Client),
|
||||||
|
Req->argv[0]);
|
||||||
|
}
|
||||||
|
|
||||||
chan = Channel_Search(Req->argv[1]);
|
chan = Channel_Search(Req->argv[1]);
|
||||||
if (chan) {
|
if (chan) {
|
||||||
/* Channel exists. Is the user a valid member of the channel? */
|
/* Channel exists. Is the user a valid member of the channel? */
|
||||||
@@ -192,7 +200,7 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
|
|||||||
if (remember) {
|
if (remember) {
|
||||||
/* We must remember this invite */
|
/* We must remember this invite */
|
||||||
if (!Channel_AddInvite(chan, Client_MaskCloaked(target),
|
if (!Channel_AddInvite(chan, Client_MaskCloaked(target),
|
||||||
true))
|
true, Client_ID(from)))
|
||||||
return CONNECTED;
|
return CONNECTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
* Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
#include "class.h"
|
#include "class.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
#include "irc.h"
|
#include "irc.h"
|
||||||
|
#include "irc-macros.h"
|
||||||
#include "irc-write.h"
|
#include "irc-write.h"
|
||||||
#include "lists.h"
|
#include "lists.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
@@ -46,7 +47,7 @@
|
|||||||
static bool
|
static bool
|
||||||
Bad_OperPass(CLIENT *Client, char *errtoken, char *errmsg)
|
Bad_OperPass(CLIENT *Client, char *errtoken, char *errmsg)
|
||||||
{
|
{
|
||||||
Log(LOG_WARNING, "Got invalid OPER from \"%s\": \"%s\" -- %s!",
|
Log(LOG_ERR|LOG_snotice, "Got invalid OPER from \"%s\": \"%s\" -- %s!",
|
||||||
Client_Mask(Client), errtoken, errmsg);
|
Client_Mask(Client), errtoken, errmsg);
|
||||||
/* Increase penalty to slow down possible brute force attacks */
|
/* Increase penalty to slow down possible brute force attacks */
|
||||||
IRC_SetPenalty(Client, 10);
|
IRC_SetPenalty(Client, 10);
|
||||||
@@ -358,6 +359,7 @@ IRC_WALLOPS( CLIENT *Client, REQUEST *Req )
|
|||||||
from = Client;
|
from = Client;
|
||||||
break;
|
break;
|
||||||
case CLIENT_SERVER:
|
case CLIENT_SERVER:
|
||||||
|
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||||
from = Client_Search(Req->prefix);
|
from = Client_Search(Req->prefix);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -396,7 +398,16 @@ IRC_xLINE(CLIENT *Client, REQUEST *Req)
|
|||||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||||
Client_ID(Client), Req->command);
|
Client_ID(Client), Req->command);
|
||||||
|
|
||||||
from = Op_Check(Client, Req);
|
if (!Conf_AllowRemoteOper && Client_Type(Client) == CLIENT_SERVER) {
|
||||||
|
/* Explicitely forbid remote servers to modify "x-lines" when
|
||||||
|
* the "AllowRemoteOper" configuration option isn't set, even
|
||||||
|
* when the command seems to originate from the remote server
|
||||||
|
* itself: this prevents GLINE's to become set during server
|
||||||
|
* handshake in this case (what wouldn't be possible during
|
||||||
|
* regular runtime when a remote IRC Op sends the command). */
|
||||||
|
from = NULL;
|
||||||
|
} else
|
||||||
|
from = Op_Check(Client, Req);
|
||||||
if (!from)
|
if (!from)
|
||||||
return Op_NoPrivileges(Client, Req);
|
return Op_NoPrivileges(Client, Req);
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
#include "numeric.h"
|
#include "numeric.h"
|
||||||
#include "ngircd.h"
|
#include "ngircd.h"
|
||||||
|
#include "irc.h"
|
||||||
#include "irc-info.h"
|
#include "irc-info.h"
|
||||||
#include "irc-write.h"
|
#include "irc-write.h"
|
||||||
#include "op.h"
|
#include "op.h"
|
||||||
@@ -245,66 +246,96 @@ IRC_NJOIN( CLIENT *Client, REQUEST *Req )
|
|||||||
CHANNEL *chan;
|
CHANNEL *chan;
|
||||||
CLIENT *c;
|
CLIENT *c;
|
||||||
|
|
||||||
assert( Client != NULL );
|
assert(Client != NULL);
|
||||||
assert( Req != NULL );
|
assert(Req != NULL);
|
||||||
|
|
||||||
strlcpy( nick_in, Req->argv[1], sizeof( nick_in ));
|
strlcpy(nick_in, Req->argv[1], sizeof(nick_in));
|
||||||
strcpy( nick_out, "" );
|
strcpy(nick_out, "");
|
||||||
|
|
||||||
channame = Req->argv[0];
|
channame = Req->argv[0];
|
||||||
ptr = strtok( nick_in, "," );
|
|
||||||
while( ptr )
|
ptr = strtok(nick_in, ",");
|
||||||
{
|
while (ptr) {
|
||||||
is_owner = is_chanadmin = is_op = is_halfop = is_voiced = false;
|
is_owner = is_chanadmin = is_op = is_halfop = is_voiced = false;
|
||||||
|
|
||||||
/* cut off prefixes */
|
/* cut off prefixes */
|
||||||
while(( *ptr == '~') || ( *ptr == '&' ) || ( *ptr == '@' ) ||
|
while ((*ptr == '~') || (*ptr == '&') || (*ptr == '@') ||
|
||||||
( *ptr == '%') || ( *ptr == '+' ))
|
(*ptr == '%') || (*ptr == '+')) {
|
||||||
{
|
if (*ptr == '~')
|
||||||
if( *ptr == '~' ) is_owner = true;
|
is_owner = true;
|
||||||
if( *ptr == '&' ) is_chanadmin = true;
|
if (*ptr == '&')
|
||||||
if( *ptr == '@' ) is_op = true;
|
is_chanadmin = true;
|
||||||
if( *ptr == 'h' ) is_halfop = true;
|
if (*ptr == '@')
|
||||||
if( *ptr == '+' ) is_voiced = true;
|
is_op = true;
|
||||||
|
if (*ptr == '%')
|
||||||
|
is_halfop = true;
|
||||||
|
if (*ptr == '+')
|
||||||
|
is_voiced = true;
|
||||||
ptr++;
|
ptr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
c = Client_Search( ptr );
|
c = Client_Search(ptr);
|
||||||
if( c )
|
if (!c) {
|
||||||
{
|
/* Client not found? */
|
||||||
Channel_Join( c, channame );
|
Log(LOG_ERR,
|
||||||
chan = Channel_Search( channame );
|
"Got NJOIN for unknown nick \"%s\" for channel \"%s\"!",
|
||||||
assert( chan != NULL );
|
ptr, channame);
|
||||||
|
goto skip_njoin;
|
||||||
if( is_owner ) Channel_UserModeAdd( chan, c, 'q' );
|
|
||||||
if( is_chanadmin ) Channel_UserModeAdd( chan, c, 'a' );
|
|
||||||
if( is_op ) Channel_UserModeAdd( chan, c, 'o' );
|
|
||||||
if( is_halfop ) Channel_UserModeAdd( chan, c, 'h' );
|
|
||||||
if( is_voiced ) Channel_UserModeAdd( chan, c, 'v' );
|
|
||||||
|
|
||||||
/* announce to channel... */
|
|
||||||
IRC_WriteStrChannelPrefix( Client, chan, c, false, "JOIN :%s", channame );
|
|
||||||
|
|
||||||
/* set Channel-User-Modes */
|
|
||||||
strlcpy( modes, Channel_UserModes( chan, c ), sizeof( modes ));
|
|
||||||
if( modes[0] )
|
|
||||||
{
|
|
||||||
/* send modes to channel */
|
|
||||||
IRC_WriteStrChannelPrefix( Client, chan, Client, false, "MODE %s +%s %s", channame, modes, Client_ID( c ));
|
|
||||||
}
|
|
||||||
|
|
||||||
if( nick_out[0] != '\0' ) strlcat( nick_out, ",", sizeof( nick_out ));
|
|
||||||
if( is_owner ) strlcat( nick_out, "~", sizeof( nick_out ));
|
|
||||||
if( is_chanadmin ) strlcat( nick_out, "&", sizeof( nick_out ));
|
|
||||||
if( is_op ) strlcat( nick_out, "@", sizeof( nick_out ));
|
|
||||||
if( is_halfop ) strlcat( nick_out, "%", sizeof( nick_out ));
|
|
||||||
if( is_voiced ) strlcat( nick_out, "+", sizeof( nick_out ));
|
|
||||||
strlcat( nick_out, ptr, sizeof( nick_out ));
|
|
||||||
}
|
}
|
||||||
else Log( LOG_ERR, "Got NJOIN for unknown nick \"%s\" for channel \"%s\"!", ptr, channame );
|
|
||||||
|
|
||||||
/* search for next Nick */
|
if (!Channel_Join(c, channame)) {
|
||||||
ptr = strtok( NULL, "," );
|
/* Failed to join channel. Ooops!? */
|
||||||
|
Log(LOG_ALERT,
|
||||||
|
"Failed to join client \"%s\" to channel \"%s\" (NJOIN): killing it!",
|
||||||
|
ptr, channame);
|
||||||
|
IRC_KillClient(NULL, NULL, ptr, "Internal NJOIN error!");
|
||||||
|
Log(LOG_DEBUG, "... done.");
|
||||||
|
goto skip_njoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
chan = Channel_Search(channame);
|
||||||
|
assert(chan != NULL);
|
||||||
|
|
||||||
|
if (is_owner)
|
||||||
|
Channel_UserModeAdd(chan, c, 'q');
|
||||||
|
if (is_chanadmin)
|
||||||
|
Channel_UserModeAdd(chan, c, 'a');
|
||||||
|
if (is_op)
|
||||||
|
Channel_UserModeAdd(chan, c, 'o');
|
||||||
|
if (is_halfop)
|
||||||
|
Channel_UserModeAdd(chan, c, 'h');
|
||||||
|
if (is_voiced)
|
||||||
|
Channel_UserModeAdd(chan, c, 'v');
|
||||||
|
|
||||||
|
/* Announce client to the channel */
|
||||||
|
IRC_WriteStrChannelPrefix(Client, chan, c, false,
|
||||||
|
"JOIN :%s", channame);
|
||||||
|
|
||||||
|
/* Announce "channel user modes" to the channel, if any */
|
||||||
|
strlcpy(modes, Channel_UserModes(chan, c), sizeof(modes));
|
||||||
|
if (modes[0])
|
||||||
|
IRC_WriteStrChannelPrefix(Client, chan, Client, false,
|
||||||
|
"MODE %s +%s %s", channame,
|
||||||
|
modes, Client_ID(c));
|
||||||
|
|
||||||
|
/* Build nick list for forwarding command */
|
||||||
|
if (nick_out[0] != '\0')
|
||||||
|
strlcat(nick_out, ",", sizeof(nick_out));
|
||||||
|
if (is_owner)
|
||||||
|
strlcat(nick_out, "~", sizeof(nick_out));
|
||||||
|
if (is_chanadmin)
|
||||||
|
strlcat(nick_out, "&", sizeof(nick_out));
|
||||||
|
if (is_op)
|
||||||
|
strlcat(nick_out, "@", sizeof(nick_out));
|
||||||
|
if (is_halfop)
|
||||||
|
strlcat(nick_out, "%", sizeof(nick_out));
|
||||||
|
if (is_voiced)
|
||||||
|
strlcat(nick_out, "+", sizeof(nick_out));
|
||||||
|
strlcat(nick_out, ptr, sizeof(nick_out));
|
||||||
|
|
||||||
|
skip_njoin:
|
||||||
|
/* Get next nick, if any ... */
|
||||||
|
ptr = strtok(NULL, ",");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* forward to other servers */
|
/* forward to other servers */
|
||||||
|
|||||||
@@ -521,12 +521,12 @@ va_dcl
|
|||||||
if (Client_HasMode(to, 'w'))
|
if (Client_HasMode(to, 'w'))
|
||||||
IRC_WriteStrClientPrefix(to, From,
|
IRC_WriteStrClientPrefix(to, From,
|
||||||
"WALLOPS :%s", msg);
|
"WALLOPS :%s", msg);
|
||||||
break;
|
break;
|
||||||
case CLIENT_SERVER:
|
case CLIENT_SERVER:
|
||||||
if (to != Client)
|
if (to != Client)
|
||||||
IRC_WriteStrClientPrefix(to, From,
|
IRC_WriteStrClientPrefix(to, From,
|
||||||
"WALLOPS :%s", msg);
|
"WALLOPS :%s", msg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} /* IRC_SendWallops */
|
} /* IRC_SendWallops */
|
||||||
|
|||||||
131
src/ngircd/irc.c
131
src/ngircd/irc.c
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
* Copyright (c)2001-2018 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -85,6 +85,8 @@ IRC_CheckListTooBig(CLIENT *From, const int Count, const int Limit,
|
|||||||
GLOBAL bool
|
GLOBAL bool
|
||||||
IRC_ERROR(CLIENT *Client, REQUEST *Req)
|
IRC_ERROR(CLIENT *Client, REQUEST *Req)
|
||||||
{
|
{
|
||||||
|
char *msg;
|
||||||
|
|
||||||
assert( Client != NULL );
|
assert( Client != NULL );
|
||||||
assert( Req != NULL );
|
assert( Req != NULL );
|
||||||
|
|
||||||
@@ -99,12 +101,20 @@ IRC_ERROR(CLIENT *Client, REQUEST *Req)
|
|||||||
return CONNECTED;
|
return CONNECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Req->argc < 1)
|
if (Req->argc < 1) {
|
||||||
|
msg = "Got ERROR command";
|
||||||
Log(LOG_NOTICE, "Got ERROR from \"%s\"!",
|
Log(LOG_NOTICE, "Got ERROR from \"%s\"!",
|
||||||
Client_Mask(Client));
|
Client_Mask(Client));
|
||||||
else
|
} else {
|
||||||
|
msg = Req->argv[0];
|
||||||
Log(LOG_NOTICE, "Got ERROR from \"%s\": \"%s\"!",
|
Log(LOG_NOTICE, "Got ERROR from \"%s\": \"%s\"!",
|
||||||
Client_Mask(Client), Req->argv[0]);
|
Client_Mask(Client), msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Client_Conn(Client) != NONE) {
|
||||||
|
Conn_Close(Client_Conn(Client), NULL, msg, false);
|
||||||
|
return DISCONNECTED;
|
||||||
|
}
|
||||||
|
|
||||||
return CONNECTED;
|
return CONNECTED;
|
||||||
} /* IRC_ERROR */
|
} /* IRC_ERROR */
|
||||||
@@ -240,7 +250,7 @@ IRC_TRACE(CLIENT *Client, REQUEST *Req)
|
|||||||
PACKAGE_VERSION, Client_ID(target),
|
PACKAGE_VERSION, Client_ID(target),
|
||||||
Client_ID(Client_NextHop(target)),
|
Client_ID(Client_NextHop(target)),
|
||||||
Option_String(idx2),
|
Option_String(idx2),
|
||||||
time(NULL) - Conn_StartTime(idx2),
|
(long)(time(NULL) - Conn_StartTime(idx2)),
|
||||||
Conn_SendQ(idx), Conn_SendQ(idx2)))
|
Conn_SendQ(idx), Conn_SendQ(idx2)))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
|
|
||||||
@@ -339,9 +349,12 @@ GLOBAL bool
|
|||||||
IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reason)
|
IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reason)
|
||||||
{
|
{
|
||||||
const char *msg;
|
const char *msg;
|
||||||
CONN_ID my_conn, conn;
|
CONN_ID my_conn = NONE, conn;
|
||||||
CLIENT *c;
|
CLIENT *c;
|
||||||
|
|
||||||
|
assert(Nick != NULL);
|
||||||
|
assert(Reason != NULL);
|
||||||
|
|
||||||
/* Do we know such a client in the network? */
|
/* Do we know such a client in the network? */
|
||||||
c = Client_Search(Nick);
|
c = Client_Search(Nick);
|
||||||
if (!c) {
|
if (!c) {
|
||||||
@@ -349,12 +362,8 @@ IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reaso
|
|||||||
return CONNECTED;
|
return CONNECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Inform other servers */
|
if (Client_Type(c) != CLIENT_USER && Client_Type(c) != CLIENT_GOTNICK
|
||||||
IRC_WriteStrServersPrefix(From ? Client : NULL,
|
&& Client_Type(c) != CLIENT_SERVICE) {
|
||||||
From ? From : Client_ThisServer(),
|
|
||||||
"KILL %s :%s", Nick, Reason);
|
|
||||||
|
|
||||||
if (Client_Type(c) != CLIENT_USER && Client_Type(c) != CLIENT_GOTNICK) {
|
|
||||||
/* Target of this KILL is not a regular user, this is
|
/* Target of this KILL is not a regular user, this is
|
||||||
* invalid! So we ignore this case if we received a
|
* invalid! So we ignore this case if we received a
|
||||||
* regular KILL from the network and try to kill the
|
* regular KILL from the network and try to kill the
|
||||||
@@ -375,8 +384,15 @@ IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reaso
|
|||||||
Client_Type(c), Nick);
|
Client_Type(c), Nick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Inform other servers */
|
||||||
|
IRC_WriteStrServersPrefix(From ? Client : NULL,
|
||||||
|
From ? From : Client_ThisServer(),
|
||||||
|
"KILL %s :%s", Nick, Reason);
|
||||||
|
|
||||||
|
|
||||||
/* Save ID of this connection */
|
/* Save ID of this connection */
|
||||||
my_conn = Client_Conn(Client);
|
if (Client)
|
||||||
|
my_conn = Client_Conn(Client);
|
||||||
|
|
||||||
/* Kill the client NOW:
|
/* Kill the client NOW:
|
||||||
* - Close the local connection (if there is one),
|
* - Close the local connection (if there is one),
|
||||||
@@ -467,11 +483,8 @@ Help(CLIENT *Client, const char *Topic)
|
|||||||
* @return Pointer to static (global) string buffer.
|
* @return Pointer to static (global) string buffer.
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
#ifdef ZLIB
|
#if defined(SSL_SUPPORT) || defined(ZLIB)
|
||||||
Option_String(CONN_ID Idx)
|
Option_String(CONN_ID Idx)
|
||||||
#else
|
|
||||||
Option_String(UNUSED CONN_ID Idx)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
static char option_txt[8];
|
static char option_txt[8];
|
||||||
UINT16 options;
|
UINT16 options;
|
||||||
@@ -489,11 +502,27 @@ Option_String(UNUSED CONN_ID Idx)
|
|||||||
if(options & CONN_ZIP) /* zlib compression enabled */
|
if(options & CONN_ZIP) /* zlib compression enabled */
|
||||||
strlcat(option_txt, "z", sizeof(option_txt));
|
strlcat(option_txt, "z", sizeof(option_txt));
|
||||||
#endif
|
#endif
|
||||||
LogDebug(" *** %d: %d = %s", Idx, options, option_txt);
|
|
||||||
|
|
||||||
return option_txt;
|
return option_txt;
|
||||||
|
#else
|
||||||
|
Option_String(UNUSED CONN_ID Idx)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
#endif
|
||||||
} /* Option_String */
|
} /* Option_String */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a message to target(s).
|
||||||
|
*
|
||||||
|
* This function is used by IRC_{PRIVMSG|NOTICE|SQUERY} to actualy
|
||||||
|
* send the message(s).
|
||||||
|
*
|
||||||
|
* @param Client The client from which this command has been received.
|
||||||
|
* @param Req Request structure with prefix and all parameters.
|
||||||
|
* @param ForceType Required type of the destination of the message(s).
|
||||||
|
* @param SendErrors Whether to report errors back to the client or not.
|
||||||
|
* @return CONNECTED or DISCONNECTED.
|
||||||
|
*/
|
||||||
static bool
|
static bool
|
||||||
Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
||||||
{
|
{
|
||||||
@@ -501,8 +530,10 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
|||||||
CL2CHAN *cl2chan;
|
CL2CHAN *cl2chan;
|
||||||
CHANNEL *chan;
|
CHANNEL *chan;
|
||||||
char *currentTarget = Req->argv[0];
|
char *currentTarget = Req->argv[0];
|
||||||
char *lastCurrentTarget = NULL;
|
char *strtok_last = NULL;
|
||||||
char *message = NULL;
|
char *message = NULL;
|
||||||
|
char *targets[MAX_HNDL_TARGETS];
|
||||||
|
int i, target_nr = 0;
|
||||||
|
|
||||||
assert(Client != NULL);
|
assert(Client != NULL);
|
||||||
assert(Req != NULL);
|
assert(Req != NULL);
|
||||||
@@ -526,7 +557,7 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
|||||||
Client_ID(Client), Req->command);
|
Client_ID(Client), Req->command);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Client_Type(Client) == CLIENT_SERVER)
|
if (Client_Type(Client) == CLIENT_SERVER && Req->prefix)
|
||||||
from = Client_Search(Req->prefix);
|
from = Client_Search(Req->prefix);
|
||||||
else
|
else
|
||||||
from = Client;
|
from = Client;
|
||||||
@@ -542,10 +573,19 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
|||||||
message = Req->argv[1];
|
message = Req->argv[1];
|
||||||
|
|
||||||
/* handle msgtarget = msgto *("," msgto) */
|
/* handle msgtarget = msgto *("," msgto) */
|
||||||
currentTarget = strtok_r(currentTarget, ",", &lastCurrentTarget);
|
currentTarget = strtok_r(currentTarget, ",", &strtok_last);
|
||||||
ngt_UpperStr(Req->command);
|
ngt_UpperStr(Req->command);
|
||||||
|
|
||||||
|
/* Please note that "currentTarget" is NULL when the target contains
|
||||||
|
* the separator character only, e. g. "," or ",,,," etc.! */
|
||||||
while (currentTarget) {
|
while (currentTarget) {
|
||||||
|
/* Make sure that there hasn't been such a target already: */
|
||||||
|
targets[target_nr++] = currentTarget;
|
||||||
|
for(i = 0; i < target_nr - 1; i++) {
|
||||||
|
if (strcasecmp(currentTarget, targets[i]) == 0)
|
||||||
|
goto send_next_target;
|
||||||
|
}
|
||||||
|
|
||||||
/* Check for and handle valid <msgto> of form:
|
/* Check for and handle valid <msgto> of form:
|
||||||
* RFC 2812 2.3.1:
|
* RFC 2812 2.3.1:
|
||||||
* msgto = channel / ( user [ "%" host ] "@" servername )
|
* msgto = channel / ( user [ "%" host ] "@" servername )
|
||||||
@@ -654,7 +694,10 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
|||||||
goto send_next_target;
|
goto send_next_target;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Client_HasMode(cl, 'C')) {
|
if (Client_HasMode(cl, 'C') &&
|
||||||
|
!Client_HasMode(from, 'o') &&
|
||||||
|
!(Client_Type(from) == CLIENT_SERVER) &&
|
||||||
|
!(Client_Type(from) == CLIENT_SERVICE)) {
|
||||||
cl2chan = Channel_FirstChannelOf(cl);
|
cl2chan = Channel_FirstChannelOf(cl);
|
||||||
while (cl2chan) {
|
while (cl2chan) {
|
||||||
chan = Channel_GetChannel(cl2chan);
|
chan = Channel_GetChannel(cl2chan);
|
||||||
@@ -689,14 +732,14 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
|||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
} else if (ForceType != CLIENT_SERVICE
|
} else if (ForceType != CLIENT_SERVICE
|
||||||
&& (chan = Channel_Search(currentTarget))) {
|
&& (chan = Channel_Search(currentTarget))) {
|
||||||
|
/* Target is a channel */
|
||||||
if (!Channel_Write(chan, from, Client, Req->command,
|
if (!Channel_Write(chan, from, Client, Req->command,
|
||||||
SendErrors, message))
|
SendErrors, message))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
} else if (ForceType != CLIENT_SERVICE
|
} else if (ForceType != CLIENT_SERVICE
|
||||||
/* $#: server/target mask, RFC 2812, sec. 3.3.1 */
|
|
||||||
&& strchr("$#", currentTarget[0])
|
&& strchr("$#", currentTarget[0])
|
||||||
&& strchr(currentTarget, '.')) {
|
&& strchr(currentTarget, '.')) {
|
||||||
/* targetmask */
|
/* $#: server/host mask, RFC 2812, sec. 3.3.1 */
|
||||||
if (!Send_Message_Mask(from, Req->command, currentTarget,
|
if (!Send_Message_Mask(from, Req->command, currentTarget,
|
||||||
message, SendErrors))
|
message, SendErrors))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
@@ -709,14 +752,35 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
|||||||
}
|
}
|
||||||
|
|
||||||
send_next_target:
|
send_next_target:
|
||||||
currentTarget = strtok_r(NULL, ",", &lastCurrentTarget);
|
currentTarget = strtok_r(NULL, ",", &strtok_last);
|
||||||
if (currentTarget)
|
if (!currentTarget)
|
||||||
Conn_SetPenalty(Client_Conn(Client), 1);
|
break;
|
||||||
|
|
||||||
|
Conn_SetPenalty(Client_Conn(Client), 1);
|
||||||
|
|
||||||
|
if (target_nr >= MAX_HNDL_TARGETS) {
|
||||||
|
/* Too many targets given! */
|
||||||
|
return IRC_WriteErrClient(Client,
|
||||||
|
ERR_TOOMANYTARGETS_MSG,
|
||||||
|
currentTarget);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return CONNECTED;
|
return CONNECTED;
|
||||||
} /* Send_Message */
|
} /* Send_Message */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a message to "target mask" target(s).
|
||||||
|
*
|
||||||
|
* See RFC 2812, sec. 3.3.1 for details.
|
||||||
|
*
|
||||||
|
* @param from The client from which this command has been received.
|
||||||
|
* @param command The command to use (PRIVMSG, NOTICE, ...).
|
||||||
|
* @param targetMask The "target mask" (will be verified by this function).
|
||||||
|
* @param message The message to send.
|
||||||
|
* @param SendErrors Whether to report errors back to the client or not.
|
||||||
|
* @return CONNECTED or DISCONNECTED.
|
||||||
|
*/
|
||||||
static bool
|
static bool
|
||||||
Send_Message_Mask(CLIENT * from, char * command, char * targetMask,
|
Send_Message_Mask(CLIENT * from, char * command, char * targetMask,
|
||||||
char * message, bool SendErrors)
|
char * message, bool SendErrors)
|
||||||
@@ -740,17 +804,15 @@ Send_Message_Mask(CLIENT * from, char * command, char * targetMask,
|
|||||||
* dot (".") and no wildcards ("*", "?") following the last one.
|
* dot (".") and no wildcards ("*", "?") following the last one.
|
||||||
*/
|
*/
|
||||||
check_wildcards = strrchr(targetMask, '.');
|
check_wildcards = strrchr(targetMask, '.');
|
||||||
assert(check_wildcards != NULL);
|
if (!check_wildcards || check_wildcards[strcspn(check_wildcards, "*?")]) {
|
||||||
if (check_wildcards &&
|
|
||||||
check_wildcards[strcspn(check_wildcards, "*?")])
|
|
||||||
{
|
|
||||||
if (!SendErrors)
|
if (!SendErrors)
|
||||||
return true;
|
return true;
|
||||||
return IRC_WriteErrClient(from, ERR_WILDTOPLEVEL, targetMask);
|
return IRC_WriteErrClient(from, ERR_WILDTOPLEVEL_MSG,
|
||||||
|
targetMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* #: hostmask, see RFC 2812, sec. 3.3.1 */
|
|
||||||
if (targetMask[0] == '#') {
|
if (targetMask[0] == '#') {
|
||||||
|
/* #: hostmask, see RFC 2812, sec. 3.3.1 */
|
||||||
for (cl = Client_First(); cl != NULL; cl = Client_Next(cl)) {
|
for (cl = Client_First(); cl != NULL; cl = Client_Next(cl)) {
|
||||||
if (Client_Type(cl) != CLIENT_USER)
|
if (Client_Type(cl) != CLIENT_USER)
|
||||||
continue;
|
continue;
|
||||||
@@ -761,7 +823,8 @@ Send_Message_Mask(CLIENT * from, char * command, char * targetMask,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
assert(targetMask[0] == '$'); /* $: server mask, see RFC 2812, sec. 3.3.1 */
|
/* $: server mask, see RFC 2812, sec. 3.3.1 */
|
||||||
|
assert(targetMask[0] == '$');
|
||||||
for (cl = Client_First(); cl != NULL; cl = Client_Next(cl)) {
|
for (cl = Client_First(); cl != NULL; cl = Client_Next(cl)) {
|
||||||
if (Client_Type(cl) != CLIENT_USER)
|
if (Client_Type(cl) != CLIENT_USER)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ struct list_elem {
|
|||||||
struct list_elem *next; /** pointer to next list element */
|
struct list_elem *next; /** pointer to next list element */
|
||||||
char mask[MASK_LEN]; /** IRC mask */
|
char mask[MASK_LEN]; /** IRC mask */
|
||||||
char *reason; /** Optional "reason" text */
|
char *reason; /** Optional "reason" text */
|
||||||
time_t valid_until; /** 0: unlimited; 1: once; t(>1): until t */
|
time_t valid_until; /** 0: unlimited; t(>0): until t */
|
||||||
|
bool onlyonce;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -65,7 +66,7 @@ Lists_GetReason(const struct list_elem *e)
|
|||||||
* Get "validity" value stored in list element.
|
* Get "validity" value stored in list element.
|
||||||
*
|
*
|
||||||
* @param list_elem List element.
|
* @param list_elem List element.
|
||||||
* @return Validity: 0=unlimited, 1=once, >1 until this time stamp.
|
* @return Validity: 0=unlimited, >0 until this time stamp.
|
||||||
*/
|
*/
|
||||||
GLOBAL time_t
|
GLOBAL time_t
|
||||||
Lists_GetValidity(const struct list_elem *e)
|
Lists_GetValidity(const struct list_elem *e)
|
||||||
@@ -74,6 +75,19 @@ Lists_GetValidity(const struct list_elem *e)
|
|||||||
return e->valid_until;
|
return e->valid_until;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get "onlyonce" value stored in list element.
|
||||||
|
*
|
||||||
|
* @param list_elem List element.
|
||||||
|
* @return True if the element was stored for single use, false otherwise.
|
||||||
|
*/
|
||||||
|
GLOBAL bool
|
||||||
|
Lists_GetOnlyOnce(const struct list_elem *e)
|
||||||
|
{
|
||||||
|
assert(e != NULL);
|
||||||
|
return e->onlyonce;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get first list element of a list.
|
* Get first list element of a list.
|
||||||
*
|
*
|
||||||
@@ -111,7 +125,7 @@ Lists_GetNext(const struct list_elem *e)
|
|||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
Lists_Add(struct list_head *h, const char *Mask, time_t ValidUntil,
|
Lists_Add(struct list_head *h, const char *Mask, time_t ValidUntil,
|
||||||
const char *Reason)
|
const char *Reason, bool OnlyOnce)
|
||||||
{
|
{
|
||||||
struct list_elem *e, *newelem;
|
struct list_elem *e, *newelem;
|
||||||
|
|
||||||
@@ -148,6 +162,7 @@ Lists_Add(struct list_head *h, const char *Mask, time_t ValidUntil,
|
|||||||
else
|
else
|
||||||
newelem->reason = NULL;
|
newelem->reason = NULL;
|
||||||
newelem->valid_until = ValidUntil;
|
newelem->valid_until = ValidUntil;
|
||||||
|
newelem->onlyonce = OnlyOnce;
|
||||||
newelem->next = e;
|
newelem->next = e;
|
||||||
h->first = newelem;
|
h->first = newelem;
|
||||||
|
|
||||||
@@ -329,7 +344,7 @@ Lists_CheckReason(struct list_head *h, CLIENT *Client, char *reason, size_t len)
|
|||||||
if (MatchCaseInsensitive(e->mask, Client_MaskCloaked(Client))) {
|
if (MatchCaseInsensitive(e->mask, Client_MaskCloaked(Client))) {
|
||||||
if (len && e->reason)
|
if (len && e->reason)
|
||||||
strlcpy(reason, e->reason, len);
|
strlcpy(reason, e->reason, len);
|
||||||
if (e->valid_until == 1) {
|
if (e->onlyonce) {
|
||||||
/* Entry is valid only once, delete it */
|
/* Entry is valid only once, delete it */
|
||||||
LogDebug("Deleted \"%s\" from list (used).",
|
LogDebug("Deleted \"%s\" from list (used).",
|
||||||
e->mask);
|
e->mask);
|
||||||
@@ -363,14 +378,14 @@ Lists_Expire(struct list_head *h, const char *ListName)
|
|||||||
|
|
||||||
while (e) {
|
while (e) {
|
||||||
next = e->next;
|
next = e->next;
|
||||||
if (e->valid_until > 1 && e->valid_until < now) {
|
if (e->valid_until > 0 && e->valid_until < now) {
|
||||||
/* Entry is expired, delete it */
|
/* Entry is expired, delete it */
|
||||||
if (e->reason)
|
if (e->reason)
|
||||||
Log(LOG_INFO,
|
Log(LOG_NOTICE|LOG_snotice,
|
||||||
"Deleted \"%s\" (\"%s\") from %s list (expired).",
|
"Deleted \"%s\" (\"%s\") from %s list (expired).",
|
||||||
e->mask, e->reason, ListName);
|
e->mask, e->reason, ListName);
|
||||||
else
|
else
|
||||||
Log(LOG_INFO,
|
Log(LOG_NOTICE|LOG_snotice,
|
||||||
"Deleted \"%s\" from %s list (expired).",
|
"Deleted \"%s\" from %s list (expired).",
|
||||||
e->mask, ListName);
|
e->mask, ListName);
|
||||||
Lists_Unlink(h, last, e);
|
Lists_Unlink(h, last, e);
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ GLOBAL struct list_elem *Lists_CheckDupeMask PARAMS((const struct list_head *hea
|
|||||||
const char *mask));
|
const char *mask));
|
||||||
|
|
||||||
GLOBAL bool Lists_Add PARAMS((struct list_head *h, const char *Mask,
|
GLOBAL bool Lists_Add PARAMS((struct list_head *h, const char *Mask,
|
||||||
time_t ValidUntil, const char *Reason));
|
time_t ValidUntil, const char *Reason,
|
||||||
|
bool OnlyOnce));
|
||||||
GLOBAL void Lists_Del PARAMS((struct list_head *head, const char *Mask));
|
GLOBAL void Lists_Del PARAMS((struct list_head *head, const char *Mask));
|
||||||
GLOBAL unsigned long Lists_Count PARAMS((struct list_head *h));
|
GLOBAL unsigned long Lists_Count PARAMS((struct list_head *h));
|
||||||
|
|
||||||
@@ -46,6 +47,7 @@ GLOBAL void Lists_MakeMask PARAMS((const char *Pattern, char *mask, size_t len))
|
|||||||
GLOBAL const char *Lists_GetMask PARAMS((const struct list_elem *e));
|
GLOBAL const char *Lists_GetMask PARAMS((const struct list_elem *e));
|
||||||
GLOBAL const char *Lists_GetReason PARAMS((const struct list_elem *e));
|
GLOBAL const char *Lists_GetReason PARAMS((const struct list_elem *e));
|
||||||
GLOBAL time_t Lists_GetValidity PARAMS((const struct list_elem *e));
|
GLOBAL time_t Lists_GetValidity PARAMS((const struct list_elem *e));
|
||||||
|
GLOBAL bool Lists_GetOnlyOnce PARAMS((const struct list_elem *e));
|
||||||
|
|
||||||
GLOBAL void Lists_Expire PARAMS((struct list_head *h, const char *ListName));
|
GLOBAL void Lists_Expire PARAMS((struct list_head *h, const char *ListName));
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ Login_User(CLIENT * Client)
|
|||||||
/* Don't do any PAM authentication at all if PAM is not
|
/* Don't do any PAM authentication at all if PAM is not
|
||||||
* enabled, instead emulate the behavior of the daemon
|
* enabled, instead emulate the behavior of the daemon
|
||||||
* compiled without PAM support. */
|
* compiled without PAM support. */
|
||||||
if (strcmp(Conn_Password(conn), Conf_ServerPwd) == 0)
|
if (strcmp(Conn_Password(conn), Conf_ServerPwd) == 0)
|
||||||
return Login_User_PostAuth(Client);
|
return Login_User_PostAuth(Client);
|
||||||
Client_Reject(Client, "Bad server password", false);
|
Client_Reject(Client, "Bad server password", false);
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
|
|||||||
@@ -50,8 +50,10 @@ static int Matche_After_Star PARAMS(( const char *p, const char *t ));
|
|||||||
GLOBAL bool
|
GLOBAL bool
|
||||||
Match( const char *Pattern, const char *String )
|
Match( const char *Pattern, const char *String )
|
||||||
{
|
{
|
||||||
if( Matche( Pattern, String ) == MATCH_VALID ) return true;
|
if (Matche(Pattern, String) == MATCH_VALID)
|
||||||
else return false;
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
} /* Match */
|
} /* Match */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,10 +66,12 @@ Match( const char *Pattern, const char *String )
|
|||||||
GLOBAL bool
|
GLOBAL bool
|
||||||
MatchCaseInsensitive(const char *Pattern, const char *String)
|
MatchCaseInsensitive(const char *Pattern, const char *String)
|
||||||
{
|
{
|
||||||
char haystack[COMMAND_LEN];
|
char needle[COMMAND_LEN], haystack[COMMAND_LEN];
|
||||||
|
|
||||||
|
strlcpy(needle, Pattern, sizeof(needle));
|
||||||
strlcpy(haystack, String, sizeof(haystack));
|
strlcpy(haystack, String, sizeof(haystack));
|
||||||
return Match(Pattern, ngt_LowerStr(haystack));
|
|
||||||
|
return Match(ngt_LowerStr(needle), ngt_LowerStr(haystack));
|
||||||
} /* MatchCaseInsensitive */
|
} /* MatchCaseInsensitive */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -82,16 +86,14 @@ GLOBAL bool
|
|||||||
MatchCaseInsensitiveList(const char *Pattern, const char *String,
|
MatchCaseInsensitiveList(const char *Pattern, const char *String,
|
||||||
const char *Separator)
|
const char *Separator)
|
||||||
{
|
{
|
||||||
char tmp_pattern[COMMAND_LEN], haystack[COMMAND_LEN], *ptr;
|
char tmp_pattern[COMMAND_LEN], *ptr;
|
||||||
|
|
||||||
strlcpy(tmp_pattern, Pattern, sizeof(tmp_pattern));
|
strlcpy(tmp_pattern, Pattern, sizeof(tmp_pattern));
|
||||||
strlcpy(haystack, String, sizeof(haystack));
|
|
||||||
ngt_LowerStr(haystack);
|
|
||||||
|
|
||||||
ptr = strtok(tmp_pattern, Separator);
|
ptr = strtok(tmp_pattern, Separator);
|
||||||
while (ptr) {
|
while (ptr) {
|
||||||
ngt_TrimStr(ptr);
|
ngt_TrimStr(ptr);
|
||||||
if (Match(ptr, haystack))
|
if (MatchCaseInsensitive(ptr, String))
|
||||||
return true;
|
return true;
|
||||||
ptr = strtok(NULL, Separator);
|
ptr = strtok(NULL, Separator);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
#define RPL_WHOISIDLE_MSG "317 %s %s %lu %lu :seconds idle, signon time"
|
#define RPL_WHOISIDLE_MSG "317 %s %s %lu %lu :seconds idle, signon time"
|
||||||
#define RPL_ENDOFWHOIS_MSG "318 %s %s :End of WHOIS list"
|
#define RPL_ENDOFWHOIS_MSG "318 %s %s :End of WHOIS list"
|
||||||
#define RPL_WHOISCHANNELS_MSG "319 %s %s :"
|
#define RPL_WHOISCHANNELS_MSG "319 %s %s :"
|
||||||
|
#define RPL_LISTSTART_MSG "321 %s Channel :Users Name"
|
||||||
#define RPL_LIST_MSG "322 %s %s %ld :%s"
|
#define RPL_LIST_MSG "322 %s %s %ld :%s"
|
||||||
#define RPL_LISTEND_MSG "323 %s :End of LIST"
|
#define RPL_LISTEND_MSG "323 %s :End of LIST"
|
||||||
#define RPL_CHANNELMODEIS_MSG "324 %s %s +%s"
|
#define RPL_CHANNELMODEIS_MSG "324 %s %s +%s"
|
||||||
@@ -77,9 +78,9 @@
|
|||||||
#define RPL_TOPICSETBY_MSG "333 %s %s %s %u"
|
#define RPL_TOPICSETBY_MSG "333 %s %s %s %u"
|
||||||
#define RPL_WHOISBOT_MSG "335 %s %s :is an IRC Bot"
|
#define RPL_WHOISBOT_MSG "335 %s %s :is an IRC Bot"
|
||||||
#define RPL_INVITING_MSG "341 %s %s %s%s"
|
#define RPL_INVITING_MSG "341 %s %s %s%s"
|
||||||
#define RPL_INVITELIST_MSG "346 %s %s %s"
|
#define RPL_INVITELIST_MSG "346 %s %s %s %s %d"
|
||||||
#define RPL_ENDOFINVITELIST_MSG "347 %s %s :End of channel invite list"
|
#define RPL_ENDOFINVITELIST_MSG "347 %s %s :End of channel invite list"
|
||||||
#define RPL_EXCEPTLIST_MSG "348 %s %s %s"
|
#define RPL_EXCEPTLIST_MSG "348 %s %s %s %s %d"
|
||||||
#define RPL_ENDOFEXCEPTLIST_MSG "349 %s %s :End of channel exception list"
|
#define RPL_ENDOFEXCEPTLIST_MSG "349 %s %s :End of channel exception list"
|
||||||
#define RPL_VERSION_MSG "351 %s %s-%s.%s %s :%s"
|
#define RPL_VERSION_MSG "351 %s %s-%s.%s %s :%s"
|
||||||
#define RPL_WHOREPLY_MSG "352 %s %s %s %s %s %s %s :%d %s"
|
#define RPL_WHOREPLY_MSG "352 %s %s %s %s %s %s %s :%d %s"
|
||||||
@@ -87,7 +88,7 @@
|
|||||||
#define RPL_LINKS_MSG "364 %s %s %s :%d %s"
|
#define RPL_LINKS_MSG "364 %s %s %s :%d %s"
|
||||||
#define RPL_ENDOFLINKS_MSG "365 %s %s :End of LINKS list"
|
#define RPL_ENDOFLINKS_MSG "365 %s %s :End of LINKS list"
|
||||||
#define RPL_ENDOFNAMES_MSG "366 %s %s :End of NAMES list"
|
#define RPL_ENDOFNAMES_MSG "366 %s %s :End of NAMES list"
|
||||||
#define RPL_BANLIST_MSG "367 %s %s %s"
|
#define RPL_BANLIST_MSG "367 %s %s %s %s %d"
|
||||||
#define RPL_ENDOFBANLIST_MSG "368 %s %s :End of channel ban list"
|
#define RPL_ENDOFBANLIST_MSG "368 %s %s :End of channel ban list"
|
||||||
#define RPL_ENDOFWHOWAS_MSG "369 %s %s :End of WHOWAS list"
|
#define RPL_ENDOFWHOWAS_MSG "369 %s %s :End of WHOWAS list"
|
||||||
#define RPL_INFO_MSG "371 %s :%s"
|
#define RPL_INFO_MSG "371 %s :%s"
|
||||||
@@ -109,11 +110,12 @@
|
|||||||
#define ERR_CANNOTSENDTOCHAN_MSG "404 %s %s :Cannot send to channel"
|
#define ERR_CANNOTSENDTOCHAN_MSG "404 %s %s :Cannot send to channel"
|
||||||
#define ERR_TOOMANYCHANNELS_MSG "405 %s %s :You have joined too many channels"
|
#define ERR_TOOMANYCHANNELS_MSG "405 %s %s :You have joined too many channels"
|
||||||
#define ERR_WASNOSUCHNICK_MSG "406 %s %s :There was no such nickname"
|
#define ERR_WASNOSUCHNICK_MSG "406 %s %s :There was no such nickname"
|
||||||
|
#define ERR_TOOMANYTARGETS_MSG "407 %s :Too many recipients"
|
||||||
#define ERR_NOORIGIN_MSG "409 %s :No origin specified"
|
#define ERR_NOORIGIN_MSG "409 %s :No origin specified"
|
||||||
#define ERR_INVALIDCAP_MSG "410 %s %s :Invalid CAP subcommand"
|
#define ERR_INVALIDCAP_MSG "410 %s %s :Invalid CAP subcommand"
|
||||||
#define ERR_NORECIPIENT_MSG "411 %s :No recipient given (%s)"
|
#define ERR_NORECIPIENT_MSG "411 %s :No recipient given (%s)"
|
||||||
#define ERR_NOTEXTTOSEND_MSG "412 %s :No text to send"
|
#define ERR_NOTEXTTOSEND_MSG "412 %s :No text to send"
|
||||||
#define ERR_WILDTOPLEVEL "414 %s :Wildcard in toplevel domain"
|
#define ERR_WILDTOPLEVEL_MSG "414 %s :Wildcard in toplevel domain"
|
||||||
#define ERR_UNKNOWNCOMMAND_MSG "421 %s %s :Unknown command"
|
#define ERR_UNKNOWNCOMMAND_MSG "421 %s %s :Unknown command"
|
||||||
#define ERR_NOMOTD_MSG "422 %s :MOTD file is missing"
|
#define ERR_NOMOTD_MSG "422 %s :MOTD file is missing"
|
||||||
#define ERR_NONICKNAMEGIVEN_MSG "431 %s :No nickname given"
|
#define ERR_NONICKNAMEGIVEN_MSG "431 %s :No nickname given"
|
||||||
@@ -126,6 +128,7 @@
|
|||||||
#define ERR_USERONCHANNEL_MSG "443 %s %s %s :is already on channel"
|
#define ERR_USERONCHANNEL_MSG "443 %s %s %s :is already on channel"
|
||||||
#define ERR_SUMMONDISABLED_MSG "445 %s :SUMMON has been disabled"
|
#define ERR_SUMMONDISABLED_MSG "445 %s :SUMMON has been disabled"
|
||||||
#define ERR_USERSDISABLED_MSG "446 %s :USERS has been disabled"
|
#define ERR_USERSDISABLED_MSG "446 %s :USERS has been disabled"
|
||||||
|
#define ERR_NONICKCHANGE_MSG "447 %s :Cannot change nickname while on %s(+N)"
|
||||||
#define ERR_NOTREGISTERED_MSG "451 %s :Connection not registered"
|
#define ERR_NOTREGISTERED_MSG "451 %s :Connection not registered"
|
||||||
#define ERR_NOTREGISTEREDSERVER_MSG "451 %s :Connection not registered as server link"
|
#define ERR_NOTREGISTEREDSERVER_MSG "451 %s :Connection not registered as server link"
|
||||||
#define ERR_NEEDMOREPARAMS_MSG "461 %s %s :Syntax error"
|
#define ERR_NEEDMOREPARAMS_MSG "461 %s %s :Syntax error"
|
||||||
@@ -156,6 +159,7 @@
|
|||||||
#define ERR_UMODEUNKNOWNFLAG_MSG "501 %s :Unknown mode"
|
#define ERR_UMODEUNKNOWNFLAG_MSG "501 %s :Unknown mode"
|
||||||
#define ERR_UMODEUNKNOWNFLAG2_MSG "501 %s :Unknown mode \"%c%c\""
|
#define ERR_UMODEUNKNOWNFLAG2_MSG "501 %s :Unknown mode \"%c%c\""
|
||||||
#define ERR_USERSDONTMATCH_MSG "502 %s :Can't set/get mode for other users"
|
#define ERR_USERSDONTMATCH_MSG "502 %s :Can't set/get mode for other users"
|
||||||
|
#define ERR_USERNOTONSERV_MSG "504 %s %s :User is not on this server"
|
||||||
#define ERR_NOINVITE_MSG "518 %s :Cannot invite to %s (+V)"
|
#define ERR_NOINVITE_MSG "518 %s :Cannot invite to %s (+V)"
|
||||||
|
|
||||||
#ifdef ZLIB
|
#ifdef ZLIB
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
* Copyright (c)2001-2018 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -451,7 +451,7 @@ static void
|
|||||||
Show_Version( void )
|
Show_Version( void )
|
||||||
{
|
{
|
||||||
puts( NGIRCd_Version );
|
puts( NGIRCd_Version );
|
||||||
puts( "Copyright (c)2001-2014 Alexander Barton (<alex@barton.de>) and Contributors." );
|
puts( "Copyright (c)2001-2018 Alexander Barton (<alex@barton.de>) and Contributors." );
|
||||||
puts( "Homepage: <http://ngircd.barton.de/>\n" );
|
puts( "Homepage: <http://ngircd.barton.de/>\n" );
|
||||||
puts( "This is free software; see the source for copying conditions. There is NO" );
|
puts( "This is free software; see the source for copying conditions. There is NO" );
|
||||||
puts( "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." );
|
puts( "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." );
|
||||||
@@ -530,7 +530,7 @@ Pidfile_Create(pid_t pid)
|
|||||||
close(pidfd);
|
close(pidfd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (write(pidfd, pidbuf, (size_t)len) != (ssize_t)len)
|
if (write(pidfd, pidbuf, (size_t)len) != (ssize_t)len)
|
||||||
Log(LOG_ERR, "Can't write PID file (%s): %s!", Conf_PidFile,
|
Log(LOG_ERR, "Can't write PID file (%s): %s!", Conf_PidFile,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
@@ -721,9 +721,10 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
|
|||||||
Log(LOG_ERR, "Can't change group ID to %s(%u): %s!",
|
Log(LOG_ERR, "Can't change group ID to %s(%u): %s!",
|
||||||
grp ? grp->gr_name : "?", Conf_GID,
|
grp ? grp->gr_name : "?", Conf_GID,
|
||||||
strerror(real_errno));
|
strerror(real_errno));
|
||||||
if (real_errno != EPERM)
|
if (real_errno != EPERM)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_SETGROUPS
|
||||||
if (setgroups(0, NULL) != 0) {
|
if (setgroups(0, NULL) != 0) {
|
||||||
real_errno = errno;
|
real_errno = errno;
|
||||||
Log(LOG_ERR, "Can't drop supplementary group IDs: %s!",
|
Log(LOG_ERR, "Can't drop supplementary group IDs: %s!",
|
||||||
@@ -731,6 +732,10 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
|
|||||||
if (real_errno != EPERM)
|
if (real_errno != EPERM)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
Log(LOG_WARNING,
|
||||||
|
"Can't drop supplementary group IDs: setgroups(3) missing!");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
* Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -176,6 +176,7 @@ Synchronize_Lists(CLIENT * Client)
|
|||||||
CHANNEL *c;
|
CHANNEL *c;
|
||||||
struct list_head *head;
|
struct list_head *head;
|
||||||
struct list_elem *elem;
|
struct list_elem *elem;
|
||||||
|
time_t t;
|
||||||
|
|
||||||
assert(Client != NULL);
|
assert(Client != NULL);
|
||||||
|
|
||||||
@@ -183,9 +184,10 @@ Synchronize_Lists(CLIENT * Client)
|
|||||||
head = Class_GetList(CLASS_GLINE);
|
head = Class_GetList(CLASS_GLINE);
|
||||||
elem = Lists_GetFirst(head);
|
elem = Lists_GetFirst(head);
|
||||||
while (elem) {
|
while (elem) {
|
||||||
|
t = Lists_GetValidity(elem) - time(NULL);
|
||||||
if (!IRC_WriteStrClient(Client, "GLINE %s %ld :%s",
|
if (!IRC_WriteStrClient(Client, "GLINE %s %ld :%s",
|
||||||
Lists_GetMask(elem),
|
Lists_GetMask(elem),
|
||||||
Lists_GetValidity(elem) - time(NULL),
|
t > 0 ? (long)t : 0,
|
||||||
Lists_GetReason(elem)))
|
Lists_GetReason(elem)))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
elem = Lists_GetNext(elem);
|
elem = Lists_GetNext(elem);
|
||||||
|
|||||||
@@ -40,12 +40,14 @@ Op_NoPrivileges(CLIENT * Client, REQUEST * Req)
|
|||||||
from = Client_Search(Req->prefix);
|
from = Client_Search(Req->prefix);
|
||||||
|
|
||||||
if (from) {
|
if (from) {
|
||||||
Log(LOG_NOTICE, "No privileges: client \"%s\" (%s), command \"%s\"!",
|
Log(LOG_ERR|LOG_snotice,
|
||||||
|
"No privileges: client \"%s\" (%s), command \"%s\"!",
|
||||||
Req->prefix, Client_Mask(Client), Req->command);
|
Req->prefix, Client_Mask(Client), Req->command);
|
||||||
return IRC_WriteErrClient(from, ERR_NOPRIVILEGES_MSG,
|
return IRC_WriteErrClient(from, ERR_NOPRIVILEGES_MSG,
|
||||||
Client_ID(from));
|
Client_ID(from));
|
||||||
} else {
|
} else {
|
||||||
Log(LOG_NOTICE, "No privileges: client \"%s\", command \"%s\"!",
|
Log(LOG_ERR|LOG_snotice,
|
||||||
|
"No privileges: client \"%s\", command \"%s\"!",
|
||||||
Client_Mask(Client), Req->command);
|
Client_Mask(Client), Req->command);
|
||||||
return IRC_WriteErrClient(Client, ERR_NOPRIVILEGES_MSG,
|
return IRC_WriteErrClient(Client, ERR_NOPRIVILEGES_MSG,
|
||||||
Client_ID(Client));
|
Client_ID(Client));
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "conn.h"
|
#include "conn.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
#include "conf.h"
|
||||||
|
|
||||||
#include "pam.h"
|
#include "pam.h"
|
||||||
|
|
||||||
@@ -101,7 +102,7 @@ PAM_Authenticate(CLIENT *Client) {
|
|||||||
conv.appdata_ptr = Conn_Password(Client_Conn(Client));
|
conv.appdata_ptr = Conn_Password(Client_Conn(Client));
|
||||||
|
|
||||||
/* Initialize PAM */
|
/* Initialize PAM */
|
||||||
retval = pam_start("ngircd", Client_OrigUser(Client), &conv, &pam);
|
retval = pam_start(Conf_PAMServiceName, Client_OrigUser(Client), &conv, &pam);
|
||||||
if (retval != PAM_SUCCESS) {
|
if (retval != PAM_SUCCESS) {
|
||||||
Log(LOG_ERR, "PAM: Failed to create authenticator! (%d)", retval);
|
Log(LOG_ERR, "PAM: Failed to create authenticator! (%d)", retval);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
* Copyright (c)2001-2018 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -70,7 +70,7 @@ static COMMAND My_Commands[] =
|
|||||||
_CMD("GLINE", IRC_xLINE, CLIENT_USER|CLIENT_SERVER, 0, -1, 0),
|
_CMD("GLINE", IRC_xLINE, CLIENT_USER|CLIENT_SERVER, 0, -1, 0),
|
||||||
_CMD("HELP", IRC_HELP, CLIENT_USER, 0, 1, 2),
|
_CMD("HELP", IRC_HELP, CLIENT_USER, 0, 1, 2),
|
||||||
_CMD("INFO", IRC_INFO, CLIENT_USER|CLIENT_SERVER, 0, 1, 2),
|
_CMD("INFO", IRC_INFO, CLIENT_USER|CLIENT_SERVER, 0, 1, 2),
|
||||||
_CMD("INVITE", IRC_INVITE, CLIENT_USER|CLIENT_SERVER, 2, 2, 0),
|
_CMD("INVITE", IRC_INVITE, CLIENT_USER|CLIENT_SERVER, 2, 2, 1),
|
||||||
_CMD("ISON", IRC_ISON, CLIENT_USER, 1, -1, 0),
|
_CMD("ISON", IRC_ISON, CLIENT_USER, 1, -1, 0),
|
||||||
_CMD("JOIN", IRC_JOIN, CLIENT_USER|CLIENT_SERVER, 1, 2, 0),
|
_CMD("JOIN", IRC_JOIN, CLIENT_USER|CLIENT_SERVER, 1, 2, 0),
|
||||||
_CMD("KICK", IRC_KICK, CLIENT_USER|CLIENT_SERVER, 2, 3, 0),
|
_CMD("KICK", IRC_KICK, CLIENT_USER|CLIENT_SERVER, 2, 3, 0),
|
||||||
@@ -156,7 +156,7 @@ Parse_GetCommandStruct( void )
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse a command ("request") received from a client.
|
* Parse a command ("request") received from a client.
|
||||||
*
|
*
|
||||||
* This function is called after the connection layer received a valid CR+LF
|
* This function is called after the connection layer received a valid CR+LF
|
||||||
* terminated line of text: we assume that this is a valid IRC command and
|
* terminated line of text: we assume that this is a valid IRC command and
|
||||||
* try to do something useful with it :-)
|
* try to do something useful with it :-)
|
||||||
@@ -169,8 +169,8 @@ Parse_GetCommandStruct( void )
|
|||||||
*
|
*
|
||||||
* @param Idx Index of the connection from which the command has been received.
|
* @param Idx Index of the connection from which the command has been received.
|
||||||
* @param Request NULL terminated line of text (the "command").
|
* @param Request NULL terminated line of text (the "command").
|
||||||
* @return true on success (valid command or "regular" error), false if a
|
* @return CONNECTED on success (valid command or "regular" error), DISCONNECTED
|
||||||
* fatal error occurred and the connection has been shut down.
|
* if a fatal error occurred and the connection has been shut down.
|
||||||
*/
|
*/
|
||||||
GLOBAL bool
|
GLOBAL bool
|
||||||
Parse_Request( CONN_ID Idx, char *Request )
|
Parse_Request( CONN_ID Idx, char *Request )
|
||||||
@@ -257,11 +257,14 @@ Parse_Request( CONN_ID Idx, char *Request )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! Validate_Prefix( Idx, &req, &closed )) return ! closed;
|
if(!Validate_Prefix(Idx, &req, &closed))
|
||||||
if( ! Validate_Command( Idx, &req, &closed )) return ! closed;
|
return !closed;
|
||||||
if( ! Validate_Args( Idx, &req, &closed )) return ! closed;
|
if(!Validate_Command(Idx, &req, &closed))
|
||||||
|
return !closed;
|
||||||
|
if(!Validate_Args(Idx, &req, &closed))
|
||||||
|
return !closed;
|
||||||
|
|
||||||
return Handle_Request( Idx, &req );
|
return Handle_Request(Idx, &req);
|
||||||
} /* Parse_Request */
|
} /* Parse_Request */
|
||||||
|
|
||||||
|
|
||||||
@@ -461,10 +464,10 @@ Handle_Numeric(CLIENT *client, REQUEST *Req)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Determine source */
|
/* Determine source */
|
||||||
if (! Req->prefix[0]) {
|
if (!Req->prefix) {
|
||||||
/* Oops, no prefix!? */
|
Log(LOG_WARNING,
|
||||||
Log(LOG_WARNING, "Got status code %s from \"%s\" without prefix!?",
|
"Got status code %s from \"%s\" without prefix!?",
|
||||||
Req->command, Client_ID(client));
|
Req->command, Client_ID(client));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -490,7 +493,7 @@ static bool
|
|||||||
Handle_Request( CONN_ID Idx, REQUEST *Req )
|
Handle_Request( CONN_ID Idx, REQUEST *Req )
|
||||||
{
|
{
|
||||||
CLIENT *client;
|
CLIENT *client;
|
||||||
bool result = true;
|
bool result = CONNECTED;
|
||||||
int client_type;
|
int client_type;
|
||||||
COMMAND *cmd;
|
COMMAND *cmd;
|
||||||
|
|
||||||
@@ -546,6 +549,8 @@ Handle_Request( CONN_ID Idx, REQUEST *Req )
|
|||||||
cmd->lcount++;
|
cmd->lcount++;
|
||||||
else
|
else
|
||||||
cmd->rcount++;
|
cmd->rcount++;
|
||||||
|
|
||||||
|
/* Return result of command (CONNECTED/DISCONNECTED). */
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -554,13 +559,13 @@ Handle_Request( CONN_ID Idx, REQUEST *Req )
|
|||||||
client_type != CLIENT_SERVICE )
|
client_type != CLIENT_SERVICE )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* Unknown command and registered connection: generate error: */
|
|
||||||
LogDebug("Connection %d: Unknown command \"%s\", %d %s,%s prefix.",
|
LogDebug("Connection %d: Unknown command \"%s\", %d %s,%s prefix.",
|
||||||
Client_Conn( client ), Req->command, Req->argc,
|
Client_Conn( client ), Req->command, Req->argc,
|
||||||
Req->argc == 1 ? "parameter" : "parameters",
|
Req->argc == 1 ? "parameter" : "parameters",
|
||||||
Req->prefix ? "" : " no" );
|
Req->prefix ? "" : " no" );
|
||||||
|
|
||||||
if (Client_Type(client) != CLIENT_SERVER)
|
/* Unknown command and registered connection: generate error: */
|
||||||
|
if (client_type != CLIENT_SERVER)
|
||||||
result = IRC_WriteErrClient(client, ERR_UNKNOWNCOMMAND_MSG,
|
result = IRC_WriteErrClient(client, ERR_UNKNOWNCOMMAND_MSG,
|
||||||
Client_ID(client), Req->command);
|
Client_ID(client), Req->command);
|
||||||
|
|
||||||
|
|||||||
@@ -108,9 +108,8 @@ Resolve_Name( PROC_STAT *s, const char *Host, void (*cbfunc)(int, short))
|
|||||||
return false;
|
return false;
|
||||||
} /* Resolve_Name */
|
} /* Resolve_Name */
|
||||||
|
|
||||||
|
#if !defined(HAVE_WORKING_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
|
||||||
#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
|
#ifdef h_errno
|
||||||
#if !defined(WANT_IPV6) && defined(h_errno)
|
|
||||||
static char *
|
static char *
|
||||||
Get_Error( int H_Error )
|
Get_Error( int H_Error )
|
||||||
{
|
{
|
||||||
@@ -233,7 +232,11 @@ ReverseLookup(const ng_ipaddr_t *IpAddr, char *resbuf, size_t reslen)
|
|||||||
* @return true if lookup successful, false if domain name not found
|
* @return true if lookup successful, false if domain name not found
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
|
#ifdef HAVE_WORKING_GETADDRINFO
|
||||||
ForwardLookup(const char *hostname, array *IpAddr, int af)
|
ForwardLookup(const char *hostname, array *IpAddr, int af)
|
||||||
|
#else
|
||||||
|
ForwardLookup(const char *hostname, array *IpAddr, UNUSED int af)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
ng_ipaddr_t addr;
|
ng_ipaddr_t addr;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
* Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -48,7 +48,11 @@ Dump_State(void)
|
|||||||
{
|
{
|
||||||
Log(LOG_DEBUG, "--- Internal server state: %s ---",
|
Log(LOG_DEBUG, "--- Internal server state: %s ---",
|
||||||
Client_ID(Client_ThisServer()));
|
Client_ID(Client_ThisServer()));
|
||||||
Log(LOG_DEBUG, "time()=%ld", time(NULL));
|
#ifdef HAVE_LONG_LONG
|
||||||
|
Log(LOG_DEBUG, "time()=%llu", (unsigned long long)time(NULL));
|
||||||
|
#else
|
||||||
|
Log(LOG_DEBUG, "time()=%lu", (unsigned long)time(NULL));
|
||||||
|
#endif
|
||||||
Conf_DebugDump();
|
Conf_DebugDump();
|
||||||
Conn_DebugDump();
|
Conn_DebugDump();
|
||||||
Client_DebugDump();
|
Client_DebugDump();
|
||||||
|
|||||||
3
src/portab/.gitignore
vendored
3
src/portab/.gitignore
vendored
@@ -1,3 +0,0 @@
|
|||||||
Makefile.am
|
|
||||||
portabtest
|
|
||||||
portabtest.exe
|
|
||||||
@@ -15,7 +15,13 @@ EXTRA_DIST = Makefile.ng
|
|||||||
|
|
||||||
noinst_LIBRARIES = libngportab.a
|
noinst_LIBRARIES = libngportab.a
|
||||||
|
|
||||||
libngportab_a_SOURCES = strdup.c strndup.c strlcpy.c strtok_r.c vsnprintf.c waitpid.c
|
libngportab_a_SOURCES = \
|
||||||
|
strdup.c \
|
||||||
|
strlcpy.c \
|
||||||
|
strndup.c \
|
||||||
|
strtok_r.c \
|
||||||
|
vsnprintf.c \
|
||||||
|
waitpid.c
|
||||||
|
|
||||||
check_PROGRAMS = portabtest
|
check_PROGRAMS = portabtest
|
||||||
|
|
||||||
|
|||||||
@@ -175,6 +175,10 @@ extern int vsnprintf PARAMS(( char *str, size_t count, const char *fmt, va_list
|
|||||||
# define PACKAGE_VERSION VERSION
|
# define PACKAGE_VERSION VERSION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef SYSCONFDIR
|
||||||
|
# define SYSCONFDIR "/etc"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* -eof- */
|
/* -eof- */
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ main(void)
|
|||||||
Check_strlcat();
|
Check_strlcat();
|
||||||
Check_strtok_r();
|
Check_strtok_r();
|
||||||
Check_vsnprintf(2+10, "%s%s", "ab", "1234567890");
|
Check_vsnprintf(2+10, "%s%s", "ab", "1234567890");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,9 +50,9 @@
|
|||||||
* original. Also, there is now a builtin-test, just compile with:
|
* original. Also, there is now a builtin-test, just compile with:
|
||||||
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
|
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
|
||||||
* and run snprintf for results.
|
* and run snprintf for results.
|
||||||
*
|
*
|
||||||
* Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
|
* Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
|
||||||
* The PGP code was using unsigned hexadecimal formats.
|
* The PGP code was using unsigned hexadecimal formats.
|
||||||
* Unfortunately, unsigned formats simply didn't work.
|
* Unfortunately, unsigned formats simply didn't work.
|
||||||
*
|
*
|
||||||
* Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
|
* Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
|
||||||
@@ -165,21 +165,21 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args)
|
|||||||
int flags;
|
int flags;
|
||||||
int cflags;
|
int cflags;
|
||||||
size_t currlen;
|
size_t currlen;
|
||||||
|
|
||||||
state = DP_S_DEFAULT;
|
state = DP_S_DEFAULT;
|
||||||
currlen = flags = cflags = min = 0;
|
currlen = flags = cflags = min = 0;
|
||||||
max = -1;
|
max = -1;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
|
|
||||||
while (state != DP_S_DONE) {
|
while (state != DP_S_DONE) {
|
||||||
if (ch == '\0')
|
if (ch == '\0')
|
||||||
state = DP_S_DONE;
|
state = DP_S_DONE;
|
||||||
|
|
||||||
switch(state) {
|
switch(state) {
|
||||||
case DP_S_DEFAULT:
|
case DP_S_DEFAULT:
|
||||||
if (ch == '%')
|
if (ch == '%')
|
||||||
state = DP_S_FLAGS;
|
state = DP_S_FLAGS;
|
||||||
else
|
else
|
||||||
dopr_outch (buffer, &currlen, maxlen, ch);
|
dopr_outch (buffer, &currlen, maxlen, ch);
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
break;
|
break;
|
||||||
@@ -226,7 +226,7 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args)
|
|||||||
if (ch == '.') {
|
if (ch == '.') {
|
||||||
state = DP_S_MAX;
|
state = DP_S_MAX;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
} else {
|
} else {
|
||||||
state = DP_S_MOD;
|
state = DP_S_MOD;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -271,7 +271,7 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args)
|
|||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'd':
|
case 'd':
|
||||||
case 'i':
|
case 'i':
|
||||||
if (cflags == DP_C_SHORT)
|
if (cflags == DP_C_SHORT)
|
||||||
value = va_arg (args, int);
|
value = va_arg (args, int);
|
||||||
else if (cflags == DP_C_LONG)
|
else if (cflags == DP_C_LONG)
|
||||||
value = va_arg (args, long int);
|
value = va_arg (args, long int);
|
||||||
@@ -401,12 +401,12 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (maxlen != 0) {
|
if (maxlen != 0) {
|
||||||
if (currlen < maxlen - 1)
|
if (currlen < maxlen - 1)
|
||||||
buffer[currlen] = '\0';
|
buffer[currlen] = '\0';
|
||||||
else if (maxlen > 0)
|
else if (maxlen > 0)
|
||||||
buffer[maxlen - 1] = '\0';
|
buffer[maxlen - 1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
return currlen;
|
return currlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -426,11 +426,11 @@ fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags,
|
|||||||
|
|
||||||
for (strln = 0; value[strln]; ++strln); /* strlen */
|
for (strln = 0; value[strln]; ++strln); /* strlen */
|
||||||
padlen = min - strln;
|
padlen = min - strln;
|
||||||
if (padlen < 0)
|
if (padlen < 0)
|
||||||
padlen = 0;
|
padlen = 0;
|
||||||
if (flags & DP_F_MINUS)
|
if (flags & DP_F_MINUS)
|
||||||
padlen = -padlen; /* Left Justify */
|
padlen = -padlen; /* Left Justify */
|
||||||
|
|
||||||
while ((padlen > 0) && (cnt < max)) {
|
while ((padlen > 0) && (cnt < max)) {
|
||||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
--padlen;
|
--padlen;
|
||||||
@@ -460,12 +460,12 @@ fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
|
|||||||
int spadlen = 0; /* amount to space pad */
|
int spadlen = 0; /* amount to space pad */
|
||||||
int zpadlen = 0; /* amount to zero pad */
|
int zpadlen = 0; /* amount to zero pad */
|
||||||
int caps = 0;
|
int caps = 0;
|
||||||
|
|
||||||
if (max < 0)
|
if (max < 0)
|
||||||
max = 0;
|
max = 0;
|
||||||
|
|
||||||
uvalue = value;
|
uvalue = value;
|
||||||
|
|
||||||
if(!(flags & DP_F_UNSIGNED)) {
|
if(!(flags & DP_F_UNSIGNED)) {
|
||||||
if( value < 0 ) {
|
if( value < 0 ) {
|
||||||
signvalue = '-';
|
signvalue = '-';
|
||||||
@@ -477,7 +477,7 @@ fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
|
|||||||
signvalue = ' ';
|
signvalue = ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
|
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@@ -497,7 +497,7 @@ fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
|
|||||||
zpadlen = MAX(zpadlen, spadlen);
|
zpadlen = MAX(zpadlen, spadlen);
|
||||||
spadlen = 0;
|
spadlen = 0;
|
||||||
}
|
}
|
||||||
if (flags & DP_F_MINUS)
|
if (flags & DP_F_MINUS)
|
||||||
spadlen = -spadlen; /* Left Justifty */
|
spadlen = -spadlen; /* Left Justifty */
|
||||||
|
|
||||||
#ifdef DEBUG_SNPRINTF
|
#ifdef DEBUG_SNPRINTF
|
||||||
@@ -512,7 +512,7 @@ fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Sign */
|
/* Sign */
|
||||||
if (signvalue)
|
if (signvalue)
|
||||||
dopr_outch (buffer, currlen, maxlen, signvalue);
|
dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||||
|
|
||||||
/* Zeros */
|
/* Zeros */
|
||||||
@@ -524,9 +524,9 @@ fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Digits */
|
/* Digits */
|
||||||
while (place > 0)
|
while (place > 0)
|
||||||
dopr_outch (buffer, currlen, maxlen, convert[--place]);
|
dopr_outch (buffer, currlen, maxlen, convert[--place]);
|
||||||
|
|
||||||
/* Left Justified spaces */
|
/* Left Justified spaces */
|
||||||
while (spadlen < 0) {
|
while (spadlen < 0) {
|
||||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
@@ -541,7 +541,7 @@ abs_val(LDOUBLE value)
|
|||||||
|
|
||||||
if (value < 0)
|
if (value < 0)
|
||||||
result = -value;
|
result = -value;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -549,12 +549,12 @@ static LDOUBLE
|
|||||||
POW10(int exp)
|
POW10(int exp)
|
||||||
{
|
{
|
||||||
LDOUBLE result = 1;
|
LDOUBLE result = 1;
|
||||||
|
|
||||||
while (exp) {
|
while (exp) {
|
||||||
result *= 10;
|
result *= 10;
|
||||||
exp--;
|
exp--;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,7 +566,7 @@ ROUND(LDOUBLE value)
|
|||||||
intpart = (LLONG)value;
|
intpart = (LLONG)value;
|
||||||
value = value - intpart;
|
value = value - intpart;
|
||||||
if (value >= 0.5) intpart++;
|
if (value >= 0.5) intpart++;
|
||||||
|
|
||||||
return intpart;
|
return intpart;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -600,7 +600,7 @@ my_modf(double x0, double *iptr)
|
|||||||
ret = my_modf(x0-l*f, &i2);
|
ret = my_modf(x0-l*f, &i2);
|
||||||
(*iptr) = l*f + i2;
|
(*iptr) = l*f + i2;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*iptr) = l;
|
(*iptr) = l;
|
||||||
return x - (*iptr);
|
return x - (*iptr);
|
||||||
@@ -618,14 +618,14 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
|
|||||||
int iplace = 0;
|
int iplace = 0;
|
||||||
int fplace = 0;
|
int fplace = 0;
|
||||||
int padlen = 0; /* amount to pad */
|
int padlen = 0; /* amount to pad */
|
||||||
int zpadlen = 0;
|
int zpadlen = 0;
|
||||||
int caps = 0;
|
int caps = 0;
|
||||||
int index;
|
int index;
|
||||||
double intpart;
|
double intpart;
|
||||||
double fracpart;
|
double fracpart;
|
||||||
double temp;
|
double temp;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* AIX manpage says the default is 0, but Solaris says the default
|
* AIX manpage says the default is 0, but Solaris says the default
|
||||||
* is 6, and sprintf on AIX defaults to 6
|
* is 6, and sprintf on AIX defaults to 6
|
||||||
*/
|
*/
|
||||||
@@ -645,8 +645,8 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sorry, we only support 16 digits past the decimal because of our
|
* Sorry, we only support 16 digits past the decimal because of our
|
||||||
* conversion method
|
* conversion method
|
||||||
*/
|
*/
|
||||||
if (max > 16)
|
if (max > 16)
|
||||||
@@ -660,7 +660,7 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
|
|||||||
my_modf(temp, &intpart);
|
my_modf(temp, &intpart);
|
||||||
|
|
||||||
fracpart = ROUND((POW10(max)) * (ufvalue - intpart));
|
fracpart = ROUND((POW10(max)) * (ufvalue - intpart));
|
||||||
|
|
||||||
if (fracpart >= POW10(max)) {
|
if (fracpart >= POW10(max)) {
|
||||||
intpart++;
|
intpart++;
|
||||||
fracpart -= POW10(max);
|
fracpart -= POW10(max);
|
||||||
@@ -697,16 +697,16 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
|
|||||||
if (fplace == 311) fplace--;
|
if (fplace == 311) fplace--;
|
||||||
}
|
}
|
||||||
fconvert[fplace] = 0;
|
fconvert[fplace] = 0;
|
||||||
|
|
||||||
/* -1 for decimal point, another -1 if we are printing a sign */
|
/* -1 for decimal point, another -1 if we are printing a sign */
|
||||||
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
|
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
|
||||||
zpadlen = max - fplace;
|
zpadlen = max - fplace;
|
||||||
if (zpadlen < 0) zpadlen = 0;
|
if (zpadlen < 0) zpadlen = 0;
|
||||||
if (padlen < 0)
|
if (padlen < 0)
|
||||||
padlen = 0;
|
padlen = 0;
|
||||||
if (flags & DP_F_MINUS)
|
if (flags & DP_F_MINUS)
|
||||||
padlen = -padlen; /* Left Justifty */
|
padlen = -padlen; /* Left Justifty */
|
||||||
|
|
||||||
if ((flags & DP_F_ZERO) && (padlen > 0)) {
|
if ((flags & DP_F_ZERO) && (padlen > 0)) {
|
||||||
if (signvalue) {
|
if (signvalue) {
|
||||||
dopr_outch (buffer, currlen, maxlen, signvalue);
|
dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||||
@@ -722,10 +722,10 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
|
|||||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
--padlen;
|
--padlen;
|
||||||
}
|
}
|
||||||
if (signvalue)
|
if (signvalue)
|
||||||
dopr_outch (buffer, currlen, maxlen, signvalue);
|
dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||||
|
|
||||||
while (iplace > 0)
|
while (iplace > 0)
|
||||||
dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
|
dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
|
||||||
|
|
||||||
#ifdef DEBUG_SNPRINTF
|
#ifdef DEBUG_SNPRINTF
|
||||||
@@ -738,11 +738,11 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
|
|||||||
*/
|
*/
|
||||||
if (max > 0) {
|
if (max > 0) {
|
||||||
dopr_outch (buffer, currlen, maxlen, '.');
|
dopr_outch (buffer, currlen, maxlen, '.');
|
||||||
|
|
||||||
while (fplace > 0)
|
while (fplace > 0)
|
||||||
dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
|
dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (zpadlen > 0) {
|
while (zpadlen > 0) {
|
||||||
dopr_outch (buffer, currlen, maxlen, '0');
|
dopr_outch (buffer, currlen, maxlen, '0');
|
||||||
--zpadlen;
|
--zpadlen;
|
||||||
@@ -786,7 +786,7 @@ va_dcl
|
|||||||
{
|
{
|
||||||
size_t ret;
|
size_t ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
ret = vsnprintf(str, count, fmt, ap);
|
ret = vsnprintf(str, count, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|||||||
24
src/testsuite/.gitignore
vendored
24
src/testsuite/.gitignore
vendored
@@ -1,24 +0,0 @@
|
|||||||
Makefile.am
|
|
||||||
T-ngircd1
|
|
||||||
T-ngircd1.exe
|
|
||||||
T-ngircd2
|
|
||||||
T-ngircd2.exe
|
|
||||||
channel-test
|
|
||||||
connect-test
|
|
||||||
invite-test
|
|
||||||
join-test
|
|
||||||
kick-test
|
|
||||||
message-test
|
|
||||||
misc-test
|
|
||||||
mode-test
|
|
||||||
opless-channel-test
|
|
||||||
server-link-test
|
|
||||||
who-test
|
|
||||||
whois-test
|
|
||||||
ngircd-test1.log
|
|
||||||
ngircd-test2.log
|
|
||||||
ngircd-test1.motd
|
|
||||||
ngircd-test2.motd
|
|
||||||
logs
|
|
||||||
tests
|
|
||||||
tests-skipped.lst
|
|
||||||
@@ -21,6 +21,7 @@ EXTRA_DIST = \
|
|||||||
join-test.e kick-test.e message-test.e misc-test.e mode-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 \
|
opless-channel-test.e server-link-test.e who-test.e whois-test.e \
|
||||||
stress-A.e stress-B.e \
|
stress-A.e stress-B.e \
|
||||||
|
server-login-test.e \
|
||||||
start-server1 stop-server1 ngircd-test1.conf \
|
start-server1 stop-server1 ngircd-test1.conf \
|
||||||
start-server2 stop-server2 ngircd-test2.conf
|
start-server2 stop-server2 ngircd-test2.conf
|
||||||
|
|
||||||
@@ -81,6 +82,10 @@ server-link-test: tests.sh
|
|||||||
rm -f server-link-test
|
rm -f server-link-test
|
||||||
ln -s $(srcdir)/tests.sh 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
|
who-test: tests.sh
|
||||||
rm -f who-test
|
rm -f who-test
|
||||||
ln -s $(srcdir)/tests.sh who-test
|
ln -s $(srcdir)/tests.sh who-test
|
||||||
@@ -103,6 +108,7 @@ TESTS = start-server1 \
|
|||||||
who-test \
|
who-test \
|
||||||
whois-test \
|
whois-test \
|
||||||
server-link-test \
|
server-link-test \
|
||||||
|
server-login-test \
|
||||||
stop-server2 \
|
stop-server2 \
|
||||||
stress-server.sh \
|
stress-server.sh \
|
||||||
stop-server1
|
stop-server1
|
||||||
|
|||||||
@@ -35,13 +35,24 @@ expect {
|
|||||||
send "privmsg nick,nick :test\r"
|
send "privmsg nick,nick :test\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"@* PRIVMSG nick :test\r*@* PRIVMSG nick :test"
|
"@* 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"
|
send "privmsg Nick,#testChannel,nick :test\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"@* PRIVMSG nick :test\r*401*@* PRIVMSG nick :test"
|
"@* PRIVMSG nick :test\r*401"
|
||||||
}
|
}
|
||||||
|
|
||||||
send "privmsg doesnotexist :test\r"
|
send "privmsg doesnotexist :test\r"
|
||||||
|
|||||||
@@ -29,6 +29,11 @@
|
|||||||
MyPassword = pwd1
|
MyPassword = pwd1
|
||||||
PeerPassword = pwd2
|
PeerPassword = pwd2
|
||||||
|
|
||||||
|
[Server]
|
||||||
|
Name = ngircd.test.server3
|
||||||
|
MyPassword = pwd1
|
||||||
|
PeerPassword = pwd3
|
||||||
|
|
||||||
[Channel]
|
[Channel]
|
||||||
Name = InviteChannel
|
Name = InviteChannel
|
||||||
Modes = i
|
Modes = i
|
||||||
|
|||||||
94
src/testsuite/server-login-test.e
Normal file
94
src/testsuite/server-login-test.e
Normal file
@@ -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 +Plk 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"
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user