From fb68c66f31a0ae3ea438bdbded03daaf93f09f93 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Mon, 1 Mar 2010 11:49:30 +0000 Subject: [PATCH] - Updated ./Config description for NOSPOOF, it already said it protects against HTTP POST proxies, now added some extra text to say it also protects against the Firefox XPS IRC Attack. Also made NOSPOOF enabled by default on *NIX (this was already the case on Windows). - Updated ./Config description for DPATH. Seems quite some people answer this question wrong, and when that happens, you only get some obscure error when running './unreal start'. - Fixed 'unreal' script to give a better error if it cannot find the IRCd binary. --- Changes | 9 +++++++++ Config | 39 ++++++++++++++++++++++++++------------- unreal.in | 6 ++++++ 3 files changed, 41 insertions(+), 13 deletions(-) diff --git a/Changes b/Changes index 3e00dd4c9..1b3fc2aeb 100644 --- a/Changes +++ b/Changes @@ -1933,3 +1933,12 @@ treated as-is, so no special escaping is necessary. Reported by DelGurth (#0003002). - Removed old dgets() and crc32 function (code cleanup) +- Updated ./Config description for NOSPOOF, it already said it protects + against HTTP POST proxies, now added some extra text to say it also + protects against the Firefox XPS IRC Attack. Also made NOSPOOF enabled by + default on *NIX (this was already the case on Windows). +- Updated ./Config description for DPATH. Seems quite some people answer + this question wrong, and when that happens, you only get some obscure + error when running './unreal start'. +- Fixed 'unreal' script to give a better error if it cannot find the IRCd + binary. diff --git a/Config b/Config index 232b7ad37..3bdf563a7 100755 --- a/Config +++ b/Config @@ -314,7 +314,7 @@ done c="" n="" UNREALCWD="`pwd`" -NOSPOOF="" +NOSPOOF="1" DPATH="`pwd`" SPATH="`pwd`/src/ircd" HUB="1" @@ -424,8 +424,10 @@ while [ -z "$TEST" ] ; do echo "Many older operating systems have an insecure TCP/IP stack" echo "which may be vulnerable to IP spoofing attacks, if you run" echo "an operating system that is vulnerable to such attacks" - echo "enable this option. This option can also be useful to prevent" - echo "blind proxies from connecting (eg: HTTP POST proxies)." + echo "enable this option." + echo "This option also prevents blind proxies (eg: HTTP POST proxies)" + echo "and other blind clients from connecting (eg: protects against" + echo "the Firefox XPS IRC Attack)." echo "" echo "Do you want to enable the server anti-spoof protection?" echo $n "[$TEST] -> $c" @@ -459,16 +461,27 @@ else DPATH=`eval echo $cc` # modified fi -TEST="$SPATH" -echo "" -echo "What is the path to the ircd binary including the name of the binary?" -echo $n "[$TEST] -> $c" - read cc -if [ -z "$cc" ] ; then - SPATH=$TEST -else - SPATH=`eval echo $cc` # modified -fi +TEST="" +SAVEME="$SPATH" +while [ -z "$TEST" ] ; do + TEST="$SAVEME" + echo "" + echo "What is the path to the ircd binary including the name of the binary?" + echo $n "[$TEST] -> $c" + read cc + if [ -z "$cc" ] ; then + SPATH=$TEST + else + SPATH=`eval echo $cc` # modified + fi + if [ "$SPATH" = "$DPATH" ]; then + echo "" + echo "You need to specify the path to the BINARY, not to a directory." + echo "The answer to this question can never be identical to the previous one." + echo "HINT: perhaps you want $DPATH/ircd ?" + TEST="" + fi +done TEST="" while [ -z "$TEST" ] ; do diff --git a/unreal.in b/unreal.in index 6240e8240..aff181630 100644 --- a/unreal.in +++ b/unreal.in @@ -2,6 +2,12 @@ PID_FILE="@IRCDDIR@/ircd.pid" PID_BACKUP="@IRCDDIR@/ircd.pid.bak" +if [ ! -f @BINDIR@ ]; then + echo "ERROR: Could not find the IRCd binary (@BINDIR@)" + echo "This usually means you did not answer the question correctly" + echo "during './Config', or you forgot to run 'make install'." + exit +fi if [ "$1" = "start" ] ; then echo "Starting UnrealIRCd" if [ -r $PID_FILE ] ; then