Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2006-02-22 15:34:55 UTC
Modified files:
Tag: u2_10_12_branch
ircd/s_auth.c ChangeLog
Log message:
Fix some other bugs when IAuth is not enabled.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.74 ircu2.10/ChangeLog:1.710.2.75
--- ircu2.10/ChangeLog:1.710.2.74 Wed Feb 22 07:18:39 2006
+++ ircu2.10/ChangeLog Wed Feb 22 07:34:45 2006
@@ -1,3 +1,11 @@
+2006-02-22 Michael Poole <[EMAIL PROTECTED]>
+
+ * ircd/s_auth.c (check_auth_finished): Give non-iauth clients
+ connection classes, too.
+ (auth_close_unused): Remove redundant check for iauth != NULL.
+ (report_iauth_conf): Check iauth != NULL before deref'ing it.
+ (report_iauth_stats): Likewise.
+
2006-02-22 Kevin L. Mitchell <[EMAIL PROTECTED]>
* ircd/s_auth.c: fix macros to not dereference a NULL pointer when
Index: ircu2.10/ircd/s_auth.c
diff -u ircu2.10/ircd/s_auth.c:1.37.2.3 ircu2.10/ircd/s_auth.c:1.37.2.4
--- ircu2.10/ircd/s_auth.c:1.37.2.3 Wed Feb 22 07:18:39 2006
+++ ircu2.10/ircd/s_auth.c Wed Feb 22 07:34:44 2006
@@ -31,7 +31,7 @@
*/
/** @file
* @brief Implementation of DNS and ident lookups.
- * @version $Id: s_auth.c,v 1.37.2.3 2006/02/22 15:18:39 klmitch Exp $
+ * @version $Id: s_auth.c,v 1.37.2.4 2006/02/22 15:34:44 entrope Exp $
*/
#include "config.h"
@@ -370,6 +370,12 @@
return 0;
}
+ /* If appropriate, do preliminary assignment to connection class. */
+ if (IsUserPort(auth->client)
+ && !FlagHas(&auth->flags, AR_IAUTH_HURRY)
+ && preregister_user(auth->client))
+ return CPTR_KILLED;
+
/* Check if iauth is done. */
if (FlagHas(&auth->flags, AR_IAUTH_PENDING))
{
@@ -381,10 +387,6 @@
/* Set "hurry" flag in auth request. */
FlagSet(&auth->flags, AR_IAUTH_HURRY);
- /* Do preliminary assignment to connection class. */
- if (preregister_user(auth->client))
- return CPTR_KILLED;
-
/* Check password now (to avoid challenge/response conflicts). */
aconf = cli_confs(auth->client)->value.aconf;
if (!EmptyString(aconf->passwd)
@@ -408,6 +410,9 @@
cli_fd(auth->client), AR_IAUTH_PENDING));
return 0;
}
+ else
+ FlagSet(&auth->flags, AR_IAUTH_HURRY);
+
destroy_auth_request(auth, send_reports);
if (!IsUserPort(auth->client))
@@ -1263,7 +1268,7 @@
/** Close all %IAuth connections marked as closing. */
void auth_close_unused(void)
{
- if (iauth && IAuthHas(iauth, IAUTH_CLOSING)) {
+ if (IAuthHas(iauth, IAUTH_CLOSING)) {
int ii;
iauth_disconnect(iauth);
if (iauth->i_argv) {
@@ -2018,7 +2023,7 @@
{
struct SLink *link;
- for (link = iauth->i_config; link; link = link->next)
+ if (iauth) for (link = iauth->i_config; link; link = link->next)
{
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":%s",
link->value.cp);
@@ -2035,7 +2040,7 @@
{
struct SLink *link;
- for (link = iauth->i_stats; link; link = link->next)
+ if (iauth) for (link = iauth->i_stats; link; link = link->next)
{
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":%s",
link->value.cp);
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches