iauth: Send an empty "u" message on ident lookup failure.
authorMichael Poole <mdpoole@troilus.org>
Fri, 25 Apr 2014 00:27:03 +0000 (20:27 -0400)
committerMichael Poole <mdpoole@troilus.org>
Fri, 25 Apr 2014 00:27:03 +0000 (20:27 -0400)
Otherwise an iauthd might wait indefinitely (i.e. too long) before trying
to make a decision on the client.

doc/readme.iauth
ircd/s_auth.c

index 54a011f6a24989c327a12c2b0a55b45fb3c98449..1962d9cd5a9ddc2b8273818d11879167fd883c1b 100644 (file)
@@ -174,12 +174,14 @@ Compatibility: ircd only sends the <username> parameter.
 
 u - Client Username
 Syntax: <id> u <username>
+Syntax: <id> u
 Example: 5 u notbuddha
 States: REGISTER(1)
 Next State: -
 Comments: Indicates a more reliable username for the client.
 Compatibility: This is an Undernet extension and ircd does not send
   it.  It is enabled by the iauth instance requesting the U policy.
+  If the identd lookup fails for a user, no username is passed.
 
 n - Client Nickname
 Syntax: <id> n <nickname>
index ddeabbc38d8d3e2c00efed37bcd07ce1eac4203b..83693a24a48125df9150291bdddfcaabc5c59e36 100644 (file)
@@ -679,6 +679,8 @@ static void read_auth_reply(struct AuthRequest* auth)
     if (IsUserPort(auth->client))
       sendheader(auth->client, REPORT_FAIL_ID);
     ++ServerStats->is_abad;
+    if (IAuthHas(iauth, IAUTH_UNDERNET))
+      sendto_iauth(auth->client, "u");
   } else {
     if (IsUserPort(auth->client))
       sendheader(auth->client, REPORT_FIN_ID);