Module: ngircd.git
Branch: master
Commit: 0f85c4c6a70a71c935af9c28e2c469ea4b66220a
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=0f85c4c6…
Author: Alexander Barton <alex(a)barton.de>
Date: Fri Jan 17 16:10:34 2014 +0100
Add libwrap at the end of the configure run
If libwrap becomes added earlier, other tests may fail because of not all
external variables required by libwrap are available when linking: for
example allow_severity and deny_severity.
This patch adds generic support for the LDFLAGS_END and LIBS_END variables
(CFLAGS_END has been implemented already).
Problem spotted on OpenBSD.
---
configure.ng | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/configure.ng b/configure.ng
index 0b0a658..7d22090 100644
--- a/configure.ng
+++ b/configure.ng
@@ -466,7 +466,9 @@ AC_ARG_WITH(tcp-wrappers,
LDFLAGS="-L$withval/lib $LDFLAGS"
fi
AC_MSG_CHECKING(for hosts_access)
+ saved_LIBS="$LIBS"
LIBS="-lwrap $LIBS"
+ LIBS_END="-lwrap $LIBS_END"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <tcpd.h>
int allow_severity = 0;
@@ -481,6 +483,7 @@ int deny_severity = 0;
AC_MSG_RESULT(no)
AC_MSG_ERROR([Can't enable TCP wrappers!])
])
+ LIBS="$saved_LIBS"
fi
]
)
@@ -636,9 +639,12 @@ AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" )
AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" )
AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" )
-# Add additional CFLAGS, eventually specified on the command line, but after
-# running this configure script. Useful for "-Werror" for example.
+# Add additional CFLAGS, LDFLAGS and LIBS which were specified on the command
+# line or by some tests from above, but after running this script. Useful for
+# adding "-Werror", for example:
test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
+test -n "$LDFLAGS_END" && LDFLAGS="$LDFLAGS $LDFLAGS_END"
+test -n "$LIBS_END" && LIBS="$LIBS $LIBS_END"
# -- Generate files --
Module: ngircd.git
Branch: master
Commit: 8ae2cdfce9f8ba75fe72d65603d4c05c87f6d9c2
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=8ae2cdfc…
Author: Alexander Barton <alex(a)barton.de>
Date: Wed Jan 8 14:18:09 2014 +0100
Send "fake '*' key" in "MODE -k" replies
According to RFC 2812 3.2.3 "Channel mode message" and the examples
there, it looks like clients should use "MODE -k <key>" to unset channel
keys; and that's how other servers and services behave and do expect it.
(But please note that this is NOT the case for "MODE -l"!)
In the end, it doesn't make sense to specify a key when UNsetting it at
all, and different services behave diffrently when clients do not send
the currently set key to unset it - some ignore such calls, for example!
But this implementation is quite relaxed, it accepts any key when
unsetting channel mode "k" and even accepts no key at all. But the reply
will always include an "*" character for every "-k" parameter.
---
src/ngircd/irc-mode.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c
index a29ed23..a59f085 100644
--- a/src/ngircd/irc-mode.c
+++ b/src/ngircd/irc-mode.c
@@ -582,9 +582,13 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
goto chan_exit;
if (!set) {
if (is_oper || is_machine || is_owner ||
- is_admin || is_op || is_halfop)
+ is_admin || is_op || is_halfop) {
x[0] = *mode_ptr;
- else
+ if (Channel_HasMode(Channel, 'k'))
+ strlcpy(argadd, "*", sizeof(argadd));
+ if (arg_arg > mode_arg)
+ arg_arg++;
+ } else
connected = IRC_WriteErrClient(Origin,
ERR_CHANOPRIVSNEEDED_MSG,
Client_ID(Origin),
Module: ngircd.git
Branch: master
Commit: e2b85ccde360ccc389afb0af12d5d75f0549f666
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=e2b85ccd…
Author: Alexander Barton <alex(a)barton.de>
Date: Sun Jan 5 00:48:31 2014 +0100
platformtest.sh: don't use "test -e", it isn't portable
---
contrib/platformtest.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/platformtest.sh b/contrib/platformtest.sh
index 6a1dc71..76f4169 100755
--- a/contrib/platformtest.sh
+++ b/contrib/platformtest.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#
# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2013 Alexander Barton (alex(a)barton.de) and Contributors
+# Copyright (c)2001-2014 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
@@ -65,7 +65,7 @@ if [ -d .git ]; then
fi
echo "$NAME: Checking for \"./configure\" script ..."
-if [ ! -e ./configure ]; then
+if [ ! -r ./configure ]; then
echo "$NAME: Running \"./autogen.sh\" ..."
[ -n "$VERBOSE" ] && ./autogen.sh || ./autogen.sh >/dev/null
fi