Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2007-01-16 01:21:47 UTC

Modified files:
  Tag: u2_10_12_branch
     ChangeLog doc/readme.iauth include/s_auth.h ircd/m_user.c
     ircd/s_auth.c

Log message:

Pass the other two USER parameters to iauth.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.136 ircu2.10/ChangeLog:1.710.2.137
--- ircu2.10/ChangeLog:1.710.2.136      Mon Jan 15 16:52:46 2007
+++ ircu2.10/ChangeLog  Mon Jan 15 17:21:35 2007
@@ -1,3 +1,14 @@
+2006-01-15  Michael Poole <[EMAIL PROTECTED]>
+
+       * doc/readme.iauth (U): Document extended fields.
+
+       * include/s_auth.h (auth_set_user): Declare new parameters.
+
+       * ircd/m_user.c (m_user): Pass new parameters.
+
+       * ircd/s_auth.c (auth_set_user): Accept new parameters.  When
+       using Undernet extensions, forward them to the iauth process.
+
 2006-01-14  Michael Poole <[EMAIL PROTECTED]>
 
        * ircd/os_generic.c (os_recv_nonb): Set errno to zero when
Index: ircu2.10/doc/readme.iauth
diff -u ircu2.10/doc/readme.iauth:1.1.2.2 ircu2.10/doc/readme.iauth:1.1.2.3
--- ircu2.10/doc/readme.iauth:1.1.2.2   Thu Mar 23 16:29:55 2006
+++ ircu2.10/doc/readme.iauth   Mon Jan 15 17:21:36 2007
@@ -162,14 +162,15 @@
   enabled by requesting the A policy.
 
 U - Client Username
-Syntax: <id> U <username> :<userinfo ...>
-Example: 5 U buddha :Gautama Siddhartha
+Syntax: <id> U <username> <hostname> <servername> :<userinfo ...>
+Example: 5 U buddha bodhisattva.example.com irc.undernet.org :Gautama 
Siddhartha
 States: REGISTER(1+)
 Next State: -
 Comments: Indicates the client's claimed username and "GECOS"
-  information.  This information is not reliable.  This message is
-  enabled by requesting the A policy.
-Compatibility: ircd does not include the <userinfo> data.
+  information, along with client hostname and server name.  This
+  information is not reliable.  This message is enabled by requesting
+  the A policy.
+Compatibility: ircd only sends the <username> parameter.
 
 u - Client Username
 Syntax: <id> u <username>
Index: ircu2.10/include/s_auth.h
diff -u ircu2.10/include/s_auth.h:1.6.2.3 ircu2.10/include/s_auth.h:1.6.2.4
--- ircu2.10/include/s_auth.h:1.6.2.3   Sun May  7 18:55:08 2006
+++ ircu2.10/include/s_auth.h   Mon Jan 15 17:21:36 2007
@@ -17,7 +17,7 @@
  */
 /** @file
  * @brief Interface for DNS and ident lookups.
- * @version $Id: s_auth.h,v 1.6.2.3 2006/05/08 01:55:08 entrope Exp $
+ * @version $Id: s_auth.h,v 1.6.2.4 2007/01/16 01:21:36 entrope Exp $
  */
 #ifndef INCLUDED_s_auth_h
 #define INCLUDED_s_auth_h
@@ -36,7 +36,7 @@
 extern void start_auth(struct Client *);
 extern int auth_ping_timeout(struct Client *);
 extern int auth_set_pong(struct AuthRequest *auth, unsigned int cookie);
-extern int auth_set_user(struct AuthRequest *auth, const char *username, const 
char *userinfo);
+extern int auth_set_user(struct AuthRequest *auth, const char *username, const 
char *hostname, const char *servername, const char *userinfo);
 extern int auth_set_nick(struct AuthRequest *auth, const char *nickname);
 extern int auth_set_password(struct AuthRequest *auth, const char *password);
 extern int auth_cap_start(struct AuthRequest *auth);
Index: ircu2.10/ircd/m_user.c
diff -u ircu2.10/ircd/m_user.c:1.9.2.1 ircu2.10/ircd/m_user.c:1.9.2.2
--- ircu2.10/ircd/m_user.c:1.9.2.1      Wed Feb 15 19:49:54 2006
+++ ircu2.10/ircd/m_user.c      Mon Jan 15 17:21:37 2007
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_user.c,v 1.9.2.1 2006/02/16 03:49:54 entrope Exp $
+ * $Id: m_user.c,v 1.9.2.2 2007/01/16 01:21:37 entrope Exp $
  */
 
 /*
@@ -139,6 +139,6 @@
 
   info     = (EmptyString(parv[4])) ? "No Info" : parv[4];
 
-  return auth_set_user(cli_auth(cptr), username, info);
+  return auth_set_user(cli_auth(cptr), username, parv[2], parv[3], info);
 }
 
Index: ircu2.10/ircd/s_auth.c
diff -u ircu2.10/ircd/s_auth.c:1.37.2.20 ircu2.10/ircd/s_auth.c:1.37.2.21
--- ircu2.10/ircd/s_auth.c:1.37.2.20    Wed Jul  5 20:45:04 2006
+++ ircu2.10/ircd/s_auth.c      Mon Jan 15 17:21:37 2007
@@ -31,7 +31,7 @@
  */
 /** @file
  * @brief Implementation of DNS and ident lookups.
- * @version $Id: s_auth.c,v 1.37.2.20 2006/07/06 03:45:04 entrope Exp $
+ * @version $Id: s_auth.c,v 1.37.2.21 2007/01/16 01:21:37 entrope Exp $
  */
 #include "config.h"
 
@@ -1043,10 +1043,14 @@
 /** Record a user's claimed username and userinfo.
  * @param[in] auth Authorization request for client.
  * @param[in] username Client's asserted username.
+ * @param[in] hostname Third argument of USER command (client's
+ *   hostname, per RFC 1459).
+ * @param[in] servername Fourth argument of USER command (server's
+ *   name, per RFC 1459).
  * @param[in] userinfo Client's asserted self-description.
  * @return Zero if client should be kept, CPTR_KILLED if rejected.
  */
-int auth_set_user(struct AuthRequest *auth, const char *username, const char 
*userinfo)
+int auth_set_user(struct AuthRequest *auth, const char *username, const char 
*hostname, const char *servername, const char *userinfo)
 {
   struct Client *cptr;
 
@@ -1059,7 +1063,7 @@
   ircd_strncpy(cli_user(cptr)->username, username, USERLEN);
   ircd_strncpy(cli_user(cptr)->host, cli_sockhost(cptr), HOSTLEN);
   if (IAuthHas(iauth, IAUTH_UNDERNET))
-    sendto_iauth(cptr, "U %s :%s", username, userinfo);
+    sendto_iauth(cptr, "U %s %s %s :%s", username, hostname, servername, 
userinfo);
   else if (IAuthHas(iauth, IAUTH_ADDLINFO))
     sendto_iauth(cptr, "U %s", username);
   return check_auth_finished(auth);
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to