Module: ngircd.git
Branch: master
Commit: a551942635bf2569851013e5a92d8ae918af7ca0
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=a5519426…
Author: DNS <dns(a)rbose.org>
Date: Tue Jan 22 21:36:03 2013 +0100
contrib/Debian/rules: Do no compress Commands.txt
This is required, because ngIRCd can't use a compressed file as
help text ...
(cherry picked from commit 6d09b4f366f656f6d2732ea96a653e086380e458)
---
contrib/Debian/rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/Debian/rules b/contrib/Debian/rules
index 0aecde5..e02db22 100755
--- a/contrib/Debian/rules
+++ b/contrib/Debian/rules
@@ -216,7 +216,7 @@ binary-arch: build install
dh_installdocs -a
dh_installinit -a
dh_strip -a --no-package=ngircd-full-dbg
- dh_compress -a
+ dh_compress -a -XCommands.txt
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
Module: ngircd.git
Branch: master
Commit: 3d49e8ac84b49be07565bc1a19759184b4006317
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=3d49e8ac…
Author: Alexander Barton <alex(a)barton.de>
Date: Wed Jan 23 00:41:02 2013 +0100
ngircd.service: Use "forking" service type
Don't run ngIRCd in forground mode but let it daemonize itself. This
enhances the log output of "systemctl status ngircd.service", because
now ngIRCd doesn't print out its PID and timestamp on each log message
which is redundant: it becomes logged by systemd/journald already.
---
contrib/ngircd.service | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/ngircd.service b/contrib/ngircd.service
index b5bab06..b71eef2 100644
--- a/contrib/ngircd.service
+++ b/contrib/ngircd.service
@@ -3,8 +3,8 @@ Description=Next Generation IRC Daemon
After=network.target
[Service]
-# don't daemonize to simplify stuff
-ExecStart=/usr/sbin/ngircd -n
+Type=forking
+ExecStart=/usr/sbin/ngircd
ExecReload=/bin/kill -HUP $MAINPID
[Install]
Module: ngircd.git
Branch: master
Commit: 508ca3044dd6d1a88686efceda92a7f2a9b4a926
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=508ca304…
Author: Alexander Barton <alex(a)barton.de>
Date: Tue Jan 22 10:54:06 2013 +0100
Return better "Connection not registered as server link" errors
Now ngIRCd returns a more specific error message for numeric
ERR_NOTREGISTERED(451) when a regular user tries to use a command that
isn't allowed for users but for servers: ERR_NOTREGISTEREDSERVER(451).
---
src/ngircd/parse.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/ngircd/parse.c b/src/ngircd/parse.c
index 5ff9fcc..46164ce 100644
--- a/src/ngircd/parse.c
+++ b/src/ngircd/parse.c
@@ -514,10 +514,20 @@ Handle_Request( CONN_ID Idx, REQUEST *Req )
continue;
}
- if (!(client_type & cmd->type))
- return IRC_WriteStrClient(client, ERR_NOTREGISTERED_MSG, Client_ID(client));
+ if (!(client_type & cmd->type)) {
+ if (client_type == CLIENT_USER
+ && cmd->type & CLIENT_SERVER)
+ return IRC_WriteStrClient(client,
+ ERR_NOTREGISTEREDSERVER_MSG,
+ Client_ID(client));
+ else
+ return IRC_WriteStrClient(client,
+ ERR_NOTREGISTERED_MSG,
+ Client_ID(client));
+ }
- /* Command is allowed for this client: call it and count produced bytes */
+ /* Command is allowed for this client: call it and count
+ * generated bytes in output */
Conn_ResetWCounter();
result = (cmd->function)(client, Req);
cmd->bytes += Conn_WCounter();
Module: ngircd.git
Branch: master
Commit: d8f2964710985597281de73aecd0a1ece30ecb03
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=d8f29647…
Author: Alexander Barton <alex(a)barton.de>
Date: Sun Jan 13 16:52:00 2013 +0100
MODE: don't report error on "more modes than parameters"
Don't report ERR_NEEDMOREPARAMS(461) when a MDOE command with more modes
than nicknames is handled, as well as for channel limit and key changes
without specifying the limit or key parameters.
This is how a lot (all?) other IRC servers behave, including ircd2.11,
InspIRCd, and ircd-seven. And because of clients (tested with Textual and
mIRC) sending bogus MODE commands like "MODE -ooo nick", end-users got the
expected result as well as correct but misleading error messages ...
If ngIRCd is compiled using "strict mode", these errors are still reported.
Reported-by: Tim <tim(a)stackwatch.net>
---
src/ngircd/irc-mode.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c
index a63a0f4..b5f28fa 100644
--- a/src/ngircd/irc-mode.c
+++ b/src/ngircd/irc-mode.c
@@ -628,9 +628,13 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
Req->argv[arg_arg][0] = '\0';
arg_arg++;
} else {
+#ifdef STRICT_RFC
+ /* Only send error message in "strict" mode,
+ * this is how ircd2.11 and others behave ... */
connected = IRC_WriteStrClient(Origin,
ERR_NEEDMOREPARAMS_MSG,
Client_ID(Origin), Req->command);
+#endif
goto chan_exit;
}
break;
@@ -668,9 +672,13 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
Req->argv[arg_arg][0] = '\0';
arg_arg++;
} else {
+#ifdef STRICT_RFC
+ /* Only send error message in "strict" mode,
+ * this is how ircd2.11 and others behave ... */
connected = IRC_WriteStrClient(Origin,
ERR_NEEDMOREPARAMS_MSG,
Client_ID(Origin), Req->command);
+#endif
goto chan_exit;
}
break;
@@ -761,9 +769,17 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
Req->argv[arg_arg][0] = '\0';
arg_arg++;
} else {
+#ifdef STRICT_RFC
+ /* Report an error to the client, when a user
+ * mode should be changed but no nickname is
+ * given. But don't do it when not in "strict"
+ * mode, because most other servers don't do
+ * it as well and some clients send "wired"
+ * MODE commands like "MODE #chan -ooo nick". */
connected = IRC_WriteStrClient(Origin,
ERR_NEEDMOREPARAMS_MSG,
Client_ID(Origin), Req->command);
+#endif
goto chan_exit;
}
break;
Module: ngircd.git
Branch: master
Commit: ab009976984ede815c31c9a6b318c80006823b81
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=ab009976…
Author: Alexander Barton <alex(a)barton.de>
Date: Mon Jan 7 18:42:57 2013 +0100
Correctly detect when SSL subsystem must be initialized
This patch introduces the new function Conf_SSLInUse() to check when the
current server configuration requires the SSL subsystem to be initialized
and accounts incoming as well as outgoing connections -- so this fixes
commit bb20aeb9 ("Initialize SSL when needed only, and disable SSL on
errors") which only handled the inbound case ...
Tested-by: Brett Smith <brett(a)w3.org>
---
src/ngircd/conf.c | 22 ++++++++++++++++++++++
src/ngircd/conf.h | 4 ++++
src/ngircd/conn-ssl.c | 4 +++-
3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index d5a28bd..929ab05 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -110,6 +110,28 @@ ConfSSL_Init(void)
}
/**
+ * Check if the current configuration uses/requires SSL.
+ *
+ * @returns true if SSL is used and should be initialized.
+ */
+GLOBAL bool
+Conf_SSLInUse(void)
+{
+ int i;
+
+ /* SSL listen ports configured? */
+ if (array_bytes(&Conf_SSLOptions.ListenPorts))
+ return true;
+
+ for (i = 0; i < MAX_SERVERS; i++) {
+ if (Conf_Server[i].port > 0
+ && Conf_Server[i].SSLConnect)
+ return true;
+ }
+ return false;
+}
+
+/**
* Make sure that a configured file is readable.
*
* Currently, this function is only used for SSL-related options ...
diff --git a/src/ngircd/conf.h b/src/ngircd/conf.h
index ac42746..c203b57 100644
--- a/src/ngircd/conf.h
+++ b/src/ngircd/conf.h
@@ -256,6 +256,10 @@ GLOBAL bool Conf_AddServer PARAMS(( const char *Name, UINT16 Port, const char *H
GLOBAL bool Conf_NickIsService PARAMS((int ConfServer, const char *Nick));
GLOBAL bool Conf_NickIsBlocked PARAMS((const char *Nick));
+#ifdef SSL_SUPPORT
+GLOBAL bool Conf_SSLInUse PARAMS((void));
+#endif
+
/* Password required by WEBIRC command */
GLOBAL char Conf_WebircPwd[CLIENT_PASS_LEN];
diff --git a/src/ngircd/conn-ssl.c b/src/ngircd/conn-ssl.c
index 59729e0..45e6458 100644
--- a/src/ngircd/conn-ssl.c
+++ b/src/ngircd/conn-ssl.c
@@ -241,8 +241,10 @@ void ConnSSL_Free(CONNECTION *c)
bool
ConnSSL_InitLibrary( void )
{
- if (!array_bytes(&Conf_SSLOptions.ListenPorts))
+ if (!Conf_SSLInUse()) {
+ LogDebug("SSL not in use, skipping initialization.");
return true;
+ }
#ifdef HAVE_LIBSSL
SSL_CTX *newctx;
Module: ngircd.git
Branch: master
Commit: b4966aa1bd8d11ed2bc97cc5fea418fab3485b08
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=b4966aa1…
Author: Alexander Barton <alex(a)barton.de>
Date: Sun Jan 6 17:46:06 2013 +0100
configure: use AS_HELP_STRING for --with-iconv
---
configure.ng | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ng b/configure.ng
index 47c9599..c89096f 100644
--- a/configure.ng
+++ b/configure.ng
@@ -518,7 +518,8 @@ if test "$x_ircplus_on" = "yes"; then
# CHARCONV is the only function depending on it.
x_iconv_on=no
AC_ARG_WITH(iconv,
- [ --with-iconv enable character conversation using libiconv],
+ AS_HELP_STRING([--with-iconv],
+ [enable character conversation using libiconv]),
[ if test "$withval" != "no"; then
if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS"