Upstream has written a different patch, which I have committed to svn
and put into this message's attachment. James, can you please try to
reproduce the issue with this patch applied?

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835
#! /bin/sh /usr/share/dpatch/dpatch-run
## 10-343543-fix.dpatch by Marc Haber <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: upstream patch fixing #343543. Upstream bug tracker item 5.
## DP: see 
http://rageircd.cvs.sourceforge.net/rageircd/rage2/src/s_conf2.c?r1=1.287.2.16&r2=1.287.2.17&pathrev=BLUEMOON

@DPATCH@
diff -urNad trunk~/src/s_conf2.c trunk/src/s_conf2.c
--- trunk~/src/s_conf2.c        2005-07-09 00:39:20.000000000 +0000
+++ trunk/src/s_conf2.c 2006-07-24 10:07:22.000000000 +0000
@@ -1825,11 +1825,17 @@
        if ((allow->class->clients + 1) > allow->class->max_clients) {
                return CLIENTAUTH_CLASSFULL;
        }
+
        if ((allow->auth != NULL) && !BadPtr(cptr->localClient->passwd)) {
-               if (!check_auth(allow->auth, cptr->localClient->passwd)) {
+
+       if (allow->auth != NULL) {
+               if (!BadPtr(cptr->localClient->passwd) && 
check_auth(allow->auth, cptr->localClient->passwd)) {
+                       memset(cptr->localClient->passwd, '\0', PASSWDLEN + 1);
+               }
+               else {
+                       /* No password specified, or password invalid */
                        return CLIENTAUTH_INVALIDPW;
                }
-               memset(cptr->localClient->passwd, '\0', PASSWDLEN + 1);
        }
 
        if (!BadPtr(allow->spoof_mask)) {

Reply via email to