This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Undernet IRC Server Source Code.".
The branch, u2_10_12_branch has been updated
via 8a0fce5ce44018405ec3aab7115f7b7028c90329 (commit)
via 3cfdd224928b767bf33e7de2507b6cad3bcfe3ba (commit)
from b3e7a2bbceb4d17cdab3ce7579fcaac2aa77868d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8a0fce5ce44018405ec3aab7115f7b7028c90329
Author: Michael Poole <[email protected]>
Date: Thu Jan 19 21:50:27 2012 -0500
Support a "soft done" message from IAuth.
This lets clients onto the network if a login-on-connect response
times out, without requiring the IAuth process to know ircu's
authorization deadline.
diff --git a/doc/readme.iauth b/doc/readme.iauth
index 8b4aea7..54a011f 100644
--- a/doc/readme.iauth
+++ b/doc/readme.iauth
@@ -446,6 +446,18 @@ Next State: GONE
Comments: Indicates that the specified client should be disconnected
for the reason given. Operators should be notified.
+d - "Soft" Done Checking
+Syntax: d <id> <remoteip> <remoteport>
+Example: d 5 192.168.1.10 23367
+States: REGISTER, HURRY
+Next State: -
+Comments: Indicates that the iauth instance has no objection to letting
+ the specified client onto the network, but that some further work is
+ in process. In particular, an account stamp and/or connection class
+ might be available later.
+Compatibility: This is an Undernet extension and ircd does not support
+ this message.
+
D - Done Checking
Syntax: D <id> <remoteip> <remoteport> [class]
Example: D 5 192.168.1.10 23367
diff --git a/ircd/s_auth.c b/ircd/s_auth.c
index ff245d6..e250ae6 100644
--- a/ircd/s_auth.c
+++ b/ircd/s_auth.c
@@ -84,6 +84,7 @@ enum AuthRequestFlag {
AR_IAUTH_HURRY, /**< we told iauth to hurry up */
AR_IAUTH_USERNAME, /**< iauth sent a username (preferred or forced) */
AR_IAUTH_FUSERNAME, /**< iauth sent a forced username */
+ AR_IAUTH_SOFT_DONE, /**< iauth has no objection to client */
AR_PASSWORD_CHECKED, /**< client password already checked */
AR_NUM_FLAGS
};
@@ -791,7 +792,8 @@ int auth_ping_timeout(struct Client *cptr)
/* Check for iauth timeout. */
if (FlagHas(&auth->flags, AR_IAUTH_PENDING)) {
- if (IAuthHas(iauth, IAUTH_REQUIRED)) {
+ if (IAuthHas(iauth, IAUTH_REQUIRED)
+ && !FlagHas(&auth->flags, AR_IAUTH_SOFT_DONE)) {
sendheader(cptr, REPORT_FAIL_IAUTH);
return exit_client_msg(cptr, cptr, &me, "Authorization Timeout");
}
@@ -1880,6 +1882,22 @@ static struct ConfItem *auth_find_class_conf(const char
*class_name)
return aconf;
}
+/** Tentatively accept a client in IAuth.
+ * @param[in] iauth Active IAuth session.
+ * @param[in] cli Client referenced by command.
+ * @param[in] parc Number of parameters.
+ * @param[in] params Optional class name for client.
+ * @return Negative (CPTR_KILLED) if the connection is refused, one otherwise.
+ */
+static int iauth_cmd_soft_done(struct IAuth *iauth, struct Client *cli,
+ int parc, char **params)
+{
+ /* Clear iauth pending flag. */
+ assert(cli_auth(cli) != NULL);
+ FlagSet(&cli_auth(cli)->flags, AR_IAUTH_SOFT_DONE);
+ return 1;
+}
+
/** Accept a client in IAuth.
* @param[in] iauth Active IAuth session.
* @param[in] cli Client referenced by command.
@@ -2099,6 +2117,7 @@ static void iauth_parse(struct IAuth *iauth, char
*message)
case 'I': handler = iauth_cmd_ip_address; has_cli = 1; break;
case 'M': handler = iauth_cmd_usermode; has_cli = 1; break;
case 'C': handler = iauth_cmd_challenge; has_cli = 1; break;
+ case 'd': handler = iauth_cmd_soft_done; has_cli = 1; break;
case 'D': handler = iauth_cmd_done_client; has_cli = 1; break;
case 'R': handler = iauth_cmd_done_account; has_cli = 1; break;
case 'k': /* The 'k' command indicates the user should be booted
commit 3cfdd224928b767bf33e7de2507b6cad3bcfe3ba
Author: Michael Poole <[email protected]>
Date: Thu Jan 19 21:48:30 2012 -0500
Move DNS and auth lookups after starting IAuth.
When start_dns_query() ran before start_iauth_query(), clients from
localhost would not have their IAuth 'N' message sent because ircu had
not started the IAuth query for that client.
diff --git a/ircd/s_auth.c b/ircd/s_auth.c
index 2a00dd1..ff245d6 100644
--- a/ircd/s_auth.c
+++ b/ircd/s_auth.c
@@ -1020,12 +1020,6 @@ void start_auth(struct Client* client)
}
auth->port = remote.port;
- /* Try to start DNS lookup. */
- start_dns_query(auth);
-
- /* Try to start ident lookup. */
- start_auth_query(auth);
-
/* Set required client inputs for users. */
if (IsUserPort(client)) {
cli_user(client) = make_user(client);
@@ -1037,6 +1031,12 @@ void start_auth(struct Client* client)
start_iauth_query(auth);
}
+ /* Try to start DNS lookup. */
+ start_dns_query(auth);
+
+ /* Try to start ident lookup. */
+ start_auth_query(auth);
+
/* Add client to GlobalClientList. */
add_client_to_list(client);
-----------------------------------------------------------------------
Summary of changes:
doc/readme.iauth | 12 ++++++++++++
ircd/s_auth.c | 33 ++++++++++++++++++++++++++-------
2 files changed, 38 insertions(+), 7 deletions(-)
hooks/post-receive
--
Undernet IRC Server Source Code.
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches