Module: ngircd.git
Branch: master
Commit: cf9f9e1f30857d615fed9b83d3d58167c8a3d0ed
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=cf9f9e1f…
Author: Alexander Barton <alex(a)barton.de>
Date: Thu Sep 27 00:56:03 2012 +0200
Test suite: don't use "mkdir -p"
"mkdir -p" is not supported on all platforms.
Tested with Apple A/UX 3.1.x.
---
src/testsuite/stress-server.sh | 7 +++----
src/testsuite/tests.sh | 12 ++++++++++--
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/testsuite/stress-server.sh b/src/testsuite/stress-server.sh
index 0f85958..15d6df1 100755
--- a/src/testsuite/stress-server.sh
+++ b/src/testsuite/stress-server.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#
# ngIRCd Test Suite
-# Copyright (c)2002-2004 by Alexander Barton (alex(a)barton.de)
+# Copyright (c)2001-2012 Alexander Barton (alex(a)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
@@ -9,8 +9,6 @@
# (at your option) any later version.
# Please read the file COPYING, README and AUTHORS for more information.
#
-# $Id: stress-server.sh,v 1.16 2005/12/30 22:13:21 alex Exp $
-#
# detect source directory
[ -z "$srcdir" ] && srcdir=`dirname $0`
@@ -23,7 +21,8 @@
name=`basename $0`
# create directories
-mkdir -p logs tests
+[ -d logs ] || mkdir logs
+[ -d tests ] || mkdir tests
# test for required external tools
type expect > /dev/null 2>&1
diff --git a/src/testsuite/tests.sh b/src/testsuite/tests.sh
index 2bd9ae4..dc184ff 100755
--- a/src/testsuite/tests.sh
+++ b/src/testsuite/tests.sh
@@ -1,13 +1,21 @@
#!/bin/sh
+#
# ngIRCd Test Suite
-# $Id: tests.sh,v 1.7 2004/09/06 22:04:06 alex Exp $
+# Copyright (c)2001-2012 Alexander Barton (alex(a)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.
+#
# detect source directory
[ -z "$srcdir" ] && srcdir=`dirname $0`
name=`basename $0`
test=`echo ${name} | cut -d '.' -f 1`
-mkdir -p logs
+[ -d logs ] || mkdir logs
if [ ! -r "$test" ]; then
echo " ${name}: test \"$test\" not found!"; exit 77
Module: ngircd.git
Branch: master
Commit: d21afce2b6fdc919a80c4eb1d6ba781c1cf63f3c
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=d21afce2…
Author: Alexander Barton <alex(a)barton.de>
Date: Wed Sep 26 22:52:06 2012 +0200
Allow user mode +x only when "CloakHostModeX" is set
Allow users to "cloak" their hostname only when the configuration
variable "CloakHostModeX" (introduced in 19.2) is set. Otherwise, only
IRC opertators, other servers, and services are allowed 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 ;-)
This fixes bug #133.
---
INSTALL | 8 ++++++++
src/ngircd/irc-mode.c | 8 +++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/INSTALL b/INSTALL
index 640df4e..b445958 100644
--- a/INSTALL
+++ b/INSTALL
@@ -12,6 +12,14 @@
I. Upgrade Information
~~~~~~~~~~~~~~~~~~~~~~
+Differences to version 19.x
+
+- Starting with ngIRCd 20, users can "cloak" their hostname only when the
+ configuration variable "CloakHostModeX" (introduced in 19.2) is set.
+ Otherwise, only IRC opertators, other servers, and services are allowed 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 ;-)
+
Differences to version 17
- Support for ZeroConf/Bonjour/Rendezvous service registration has been
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c
index 7380c6e..90f638d 100644
--- a/src/ngircd/irc-mode.c
+++ b/src/ngircd/irc-mode.c
@@ -278,9 +278,15 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
ok = IRC_WriteStrClient(Origin,
ERR_RESTRICTED_MSG,
Client_ID(Origin));
- else
+ else if (!set || Conf_CloakHostModeX[0]
+ || Client_Type(Client) == CLIENT_SERVER
+ || Client_OperByMe(Client)) {
x[0] = 'x';
send_RPL_HOSTHIDDEN_MSG = true;
+ } else
+ ok = IRC_WriteStrClient(Origin,
+ ERR_NOPRIVILEGES_MSG,
+ Client_ID(Origin));
break;
default:
if (Client_Type(Client) != CLIENT_SERVER) {