1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-07-04 10:52:50 +00:00

Compare commits

..

No commits in common. "master" and "rel-27-rc1" have entirely different histories.

20 changed files with 52 additions and 157 deletions

View File

@ -28,53 +28,32 @@ on:
jobs: jobs:
build_and_distcheck: build_and_distcheck:
name: build+test
strategy: name: Configure ngIRCd sources and run make targets "all" and "distcheck"
matrix: runs-on: ubuntu-latest
os: timeout-minutes: 10
- ubuntu
- macos
toolchain:
- gcc
- llvm
include:
- os: ubuntu
toolchain: gcc
install_cmd: |
sudo apt update
sudo apt install build-essential expect libident-dev libpam0g-dev libssl-dev libwrap0-dev pkg-config telnet zlib1g-dev gcc
configure_cmd: |
./configure CC=gcc --enable-ipv6 --with-iconv --with-ident --with-openssl --with-pam --with-tcp-wrappers --with-zlib
- os: ubuntu
toolchain: llvm
install_cmd: |
sudo apt update
sudo apt install build-essential expect libident-dev libpam0g-dev libssl-dev libwrap0-dev pkg-config telnet zlib1g-dev clang
configure_cmd: |
./configure CC=clang --enable-ipv6 --with-iconv --with-ident --with-openssl --with-pam --with-tcp-wrappers --with-zlib
- os: macos
toolchain: gcc
install_cmd: |
brew update
brew install autoconf automake expect openssl@3 pkg-config telnet zlib gcc
configure_cmd: |
./configure CC=gcc --enable-ipv6 --with-iconv --with-openssl --with-zlib
- os: macos
toolchain: llvm
install_cmd: |
brew update
brew install autoconf automake expect openssl@3 pkg-config telnet zlib llvm
configure_cmd: |
./configure CC=clang --enable-ipv6 --with-iconv --with-openssl --with-zlib
runs-on: ${{ matrix.os }}-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install dependencies - uses: awalsh128/cache-apt-pkgs-action@v1
run: ${{ matrix.install_cmd }} with:
packages: >
autoconf
automake
build-essential
expect
libident-dev
libpam0g-dev
libssl-dev
libwrap0-dev
pkg-config
telnet
zlib1g-dev
version: 1.0
- name: Generate build system files - name: Generate build system files
run: ./autogen.sh run: ./autogen.sh
- name: Configure the build system - name: Configure the build system
run: ${{ matrix.configure_cmd }} run: ./configure --enable-ipv6 --with-iconv --with-ident --with-openssl --with-pam --with-tcp-wrappers --with-zlib
- name: Build everything - name: Build everything
run: make all run: make all
- name: Create distribution archive and run tests - name: Create distribution archive and run tests

View File

@ -68,7 +68,6 @@ Or join the "#ngircd" channel in IRC on irc.barton.de:
- Tom Ryder <tom@sanctum.geek.nz> - Tom Ryder <tom@sanctum.geek.nz>
- Unit 193 <unit193@ubuntu.com> - Unit 193 <unit193@ubuntu.com>
- Valentin Lorentz <progval+git@progval.net> - Valentin Lorentz <progval+git@progval.net>
- Val Lorentz <progval+git@progval.net>
- William Pitcock <nenolod@dereferenced.org> - William Pitcock <nenolod@dereferenced.org>
- Windree <57554809+Windree@users.noreply.github.com> - Windree <57554809+Windree@users.noreply.github.com>
- xnaas <8271327+xnaas@users.noreply.github.com> - xnaas <8271327+xnaas@users.noreply.github.com>

View File

@ -8,25 +8,7 @@
-- ChangeLog -- -- ChangeLog --
ngIRCd 27 (2024-04-26) ngIRCd 27
- Update ChangeLog, NEWS, AUTHORS.md & doc/Platforms.txt for ngIRCd 27.
- Clarify in the sample configuration file and the ngircd.conf(5) manual
page that the "CAFile" option is unset by default.
- Fix channel symbol returned in the RPL_NAMREPLY(353) numeric of NAMES
commands for secret (mode +s) channels: this should be "@", not "=".
Thanks Val Lorentz <progval+git@progval.net> for the patch!
Closes #313.
- Add an example filter file for "Fail2Ban": contrib/ngircd-fail2ban.conf.
- Don't abort startup when setgid/setuid() fails with EINVAL: Both setgid(2)
as well as setuid(2) can fail with EINVAL in addition to EPERM, their
manual pages state "EINVAL: The user/group ID specified in uid/gid is not
valid in this user namespace ". So not only treat EPERM as an "acceptable
error" and continue with logging the error, but do the same for EINVAL.
This was triggered by the Void Linux xbps-uunshare(1) tool used for
building "XBPS source packages" and reported by luca in #ngircd. Thanks!
- Test suite: Don't use "pgrep -u" when LOGNAME and USER are not set
Thanks for reporting this on IRC, luca!
ngIRCd 27~rc1 (2024-04-13) ngIRCd 27~rc1 (2024-04-13)
- Validate certificates on server links. Up to now, ngIRCd optionally used - Validate certificates on server links. Up to now, ngIRCd optionally used

4
NEWS
View File

@ -8,9 +8,7 @@
-- NEWS -- -- NEWS --
ngIRCd 27 (2024-04-26) ngIRCd 27
- Add an example filter file for "Fail2Ban": contrib/ngircd-fail2ban.conf.
ngIRCd 27~rc1 (2024-04-13) ngIRCd 27~rc1 (2024-04-13)
- Validate certificates on server links. Up to now, ngIRCd optionally used - Validate certificates on server links. Up to now, ngIRCd optionally used

View File

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

View File

@ -53,11 +53,6 @@ execute_after_dh_auto_install:
$(CURDIR)/contrib/ngircd.logcheck \ $(CURDIR)/contrib/ngircd.logcheck \
$(CURDIR)/debian/ngircd/etc/logcheck/ignore.d.paranoid/ngircd $(CURDIR)/debian/ngircd/etc/logcheck/ignore.d.paranoid/ngircd
# Install the fail2ban configuration.
install -o root -g root -m 0644 -D \
$(CURDIR)/contrib/ngircd-fail2ban.conf \
$(CURDIR)/debian/ngircd/etc/fail2ban/filter.d/ngircd.conf
# Make lintian happy :-) # Make lintian happy :-)
rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING
mv $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/ChangeLog \ mv $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/ChangeLog \

View File

@ -17,7 +17,6 @@ EXTRA_DIST = README.md \
Dockerfile \ Dockerfile \
ngindent.sh \ ngindent.sh \
ngircd-bsd.sh \ ngircd-bsd.sh \
ngircd-fail2ban.conf \
ngIRCd-Logo.gif \ ngIRCd-Logo.gif \
ngircd-redhat.init \ ngircd-redhat.init \
ngircd.logcheck \ ngircd.logcheck \

View File

@ -16,8 +16,6 @@ This `contrib/` directory contains the following sub-folders and files:
- `ngircd-bsd.sh`: Start/stop script for FreeBSD. - `ngircd-bsd.sh`: Start/stop script for FreeBSD.
- `ngircd-fail2ban.conf`: fail2ban(1) filter configuration for ngIRCd.
- `ngircd-redhat.init`: Start/stop script for old(er) RedHat-based - `ngircd-redhat.init`: Start/stop script for old(er) RedHat-based
distributions (like CentOS and Fedora), which did _not_ use systemd(8). distributions (like CentOS and Fedora), which did _not_ use systemd(8).

View File

@ -24,7 +24,6 @@
</provides> </provides>
<launchable type="service">ngircd</launchable> <launchable type="service">ngircd</launchable>
<releases> <releases>
<release version="27" date="2024-04-26" />
<release version="27~rc1" date="2024-04-13" /> <release version="27~rc1" date="2024-04-13" />
<release version="26.1" date="2021-01-02" /> <release version="26.1" date="2021-01-02" />
<release version="26" date="2020-06-20" /> <release version="26" date="2020-06-20" />

View File

@ -1,25 +0,0 @@
# Fail2ban filter for ngIRCd
#
# Put into /etc/fail2ban/filter.d/ngircd.conf and enable in your jail.local
# configuration like this:
#
# [ngircd]
# enabled = true
# backend = systemd
#
[INCLUDES]
before = common.conf
[DEFAULT]
_daemon = ngircd
[Definition]
failregex = ^%(__prefix_line)sRefused connection from <ADDR> on socket \d+:
[Init]
journalmatch = _SYSTEMD_UNIT=ngircd.service + _COMM=ngircd

View File

@ -1,5 +1,5 @@
%define name ngircd %define name ngircd
%define version 27 %define version 27~rc1
%define release 1 %define release 1
%define prefix %{_prefix} %define prefix %{_prefix}

View File

@ -2,7 +2,7 @@
ngIRCd - Next Generation IRC Server ngIRCd - Next Generation IRC Server
http://ngircd.barton.de/ http://ngircd.barton.de/
(c)2001-2024 Alexander Barton and Contributors. (c)2001-2020 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.
@ -27,8 +27,7 @@ for inclusion here. Thanks for your help!
Platform Compiler ngIRCd Date Tester C M T R * Platform Compiler ngIRCd Date Tester C M T R *
--------------------------- ------------ ---------- -------- -------- - - - - - --------------------------- ------------ ---------- -------- -------- - - - - -
aarch64/apple/darwin A-clang 12.0 26 20-12-10 goetz N Y Y Y 3 aarch64/apple/darwin A-clang 12.0 26 20-12-10 goetz N Y Y Y 3
aarch64/apple/darwin23.4.0 A-clang 15.0 27~rc1 24-04-13 alex Y Y Y Y 3 aarch64/apple/darwin23.4.0 A-clang 15.0 26.1~131 24-04-01 alex Y Y Y Y 3
aarch64/unknown/linux-gnu gcc 12.2.0 27~rc1 24-04-21 alex Y Y Y Y 1
alpha/unknown/netbsd3.0 gcc 3.3.3 CVSHEAD 06-05-07 fw Y Y Y Y 3 alpha/unknown/netbsd3.0 gcc 3.3.3 CVSHEAD 06-05-07 fw Y Y Y Y 3
armv6l/unk./linux-gnueabi gcc 4.7.2 20.2 13-03-08 goetz Y Y Y Y 5 armv6l/unk./linux-gnueabi gcc 4.7.2 20.2 13-03-08 goetz Y Y Y Y 5
armv6l/unk./linux-gnueabihf gcc 4.6.3 21~rc2 13-10-26 pi Y Y Y Y 5 armv6l/unk./linux-gnueabihf gcc 4.6.3 21~rc2 13-10-26 pi Y Y Y Y 5
@ -74,7 +73,7 @@ i686/pc/linux-gnu gcc 4.3.2 14.1 09-08-04 alex Y Y Y Y 1
i686/pc/minix gcc 4.4.6 21~rc2 13-10-27 alex Y Y N N i686/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.3 gcc 4.4.5 19 12-02-29 alex Y Y Y Y
i686/unknown/gnu0.5 gcc 4.9.1 22~rc1-3 14-10-11 alex Y Y Y Y i686/unknown/gnu0.5 gcc 4.9.1 22~rc1-3 14-10-11 alex Y Y Y Y
i686/unknown/gnu0.9 gcc 12.2.0 27~rc1 24-04-21 alex Y Y Y Y i686/unknown/gnu0.9 gcc 12.2.0 26.1~131-g 24-04-01 alex Y Y Y Y
i686/unkn./kfreebsd7.2-gnu gcc 4.3.4 15 09-12-02 alex Y Y Y Y 3 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
@ -108,7 +107,7 @@ x86_64/apple/darwin18.2.0 A-clang 10.0 25~rc1-11 19-01-23 alex Y Y Y Y 3
x86_64/apple/darwin19.4.0 A-clang 11.0 26~rc1 20-05-10 alex Y Y Y Y 3 x86_64/apple/darwin19.4.0 A-clang 11.0 26~rc1 20-05-10 alex Y Y Y Y 3
x86_64/apple/darwin19.6.0 A-clang 12.0 26 20-10-20 alex Y Y Y Y 3 x86_64/apple/darwin19.6.0 A-clang 12.0 26 20-10-20 alex Y Y Y Y 3
x86_64/apple/darwin20.1.0 A-clang 12.0 26 21-01-01 alex Y Y Y Y 3 x86_64/apple/darwin20.1.0 A-clang 12.0 26 21-01-01 alex Y Y Y Y 3
x86_64/apple/darwin23.4.0 A-clang 15.0 27~rc1 24-04-21 alex Y Y Y Y 3 x86_64/apple/darwin23.4.0 A-clang 15.0 26.1~133-g 24-04-03 alex Y Y Y Y 3
x86_64/unknown/dragonfly3.4 gcc 4.7.2 21 13-11-12 goetz Y Y N Y 3 x86_64/unknown/dragonfly3.4 gcc 4.7.2 21 13-11-12 goetz Y Y N Y 3
x86_64/unkn./freebsd8.1-gnu gcc 4.4.5 19 12-02-26 alex Y Y Y Y 3 x86_64/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/freebsd8.4 gcc 4.2.1 24~rc1-7 17-01-20 alex Y Y Y Y 3
@ -116,12 +115,11 @@ x86_64/unknown/freebsd9.2 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y Y Y 3
x86_64/unknown/freebsd10.3 F-clang 3.4 24 17-01-20 goetz Y Y Y Y 3 x86_64/unknown/freebsd10.3 F-clang 3.4 24 17-01-20 goetz Y Y Y Y 3
x86_64/unknown/freebsd11.0 F-clang 3.8 24 17-01-21 goetz Y Y Y Y 3 x86_64/unknown/freebsd11.0 F-clang 3.8 24 17-01-21 goetz Y Y Y Y 3
x86_64/unknown/freebsd12.1 F-clang 8.0 26 20-08-28 alex Y Y Y Y 3 x86_64/unknown/freebsd12.1 F-clang 8.0 26 20-08-28 alex Y Y Y Y 3
x86_64/unknown/freebsd14.0 F-clang 16.0 27~rc1 24-04-21 alex Y Y Y Y 3 x86_64/unknown/freebsd14.0 F-clang 16.0 26.1~131 24-04-01 alex Y Y Y Y 3
x86_64/unknown/haiku gcc 7.3.0 25~rc1-11 19-01-06 alex Y Y N Y x86_64/unknown/haiku gcc 7.3.0 25~rc1-11 19-01-06 alex Y Y N Y
x86_64/unknown/haiku gcc 13.2.0 27~rc1 24-04-21 user Y Y Y Y x86_64/unknown/haiku gcc 13.2.0 26.1~132-g 24-04-02 alex Y Y Y Y
x86_64/unknown/linux-gnu clang 3.3 21 14-01-07 alex Y Y Y Y 1 x86_64/unknown/linux-gnu clang 3.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/pc/linux-gnu D-clang 14.0 27~rc1 24-04-21 alex Y Y Y Y 1
x86_64/pc/linux-gnu gcc 4.4.5 24~rc1-7 17-01-20 alex Y Y Y Y 1 x86_64/pc/linux-gnu gcc 4.4.5 24~rc1-7 17-01-20 alex Y Y Y Y 1
x86_64/unknown/linux-gnu gcc 4.7.2 23~rc1-3 15-11-15 alex Y Y Y Y 1 x86_64/unknown/linux-gnu gcc 4.7.2 23~rc1-3 15-11-15 alex Y Y Y Y 1
x86_64/pc/linux-gnu gcc 4.8.4 24~rc1-7 17-01-20 alex Y Y Y Y 1 x86_64/pc/linux-gnu gcc 4.8.4 24~rc1-7 17-01-20 alex Y Y Y Y 1
@ -131,16 +129,14 @@ x86_64/pc/linux-gnu [WSL] gcc 5.4.0 24 18-03-07 goetz Y Y y Y 7
x86_64/pc/linux-gnu gcc 6.2.1 24~rc1-7 17-01-20 alex Y Y Y Y 1 x86_64/pc/linux-gnu gcc 6.2.1 24~rc1-7 17-01-20 alex Y Y Y Y 1
x86_64/pc/linux-gnu gcc 6.3.0 25~rc1-11 19-01-23 alex Y Y Y Y 1 x86_64/pc/linux-gnu gcc 6.3.0 25~rc1-11 19-01-23 alex Y Y Y Y 1
x86_64/pc/linux-gnu gcc 8.3.0 26 20-08-28 alex Y Y Y Y 1 x86_64/pc/linux-gnu gcc 8.3.0 26 20-08-28 alex Y Y Y Y 1
x86_64/pc/linux-gnu gcc 11.4.0 27~rc1 24-04-21 alex Y Y Y Y 1 x86_64/pc/linux-gnu gcc 11.4.0 26.1~133-g 24-04-03 alex Y Y Y Y 1
x86_64/pc/linux-gnu gcc 12.2.0 27~rc1 24-04-21 alex Y Y Y Y 1 x86_64/pc/linux-gnu gcc 12.2.0 26.1~132-g 24-04-02 alex Y Y Y Y 1
x86_64/pc/linux-gnu gcc 13.2.1 27~rc1 24-04-21 alex Y Y Y Y 1
x86_64/pc/solaris2.11 gcc 10.3.0 27~rc1 24-04-26 alex Y Y y Y 5
x86_64/unknown/linux-gnu icc 16 23 16-01-13 goetz Y Y Y Y 1 x86_64/unknown/linux-gnu 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/netbsd9.0 gcc 7.4.0 26 20-08-28 alex Y Y y Y 3 x86_64/unknown/netbsd9.0 gcc 7.4.0 26 20-08-28 alex Y Y y Y 3
x86_64/unknown/netbsd10.0 gcc 10.5.0 27~rc1 24-04-21 alex Y Y Y Y 3 x86_64/unknown/netbsd10.0 gcc 10.5.0 26.1~131-g 24-04-01 alex Y Y Y Y 3
x86_64/unknown/openbsd4.7 gcc 3.3.5 20~rc1 12-02-26 alex Y Y Y Y 3 x86_64/unknown/openbsd4.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
@ -148,7 +144,7 @@ x86_64/unknown/openbsd5.5 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y Y Y 3
x86_64/unknown/openbsd6.6 gcc 4.2.1 26 20-08-28 alex Y Y Y Y 3 x86_64/unknown/openbsd6.6 gcc 4.2.1 26 20-08-28 alex Y Y Y Y 3
x86_64/unknown/openbsd6.6 O-clang 8.0 26 20-08-28 alex Y Y Y Y 3 x86_64/unknown/openbsd6.6 O-clang 8.0 26 20-08-28 alex Y Y Y Y 3
x86_64/unknown/openbsd6.7 gcc 4.2.1 26 20-09-26 goetz Y Y y Y 3 x86_64/unknown/openbsd6.7 gcc 4.2.1 26 20-09-26 goetz Y Y y Y 3
x86_64/unknown/openbsd7.4 O-clang 13.0 27~rc1 24-04-21 alex Y Y Y Y 3 x86_64/unknown/openbsd7.4 O-clang 13.0 26.1~131-g 24-04-01 alex Y Y Y Y 3
* Notes * Notes

View File

@ -273,8 +273,7 @@
# is only available when ngIRCd is compiled with support for SSL! # is only available when ngIRCd is compiled with support for SSL!
# So don't forget to remove the ";" above if this is the case ... # So don't forget to remove the ";" above if this is the case ...
# SSL Trusted CA Certificates File for verifying peer certificates. # SSL Trusted CA Certificates File (for verifying peer certificates)
# (Default: not set; so no certificates are trusted)
;CAFile = /etc/ssl/CA/cacert.pem ;CAFile = /etc/ssl/CA/cacert.pem
# Certificate Revocation File (for marking otherwise valid # Certificate Revocation File (for marking otherwise valid

View File

@ -399,7 +399,7 @@ when it is compiled with support for SSL using OpenSSL or GnuTLS!
.TP .TP
\fBCAFile\fR (string) \fBCAFile\fR (string)
Filename pointing to the Trusted CA Certificates. This is required for Filename pointing to the Trusted CA Certificates. This is required for
verifying peer certificates. Default: not set, so no certificates are trusted. verifying peer certificates.
.TP .TP
\fBCertFile\fR (string) \fBCertFile\fR (string)
SSL Certificate file of the private server key. SSL Certificate file of the private server key.

View File

@ -796,10 +796,10 @@ Conn_Handler(void)
/* Send the current status to the service manager. */ /* Send the current status to the service manager. */
snprintf(status, sizeof(status), snprintf(status, sizeof(status),
"WATCHDOG=1\nSTATUS=%ld connection%s established (%ld user%s, %ld server%s), %ld maximum. %ld accepted in total.\n", "WATCHDOG=1\nSTATUS=%ld connection%s established (%ld user%s, %ld server%s), %ld maximum. %ld accepted in total.\n",
(long)NumConnections, NumConnections == 1 ? "" : "s", NumConnections, NumConnections == 1 ? "" : "s",
Client_MyUserCount(), Client_MyUserCount() == 1 ? "" : "s", Client_MyUserCount(), Client_MyUserCount() == 1 ? "" : "s",
Client_MyServerCount(), Client_MyServerCount() == 1 ? "" : "s", Client_MyServerCount(), Client_MyServerCount() == 1 ? "" : "s",
(long)NumConnectionsMax, (long)NumConnectionsAccepted); NumConnectionsMax, NumConnectionsAccepted);
Signal_NotifySvcMgr(status); Signal_NotifySvcMgr(status);
notify_t = t; notify_t = t;
} }

View File

@ -818,7 +818,7 @@ IRC_NAMES( CLIENT *Client, REQUEST *Req )
/* Now print all clients which are not in any channel */ /* Now print all clients which are not in any channel */
c = Client_First(); c = Client_First();
snprintf(rpl, sizeof(rpl), RPL_NAMREPLY_MSG, Client_ID(from), '*', "*"); snprintf(rpl, sizeof(rpl), RPL_NAMREPLY_MSG, Client_ID(from), "*", "*");
while (c) { while (c) {
if (Client_Type(c) == CLIENT_USER if (Client_Type(c) == CLIENT_USER
&& Channel_FirstChannelOf(c) == NULL && Channel_FirstChannelOf(c) == NULL
@ -830,11 +830,11 @@ IRC_NAMES( CLIENT *Client, REQUEST *Req )
strlcat(rpl, Client_ID(c), sizeof(rpl)); strlcat(rpl, Client_ID(c), sizeof(rpl));
if (strlen(rpl) > COMMAND_LEN - CLIENT_NICK_LEN - 4) { if (strlen(rpl) > COMMAND_LEN - CLIENT_NICK_LEN - 4) {
/* Line is going too long, send now */ /* Line is gwoing too long, send now */
if (!IRC_WriteStrClient(from, "%s", rpl)) if (!IRC_WriteStrClient(from, "%s", rpl))
return DISCONNECTED; return DISCONNECTED;
snprintf(rpl, sizeof(rpl), RPL_NAMREPLY_MSG, snprintf(rpl, sizeof(rpl), RPL_NAMREPLY_MSG,
Client_ID(from), '*', "*"); Client_ID(from), "*", "*");
} }
} }
c = Client_Next(c); c = Client_Next(c);
@ -1500,8 +1500,6 @@ IRC_Send_NAMES(CLIENT * Client, CHANNEL * Chan)
char str[COMMAND_LEN]; char str[COMMAND_LEN];
CL2CHAN *cl2chan; CL2CHAN *cl2chan;
CLIENT *cl; CLIENT *cl;
bool secret_channel;
char chan_symbol;
assert(Client != NULL); assert(Client != NULL);
assert(Chan != NULL); assert(Chan != NULL);
@ -1516,13 +1514,10 @@ IRC_Send_NAMES(CLIENT * Client, CHANNEL * Chan)
return CONNECTED; return CONNECTED;
/* Secret channel? */ /* Secret channel? */
secret_channel = Channel_HasMode(Chan, 's'); if (!is_member && Channel_HasMode(Chan, 's'))
if (!is_member && secret_channel)
return CONNECTED; return CONNECTED;
chan_symbol = secret_channel ? '@' : '='; snprintf(str, sizeof(str), RPL_NAMREPLY_MSG, Client_ID(Client), "=",
snprintf(str, sizeof(str), RPL_NAMREPLY_MSG, Client_ID(Client), chan_symbol,
Channel_Name(Chan)); Channel_Name(Chan));
cl2chan = Channel_FirstMember(Chan); cl2chan = Channel_FirstMember(Chan);
while (cl2chan) { while (cl2chan) {
@ -1545,7 +1540,7 @@ IRC_Send_NAMES(CLIENT * Client, CHANNEL * Chan)
if (!IRC_WriteStrClient(Client, "%s", str)) if (!IRC_WriteStrClient(Client, "%s", str))
return DISCONNECTED; return DISCONNECTED;
snprintf(str, sizeof(str), RPL_NAMREPLY_MSG, snprintf(str, sizeof(str), RPL_NAMREPLY_MSG,
Client_ID(Client), chan_symbol, Client_ID(Client), "=",
Channel_Name(Chan)); Channel_Name(Chan));
} }
} }

View File

@ -62,7 +62,6 @@ IRC_MODE( CLIENT *Client, REQUEST *Req )
{ {
CLIENT *cl, *origin; CLIENT *cl, *origin;
CHANNEL *chan; CHANNEL *chan;
bool is_valid_nick, is_valid_chan;
assert(Client != NULL); assert(Client != NULL);
assert(Req != NULL); assert(Req != NULL);
@ -77,12 +76,10 @@ IRC_MODE( CLIENT *Client, REQUEST *Req )
Client = Client_Search(Req->prefix); Client = Client_Search(Req->prefix);
/* Channel or user mode? */ /* Channel or user mode? */
is_valid_nick = Client_IsValidNick(Req->argv[0]);
is_valid_chan = Channel_IsValidName(Req->argv[0]);
cl = NULL; chan = NULL; cl = NULL; chan = NULL;
if (is_valid_nick) if (Client_IsValidNick(Req->argv[0]))
cl = Client_Search(Req->argv[0]); cl = Client_Search(Req->argv[0]);
if (is_valid_chan) if (Channel_IsValidName(Req->argv[0]))
chan = Channel_Search(Req->argv[0]); chan = Channel_Search(Req->argv[0]);
if (cl) if (cl)
@ -91,12 +88,8 @@ IRC_MODE( CLIENT *Client, REQUEST *Req )
return Channel_Mode(Client, Req, origin, chan); return Channel_Mode(Client, Req, origin, chan);
/* No target found! */ /* No target found! */
if (is_valid_nick)
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG, return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG,
Client_ID(Client), Req->argv[0]); Client_ID(Client), Req->argv[0]);
else
return IRC_WriteErrClient(Client, ERR_NOSUCHCHANNEL_MSG,
Client_ID(Client), Req->argv[0]);
} /* IRC_MODE */ } /* IRC_MODE */
/** /**

View File

@ -84,7 +84,7 @@
#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"
#define RPL_NAMREPLY_MSG "353 %s %c %s :" #define RPL_NAMREPLY_MSG "353 %s %s %s :"
#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"

View File

@ -722,7 +722,7 @@ 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 && real_errno != EINVAL) if (real_errno != EPERM)
goto out; goto out;
} }
#ifdef HAVE_SETGROUPS #ifdef HAVE_SETGROUPS
@ -748,7 +748,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
Log(LOG_ERR, "Can't change user ID to %s(%u): %s!", Log(LOG_ERR, "Can't change user ID to %s(%u): %s!",
pwd ? pwd->pw_name : "?", Conf_UID, pwd ? pwd->pw_name : "?", Conf_UID,
strerror(real_errno)); strerror(real_errno));
if (real_errno != EPERM && real_errno != EINVAL) if (real_errno != EPERM)
goto out; goto out;
} }
} }

View File

@ -23,13 +23,7 @@ if [ -x /usr/bin/pgrep ]; then
*) *)
PGREP_FLAGS="" PGREP_FLAGS=""
esac esac
if [ -n "${LOGNAME:-}" ] || [ -n "${USER:-}" ]; then
# Try to narrow the search down to the current user ...
exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1" exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1"
else
# ... but neither LOGNAME nor USER were set!
exec /usr/bin/pgrep $PGREP_FLAGS -n "$1"
fi
fi fi
# pidof(1) could be a good alternative on elder Linux systems # pidof(1) could be a good alternative on elder Linux systems