Module: ngircd.git
Branch: master
Commit: 20b52fe33dc3387d50790ed6da8c47c34277527a
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=20b52fe3…
Author: Alexander Barton <alex(a)barton.de>
Date: Mon Jan 27 22:59:54 2014 +0100
Correctly use cloaked IRC masks on "INVITE nickname"
The cloaked IRC mask of a user is his visible mask, so the daemon has
to use it for generating the "one time" entries for the invite list of
the given channel.
Without this patch, ngIRCd records the real IRC mask which will never
match while the target client is "+x", and even worse, will disclose
the real mask on "MODE #channel +I" commands :-/
Bug reported by Cahata on #ngircd, thanks!
---
src/ngircd/irc-op.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ngircd/irc-op.c b/src/ngircd/irc-op.c
index 23db579..449cecf 100644
--- a/src/ngircd/irc-op.c
+++ b/src/ngircd/irc-op.c
@@ -194,7 +194,8 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
if (remember) {
/* We must remember this invite */
- if (!Channel_AddInvite(chan, Client_Mask(target), true))
+ if (!Channel_AddInvite(chan, Client_MaskCloaked(target),
+ true))
return CONNECTED;
}
}
Module: ngircd.git
Branch: master
Commit: 14a84dfca57efeb744aa6219ca7776dc629871b7
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=14a84dfc…
Author: Alexander Barton <alex(a)barton.de>
Date: Sun Jan 26 23:40:58 2014 +0100
configure: Only link "contrib/Debian" if it exists
This isn't the case on "VPATH builds", for example.
---
configure.ng | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ng b/configure.ng
index 1e141c9..5f85a4d 100644
--- a/configure.ng
+++ b/configure.ng
@@ -676,7 +676,9 @@ if test $? -eq 0; then
# Generate debian/ link if the dpkg command exists
# (read: if we are running on a debian compatible system)
echo "creating Debian-specific links ..."
- test -f debian/rules || ln -s contrib/Debian debian
+ if test ! -f debian/rules -a -f contrib/Debian/rules; then
+ ln -s contrib/Debian debian
+ fi
fi
# -- Result --
Module: ngircd.git
Branch: master
Commit: 3b24ebf122fd8661437be244eb851d8f7d04408f
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=3b24ebf1…
Author: Alexander Barton <alex(a)barton.de>
Date: Sun Jan 19 15:32:20 2014 +0100
ngircd.conf.5: Update manual page
---
man/ngircd.conf.5.tmpl | 43 ++++++++++++++++++++++---------------------
1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/man/ngircd.conf.5.tmpl b/man/ngircd.conf.5.tmpl
index 3de2fbe..208b461 100644
--- a/man/ngircd.conf.5.tmpl
+++ b/man/ngircd.conf.5.tmpl
@@ -1,7 +1,7 @@
.\"
.\" ngircd.conf(5) manual page template
.\"
-.TH ngircd.conf 5 "Oct 2013" ngIRCd "ngIRCd Manual"
+.TH ngircd.conf 5 "Jan 2014" ngIRCd "ngIRCd Manual"
.SH NAME
ngircd.conf \- configuration file of ngIRCd
.SH SYNOPSIS
@@ -60,7 +60,7 @@ The main configuration of the server is stored in the
section, like the server name, administrative information and the ports on
which the server should be listening. The variables in this section have to be
adjusted to the local requirements most of the time, whereas all the variables
-in the other sections can be left on there defaults very often.
+in the other sections can be left on their defaults very often.
.PP
Options in the
.I [Limits]
@@ -82,12 +82,13 @@ sections. And
blocks are used to configure pre-defined ("persistent") IRC channels.
.PP
There can be more than one [Operator], [Server] and [Channel] section per
-configuration file (one for each operator, server, and channel), but only
-exactly one [Global], one [Limits], one [Options], and one [SSL] section.
+configuration file, one for each operator, server, and channel. [Global],
+[Limits], [Options], and [SSL] sections can occure multiple times, too, but
+each variable overwrites itself, only the last assignment is relevant.
.SH [GLOBAL]
The
.I [Global]
-section of this file is used to define the main configuration of the server,
+section is used to define the main configuration of the server,
like the server name and the ports on which the server should be listening.
These settings depend on your personal preferences, so you should make sure
that they correspond to your installation and setup!
@@ -139,16 +140,16 @@ if ngIRCd is using PAM!
.TP
\fBPidFile\fR (string)
This tells ngIRCd to write its current process ID to a file. Note that the
-"PID file" is written AFTER chroot and switching the user ID, e.g. the directory
-the file resides in must be writable by the ngIRCd user and exist in the
-chroot directory (if configured, see above).
+"PID file" is written AFTER chroot and switching the user ID, therefore the
+directory the file resides in must be writable by the ngIRCd user and exist
+in the chroot directory (if configured, see above).
.TP
\fBPorts\fR (list of numbers)
-Ports on which the server should listen for unencrypted connections. There
-may be more than one port, separated with commas (","). Default: 6667.
+Port number(s) on which the server should listen for unencrypted connections.
+There may be more than one port, separated with commas (","). Default: 6667.
.TP
\fBServerGID\fR (string or number)
-Group ID under which the ngIRCd should run; you can use the name of the
+Group ID under which the ngIRCd daemon should run; you can use the name of the
group or the numerical ID.
.PP
.RS
@@ -158,8 +159,8 @@ For this to work the server must have been started with root privileges!
.RE
.TP
\fBServerUID\fR (string or number)
-User ID under which the server should run; you can use the name of the user
-or the numerical ID.
+User ID under which the ngIRCd daemon should run; you can use the name of the
+user or the numerical ID.
.PP
.RS
.B Attention:
@@ -169,8 +170,8 @@ addition, the configuration and MOTD files must be readable by this user,
otherwise RESTART and REHASH won't work!
.RE
.SH [LIMITS]
-Define some limits and timeouts for this ngIRCd instance. Default values
-should be safe, but it is wise to double-check :-)
+This section is used to define some limits and timeouts for this ngIRCd
+instance. Default values should be safe, but it is wise to double-check :-)
.TP
\fBConnectRetry\fR (number)
The server tries every <ConnectRetry> seconds to establish a link to not yet
@@ -212,8 +213,8 @@ If a client fails to answer a PING with a PONG within <PongTimeout>
seconds, it will be disconnected by the server. Default: 20.
.SH [OPTIONS]
Optional features and configuration options to further tweak the behavior of
-ngIRCd. If you want to get started quickly, you most probably don't have to
-make changes here -- they are all optional.
+ngIRCd are configured in this section. If you want to get started quickly, you
+most probably don't have to make changes here -- they are all optional.
.TP
\fBAllowedChannelTypes\fR (string)
List of allowed channel types (channel prefixes) for newly created channels
@@ -222,9 +223,9 @@ Set this variable to the empty string to disallow creation of new channels
by local clients at all. Default: #&+
.TP
\fBAllowRemoteOper\fR (boolean)
-Are IRC operators connected to remote servers allowed to control this server,
-e.g. are they allowed to use administrative commands like CONNECT, DIE,
-SQUIT, ... that affect this server? Default: no.
+If this option is active, IRC operators connected to remote servers are allowed
+to control this local server using administrative commands, for example like
+CONNECT, DIE, SQUIT etc. Default: no.
.TP
\fBChrootDir\fR (string)
A directory to chroot in when everything is initialized. It doesn't need
@@ -283,11 +284,11 @@ Users identified using IDENT are registered without the "~" character
prepended to their user name.
Default: yes.
.TP
-.TP
\fBIncludeDir\fR (string)
Directory containing configuration snippets (*.conf), that should be read in
after parsing the current configuration file.
Default: none.
+.TP
\fBMorePrivacy\fR (boolean)
This will cause ngIRCd to censor user idle time, logon time as well as the
part/quit messages (that are sometimes used to inform everyone about which
Module: ngircd.git
Branch: master
Commit: e73d70ce6fab3acdefe914520a4296acb6d50eac
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=e73d70ce…
Author: Alexander Barton <alex(a)barton.de>
Date: Wed Jan 15 14:58:57 2014 +0100
Remove "range matching" functionality
Don't support "range marching" in our pattern matching code using
the "[...]" syntax, because [ and ] are valid characters in nick
names and one has to quote them currently using the "\" character,
which is quite unexpected. For example:
Nick "te[st" => "MODE #channel +b te\[st"
And remove quoting altogether, too, because "*" and "?" don't need
to be quoted because these characters are not allowed in IRC masks,
nicks, and hostnames.
Reported by "hifi" (Toni Spets) on IRC, thanks!
---
src/ngircd/match.c | 118 +---------------------------------------------------
1 file changed, 1 insertion(+), 117 deletions(-)
diff --git a/src/ngircd/match.c b/src/ngircd/match.c
index dad3e7b..bc26e75 100644
--- a/src/ngircd/match.c
+++ b/src/ngircd/match.c
@@ -109,11 +109,6 @@ MatchCaseInsensitiveList(const char *Pattern, const char *String,
static int
Matche( const char *p, const char *t )
{
- register char range_start, range_end;
- bool invert;
- bool member_match;
- bool loop;
-
for( ; *p; p++, t++ )
{
/* if this is the end of the text then this is the end of the match */
@@ -131,118 +126,7 @@ Matche( const char *p, const char *t )
case '*': /* multiple any character match */
return Matche_After_Star( p, t );
- case '[': /* [..] construct, single member/exclusion character match */
- /* move to beginning of range */
- p++;
-
- /* check if this is a member match or exclusion match */
- invert = false;
- if( *p == '!' || *p == '^' )
- {
- invert = true;
- p++;
- }
-
- /* if closing bracket here or at range start then we have a malformed pattern */
- if ( *p == ']' ) return MATCH_PATTERN;
-
- member_match = false;
- loop = true;
-
- while( loop )
- {
- /* if end of construct then loop is done */
- if( *p == ']' )
- {
- loop = false;
- continue;
- }
-
- /* matching a '!', '^', '-', '\' or a ']' */
- if( *p == '\\' ) range_start = range_end = *++p;
- else range_start = range_end = *p;
-
- /* if end of pattern then bad pattern (Missing ']') */
- if( ! *p ) return MATCH_PATTERN;
-
- /* check for range bar */
- if( *++p == '-' )
- {
- /* get the range end */
- range_end = *++p;
-
- /* if end of pattern or construct then bad pattern */
- if( range_end == '\0' || range_end == ']' ) return MATCH_PATTERN;
-
- /* special character range end */
- if( range_end == '\\' )
- {
- range_end = *++p;
-
- /* if end of text then we have a bad pattern */
- if ( ! range_end ) return MATCH_PATTERN;
- }
-
- /* move just beyond this range */
- p++;
- }
-
- /* if the text character is in range then match found. make sure the range
- * letters have the proper relationship to one another before comparison */
- if( range_start < range_end )
- {
- if( *t >= range_start && *t <= range_end )
- {
- member_match = true;
- loop = false;
- }
- }
- else
- {
- if( *t >= range_end && *t <= range_start )
- {
- member_match = true;
- loop = false;
- }
- }
- }
-
- /* if there was a match in an exclusion set then no match */
- /* if there was no match in a member set then no match */
- if(( invert && member_match ) || ! ( invert || member_match )) return MATCH_RANGE;
-
- /* if this is not an exclusion then skip the rest of the [...]
- * construct that already matched. */
- if( member_match )
- {
- while( *p != ']' )
- {
- /* bad pattern (Missing ']') */
- if( ! *p ) return MATCH_PATTERN;
-
- /* skip exact match */
- if( *p == '\\' )
- {
- p++;
-
- /* if end of text then we have a bad pattern */
- if( ! *p ) return MATCH_PATTERN;
- }
-
- /* move to next pattern char */
- p++;
- }
- }
- break;
- case '\\': /* next character is quoted and must match exactly */
- /* move pattern pointer to quoted char and fall through */
- p++;
-
- /* if end of text then we have a bad pattern */
- if( ! *p ) return MATCH_PATTERN;
-
- /* must match this character exactly */
- default:
+ default: /* must match this character exactly */
if( *p != *t ) return MATCH_LITERAL;
}
}