Module: ngircd.git
Branch: master
Commit: 565523cbb4a5e2f34d584002916faba411a94187
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=565523cb…
Author: Alexander Barton <alex(a)barton.de>
Date: Mon Jan 2 15:23:17 2012 +0100
Don't stop join handling on faulty channel, skip it
When JOIN is received with more than one channel name, don't stop
processing on the first error (e.g. bad name, wrong channel key, ...)
but report an error and continue with the other given channel names.
Reported by Cahata -- thanks!
---
src/ngircd/irc-channel.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c
index a41f1d4..6ddad88 100644
--- a/src/ngircd/irc-channel.c
+++ b/src/ngircd/irc-channel.c
@@ -401,7 +401,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
/* Join channel (and create channel if it doesn't exist) */
if (!Channel_Join(target, channame))
- break;
+ goto join_next;
if (!chan) { /* channel is new; it has been created above */
chan = Channel_Search(channame);
@@ -420,6 +420,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
if (!join_send_topic(Client, target, chan, channame))
break; /* write error */
+ join_next:
/* next channel? */
channame = strtok_r(NULL, ",", &lastchan);
if (channame && key)
Module: ngircd.git
Branch: master
Commit: 70eb8219f526a7c3cbcab54e97733572ac16e50d
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=70eb8219…
Author: Alexander Barton <alex(a)barton.de>
Date: Sun Jan 1 23:14:28 2012 +0100
Update NEWS and ChangeLog for next ngIRCd release
---
ChangeLog | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
NEWS | 44 ++++++++++++++++++++++++++++++++++++
2 files changed, 117 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ae2abe2..e7cbcdd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,79 @@
-- ChangeLog --
+ngIRCd Release 19
+
+ - New configuration option "PAMIsOptional": when set, clients not
+ sending a password are still allowed to connect: they won't become
+ "identified" and keep the "~" character prepended to their supplied
+ user name. See "man 5 ngircd.conf" for details.
+ - Fixed handling of WHO commands. This fixes two bugs: "WHO <nick>"
+ returned nothing at all if the user was "+i" (reported by Cahata,
+ thanks) and "WHO <nick|nickmask>" returned channel names instead
+ of "*" when the user was member of a (visible) channel.
+ - Fixed some spelling errors in documentation and code comments
+ (Thanks to Christoph Biedl).
+ - contrib/Debian/control: Update and complete "Build-Depends" and
+ update our Debian package descriptions with "official" ones.
+ - Fixed typo in two error messages.
+ - LUSERS reply: only count channels that are visible to the requesting
+ client, so the existence of secret channels is no longer revealed by
+ using LUSERS. Reported by Cahata, thanks!
+ - Unknown user and channel modes no longer stop the mode parser, but
+ are simply ignored. Therefore modes after the unknown one are now
+ handled. This is how ircd2.10/ircd2.11/ircd-seven behave, at least.
+ Reported by Cahata, thanks!
+ - README: Update list of implemented commands.
+ - Log better error messages when rejecting clients.
+ - Implement IRC commands "GLINE" and "KLINE" to ban users. G-Lines are
+ synchronized between server on peering, K-Lines are local only.
+ - Xcode: update project file for Xcode 4.2 and define HAVE_GAI_STRERROR
+ for Mac OS X Xcode builds.
+ - ./configure: Fix logic and quoting of poll() detection code: only use
+ poll() when poll.h exists as well.
+ - Suppress 'Can't create pre-defined channel: invalid name: ""' message.
+ - whois-test: handle local hostname = "localhost.localdomain" using the
+ pattern "localhost*" for valid local hostnames.
+ - sample-ngircd.conf: show correct default for "PAM" variable: The
+ default of "PAM" is "yes" when ngIRCd has been configured to use it,
+ so show the correct default value in the sample configuration file.
+ (Closes #119)
+ - Update GPL 2 license text to current version.
+ - Only close "unrelated" sockets in forked child processes: This fixes
+ the problem that ngIRCd can't do any IDENT lookups because of the
+ socket has already been closed in the child process.
+ The bug has been introduced starting with ngIRCd 17 ... :-(
+ (commit ID 6ebb31ab35e)
+ - Added doc/Modes.txt: document modes supported by ngIRCd.
+ - Implement user mode "R": indicates that the nick name of this user
+ is "registered". This mode isn't handled by ngIRCd itself, but must
+ be set and unset by IRC services like Anope.
+ - Implement channel mode "R": only registered users (having the user
+ mode "R" set) are allowed to join this channel.
+ - Test suite: bind to loopback (127.0.0.1) interface only.
+ - New 2nd message "Nickname too long" for error code 432.
+ - Xcode: Mac OS X config.h: support 10.5 as well as 10.6/10.7 SDK.
+ - Xcode: exclude more Xcode 4 specific directories in ".gitignore".
+ - Disconnect directly linked servers sending QUIT. Without this,
+ the server becomes removed from the network and the client list,
+ but the connection isn't shut down at all ...
+ - contrib/ngindent: detect "gindent" as GNU indent.
+ - Handle unknown user and channel modes: these modes are saved and
+ forwarded to other servers, but ignored otherwise.
+ - Handle channel user modes 'a', 'h', and 'q' from remote servers.
+ These channel user modes aren't used for anything at the moment,
+ but ngIRCd knows that these three modes are "channel user modes"
+ and not "channel modes", that is that these modes take an "nick name"
+ argument. Like unknown user and channel modes, these modes are saved
+ and forwarded to other servers, but ignored otherwise.
+ - Correctly inform clients when other servers change their user modes.
+ This is required for some services to work correctly.
+ - Test suite: make getpid.sh work even when run as root.
+ - Spoofed prefixes: close connection on non-server links only.
+ On server-links, spoofed prefixes can happen because of the
+ asynchronous nature of the IRC protocol. So don't break server-
+ links, only log a message and ignore the command. (Closes #113)
+
ngIRCd Release 18 (2011-07-10)
- Update timestamp of ngircd(8) manual page.
diff --git a/NEWS b/NEWS
index 9365ec6..3a8d1c5 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,50 @@
-- NEWS --
+ngIRCd Release 19
+
+ - New configuration option "PAMIsOptional": when set, clients not
+ sending a password are still allowed to connect: they won't become
+ "identified" and keep the "~" character prepended to their supplied
+ user name. See "man 5 ngircd.conf" for details.
+ - Fixed handling of WHO commands. This fixes two bugs: "WHO <nick>"
+ returned nothing at all if the user was "+i" (reported by Cahata,
+ thanks) and "WHO <nick|nickmask>" returned channel names instead
+ of "*" when the user was member of a (visible) channel.
+ - LUSERS reply: only count channels that are visible to the requesting
+ client, so the existence of secret channels is no longer revealed by
+ using LUSERS. Reported by Cahata, thanks!
+ - Unknown user and channel modes no longer stop the mode parser, but
+ are simply ignored. Therefore modes after the unknown one are now
+ handled. This is how ircd2.10/ircd2.11/ircd-seven behave, at least.
+ Reported by Cahata, thanks!
+ - Implement IRC commands "GLINE" and "KLINE" to ban users. G-Lines are
+ synchronized between server on peering, K-Lines are local only.
+ - Xcode: update project file for Xcode 4.2.
+ - Only close "unrelated" sockets in forked child processes: This fixes
+ the problem that ngIRCd can't do any IDENT lookups because of the
+ socket has already been closed in the child process.
+ The bug has been introduced starting with ngIRCd 17 ... :-(
+ (commit ID 6ebb31ab35e)
+ - Added doc/Modes.txt: document modes supported by ngIRCd.
+ - Implement user mode "R": indicates that the nick name of this user
+ is "registered". This mode isn't handled by ngIRCd itself, but must
+ be set and unset by IRC services like Anope.
+ - Implement channel mode "R": only registered users (having the user
+ mode "R" set) are allowed to join this channel.
+ - Test suite: bind to loopback (127.0.0.1) interface only.
+ - Disconnect directly linked servers sending QUIT. Without this,
+ the server becomes removed from the network and the client list,
+ but the connection isn't shut down at all ...
+ - Handle unknown user and channel modes: these modes are saved and
+ forwarded to other servers, but ignored otherwise.
+ - Handle channel user modes 'a', 'h', and 'q' from remote servers.
+ These channel user modes aren't used for anything at the moment,
+ but ngIRCd knows that these three modes are "channel user modes"
+ and not "channel modes", that is that these modes take an "nick name"
+ argument. Like unknown user and channel modes, these modes are saved
+ and forwarded to other servers, but ignored otherwise.
+
ngIRCd Release 18 (2011-07-10)
- Add preliminary ngIRCd protocol module for Anope 1.9 to contrib/Anope/.
Module: ngircd.git
Branch: master
Commit: 9e5b9ddad03d77c036824bd17a133a2ad3b1e974
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=9e5b9dda…
Author: Alexander Barton <alex(a)barton.de>
Date: Sun Jan 1 17:39:07 2012 +0100
ngircd.conf.5: reword description of "Ports" variable
---
man/ngircd.conf.5.tmpl | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/man/ngircd.conf.5.tmpl b/man/ngircd.conf.5.tmpl
index 59d31a3..236883e 100644
--- a/man/ngircd.conf.5.tmpl
+++ b/man/ngircd.conf.5.tmpl
@@ -132,9 +132,8 @@ the pidfile resides in must be writable by the ngIRCd user and exist in the
chroot directory (if configured, see above).
.TP
\fBPorts\fR (list of numbers)
-Ports on which the server should listen. There may be more than one port,
-separated with commas (","). Default: 6667, unless \fBSSL_Ports\fR are also
-specified.
+Ports on which the server should listen for unencrypted connections. There
+may be more than one port, separated with commas (","). Default: 6667.
.TP
\fBServerGID\fR (string or number)
Group ID under which the ngIRCd should run; you can use the name of the
Module: ngircd.git
Branch: master
Commit: 56b7e67307c1be110eaa4e84681bca03df21bd69
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=56b7e673…
Author: Alexander Barton <alex(a)barton.de>
Date: Sun Jan 1 17:12:36 2012 +0100
New configuration option "PAMIsOptional"
When "PAMIsOptional" is set, clients not sending a password are still
allowed to connect: they won't become "identified" and keep the "~"
character prepended to their supplied user name.
---
doc/sample-ngircd.conf.tmpl | 17 +++++++++++++++++
man/ngircd.conf.5.tmpl | 17 +++++++++++++++++
src/ngircd/conf.c | 6 ++++++
src/ngircd/conf.h | 3 +++
src/ngircd/irc-login.c | 9 +++++++++
5 files changed, 52 insertions(+), 0 deletions(-)
diff --git a/doc/sample-ngircd.conf.tmpl b/doc/sample-ngircd.conf.tmpl
index 26103a7..f696dc6 100644
--- a/doc/sample-ngircd.conf.tmpl
+++ b/doc/sample-ngircd.conf.tmpl
@@ -140,6 +140,8 @@
;DNS = yes
# Do IDENT lookups if ngIRCd has been compiled with support for it.
+ # Users identified using IDENT are registered without the "~" character
+ # prepended to their user name.
;Ident = yes
# Enhance user privacy slightly (useful for IRC server on TOR or I2P)
@@ -160,8 +162,23 @@
;OperServerMode = no
# Use PAM if ngIRCd has been compiled with support for it.
+ # Users identified using PAM are registered without the "~" character
+ # prepended to their user name.
;PAM = yes
+ # When PAM is enabled, all clients are required to be authenticated
+ # using PAM; connecting to the server without successful PAM
+ # authentication isn't possible.
+ # If this option is set, clients not sending a password are still
+ # allowed to connect: they won't become "identified" and keep the "~"
+ # character prepended to their supplied user name.
+ # Please note: To make some use of this behavior, it most probably
+ # isn't useful to enable "Ident", "PAM" and "PAMIsOptional" at the
+ # same time, because you wouldn't be able to distinguish between
+ # Ident'ified and PAM-authenticated users: both don't have a "~"
+ # character prepended to their respective user names!
+ ;PAMIsOptional = no
+
# Allow Pre-Defined Channels only (see Section [Channels])
;PredefChannelsOnly = no
diff --git a/man/ngircd.conf.5.tmpl b/man/ngircd.conf.5.tmpl
index 38ac40b..59d31a3 100644
--- a/man/ngircd.conf.5.tmpl
+++ b/man/ngircd.conf.5.tmpl
@@ -244,6 +244,8 @@ Default: yes.
\fBIdent\fR (boolean)
If ngIRCd is compiled with IDENT support this can be used to disable IDENT
lookups at run time.
+Users identified using IDENT are registered without the "~" character
+prepended to their user name.
Default: yes.
.TP
\fBMorePrivacy\fR (boolean)
@@ -274,8 +276,23 @@ only enable it if you have ircd-irc2 servers in your IRC network.
If ngIRCd is compiled with PAM support this can be used to disable all calls
to the PAM library at runtime; all users connecting without password are
allowed to connect, all passwords given will fail.
+Users identified using PAM are registered without the "~" character
+prepended to their user name.
Default: yes.
.TP
+\fBPAMIsOptional\fR (boolean)
+When PAM is enabled, all clients are required to be authenticated using PAM;
+connecting to the server without successful PAM authentication isn't possible.
+If this option is set, clients not sending a password are still allowed to
+connect: they won't become "identified" and keep the "~" character prepended
+to their supplied user name.
+Please note:
+To make some use of this behavior, it most probably isn't useful to enable
+"Ident", "PAM" and "PAMIsOptional" at the same time, because you wouldn't be
+able to distinguish between Ident'ified and PAM-authenticated users: both
+don't have a "~" character prepended to their respective user names!
+Default: no.
+.TP
\fBPredefChannelsOnly\fR (boolean)
If enabled, no new channels can be created. Useful if you do not want to have
other channels than those defined in [Channel] sections in the configuration
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index b930b6c..b0c7fb4 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -373,6 +373,7 @@ Conf_Test( void )
printf(" OperServerMode = %s\n", yesno_to_str(Conf_OperServerMode));
#ifdef PAM
printf(" PAM = %s\n", yesno_to_str(Conf_PAM));
+ printf(" PAMIsOptional = %s\n", yesno_to_str(Conf_PAMIsOptional));
#endif
printf(" PredefChannelsOnly = %s\n", yesno_to_str(Conf_PredefChannelsOnly));
#ifndef STRICT_RFC
@@ -697,6 +698,7 @@ Set_Defaults(bool InitServers)
#else
Conf_PAM = false;
#endif
+ Conf_PAMIsOptional = false;
Conf_PredefChannelsOnly = false;
#ifdef SYSLOG
Conf_ScrubCTCP = false;
@@ -1500,6 +1502,10 @@ Handle_OPTIONS(int Line, char *Var, char *Arg)
WarnPAM(Line);
return;
}
+ if (strcasecmp(Var, "PAMIsOptional") == 0 ) {
+ Conf_PAMIsOptional = Check_ArgIsTrue(Arg);
+ return;
+ }
if (strcasecmp(Var, "PredefChannelsOnly") == 0) {
Conf_PredefChannelsOnly = Check_ArgIsTrue(Arg);
return;
diff --git a/src/ngircd/conf.h b/src/ngircd/conf.h
index 5a6fff8..be19afc 100644
--- a/src/ngircd/conf.h
+++ b/src/ngircd/conf.h
@@ -184,6 +184,9 @@ GLOBAL bool Conf_NoticeAuth;
/** Enable all usage of PAM, even when compiled with support for it */
GLOBAL bool Conf_PAM;
+/** Don't require all clients to send a password an to be PAM authenticated */
+GLOBAL bool Conf_PAMIsOptional;
+
/** Disable all CTCP commands except for /me ? */
GLOBAL bool Conf_ScrubCTCP;
diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c
index 8d82160..bbb2f0d 100644
--- a/src/ngircd/irc-login.c
+++ b/src/ngircd/irc-login.c
@@ -949,6 +949,15 @@ Hello_User(CLIENT * Client)
return DISCONNECTED;
}
+ if (Conf_PAMIsOptional && strcmp(Client_Password(Client), "") == 0) {
+ /* Clients are not required to send a password and to be PAM-
+ * authenticated at all. If not, they won't become "identified"
+ * and keep the "~" in their supplied user name.
+ * Therefore it is sensible to either set Conf_PAMisOptional or
+ * to enable IDENT lookups -- not both. */
+ return Hello_User_PostAuth(Client);
+ }
+
/* Fork child process for PAM authentication; and make sure that the
* process timeout is set higher than the login timeout! */
pid = Proc_Fork(Conn_GetProcStat(conn), pipefd,
Module: ngircd.git
Branch: master
Commit: b681aa5b9f985247df31772282e520479ffb2ece
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=b681aa5b…
Author: Alexander Barton <alex(a)barton.de>
Date: Sat Dec 31 18:06:17 2011 +0100
PAM: don't use global password buffer for conv struct
Use the pointer of the password of the client directly.
Eventually we can get rid of the global password again ...
---
src/ngircd/pam.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/ngircd/pam.c b/src/ngircd/pam.c
index b28e866..6382c59 100644
--- a/src/ngircd/pam.c
+++ b/src/ngircd/pam.c
@@ -103,7 +103,7 @@ PAM_Authenticate(CLIENT *Client) {
if (password)
free(password);
password = strdup(Client_Password(Client));
- conv.appdata_ptr = password;
+ conv.appdata_ptr = Client_Password(Client);
/* Initialize PAM */
retval = pam_start("ngircd", Client_OrigUser(Client), &conv, &pam);
Module: ngircd.git
Branch: master
Commit: b32f3b76e9f7d608d6772c889f093608abf4d995
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=b32f3b76…
Author: Alexander Barton <alex(a)barton.de>
Date: Sat Dec 31 18:04:58 2011 +0100
doc/Modes.txt: document channel mode "r"
And make clear, that user mode "r" and channel mode "r" are not set by
ngIRCd itself but by IRC services.
---
doc/Modes.txt | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/doc/Modes.txt b/doc/Modes.txt
index d644a48..20e927b 100644
--- a/doc/Modes.txt
+++ b/doc/Modes.txt
@@ -26,7 +26,7 @@ channels he is using at the moment.
i 0.0.1 User is "invisible".
o 0.0.1 User is IRC operator.
r 0.0.1 User is restricted.
- R 19 User is registered (e.g. by NickServ).
+ R (1) 19 User is registered (e.g. by NickServ).
s 0.4.0 User wants to receive server notices.
w 0.11.0 User wants to receive WALLOPS messages.
x 17 Hostname of this user is "cloaked".
@@ -50,6 +50,7 @@ users to lists (e.g. "invite list", "ban list"), others have parameters
n 0.3.0 Channel doesn't allow messages of users not being members.
O 18 Only IRC operators are allowed to join this channel.
P 0.5.0 Channel is "persistent".
+ r (1) 19 Channel is "registered" (e.g. by ChanServ).
R 19 Only registered users are allowed to join this channel.
s 0.9.0 Channel is "secret".
t 0.3.0 Only ChanOps are allowed to modify the channel topic.
@@ -65,3 +66,10 @@ channel of which he is a member.
o 0.2.0 User is channel operator and can op/kick/... other members.
v 0.2.0 User is "voiced" and can speak even if channel is moderated.
+
+
+Notes
+~~~~~
+
+(1) This mode is not set by ngIRCd itself but by services. ngIRCd handles
+ the mode transparently and possibly adjusts its behaviour.
Module: ngircd.git
Branch: master
Commit: 1a5ed654b43b7d4b14636fddd4ee79d3ebe749fa
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=1a5ed654…
Author: Alexander Barton <alex(a)barton.de>
Date: Fri Dec 30 14:52:48 2011 +0100
Fixed handling of WHO commands
This fixes two bugs:
- "WHO <nick>" returned nothing at all if the user was "+i"
(reported by Cahata, thanks).
- "WHO <nick|nickmask>" returned channel names instead of "*"
when the user was member of a (visible) channel.
Clean up code and add documentation as well.
---
src/ngircd/irc-info.c | 223 +++++++++++++++++++++++++++-------------------
src/testsuite/who-test.e | 66 ++++++++++----
2 files changed, 179 insertions(+), 110 deletions(-)
Diff: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commitdiff;h=1a5e…