Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2005-08-31 00:13:05 UTC

Modified files:
     ChangeLog include/channel.h ircd/channel.c

Log message:

Make references to channel password lengths consistent.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.685 ircu2.10/ChangeLog:1.686
--- ircu2.10/ChangeLog:1.685    Tue Aug 30 04:45:32 2005
+++ ircu2.10/ChangeLog  Tue Aug 30 17:12:55 2005
@@ -1,5 +1,13 @@
 2005-08-30  Michael Poole <[EMAIL PROTECTED]>
 
+       * include/channel.h (PASSLEN): Remove; use KEYLEN instead.
+
+       * ircd/channel.c (mode_parse_upass): Likewise.
+       (mode_parse_apass): Likewise.
+       The inconsistency (in clean_key()) was reported by Reed.
+
+2005-08-30  Michael Poole <[EMAIL PROTECTED]>
+
        * RELEASE.NOTES: Document +D and +d channel modes.
 
 2005-08-29  Michael Poole <[EMAIL PROTECTED]>
@@ -13,6 +21,7 @@
        (mode_parse_key): Use it, and check that keys do not start with :.
        (mode_parse_upass): Likewise, and adjust for ERR_NOMANAGER.
        (mode_parse_apass): Likewise.
+       The key and password changes fix bugs reported by coekie.
 
 2005-08-27  Michael Poole <[EMAIL PROTECTED]>
 
Index: ircu2.10/include/channel.h
diff -u ircu2.10/include/channel.h:1.51 ircu2.10/include/channel.h:1.52
--- ircu2.10/include/channel.h:1.51     Mon Jun 20 06:22:45 2005
+++ ircu2.10/include/channel.h  Tue Aug 30 17:12:55 2005
@@ -19,7 +19,7 @@
  */
 /** @file
  * @brief Channel management and maintenance.
- * @version $Id: channel.h,v 1.51 2005/06/20 13:22:45 a1kmm Exp $
+ * @version $Id: channel.h,v 1.52 2005/08/31 00:12:55 entrope Exp $
  */
 #ifndef INCLUDED_channel_h
 #define INCLUDED_channel_h
@@ -45,7 +45,6 @@
 #define MODEBUFLEN      200    /**< Maximum length of a mode */
 
 #define KEYLEN          23     /**< Maximum length of a key */
-#define PASSLEN         23     /**< Maximum length of a password */
 #define CHANNELLEN      200    /**< Maximum length of a channel */
 
 #define MAXJOINARGS    15      /**< number of slots for join buffer */
@@ -248,8 +247,8 @@
   unsigned int mode;
   unsigned int limit;
   char key[KEYLEN + 1];
-  char upass[PASSLEN + 1];
-  char apass[PASSLEN + 1];
+  char upass[KEYLEN + 1];
+  char apass[KEYLEN + 1];
 };
 
 #define BAN_IPMASK         0x0001  /**< ban mask is an IP-number mask */
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.147 ircu2.10/ircd/channel.c:1.148
--- ircu2.10/ircd/channel.c:1.147       Mon Aug 29 14:39:26 2005
+++ ircu2.10/ircd/channel.c     Tue Aug 30 17:12:55 2005
@@ -19,7 +19,7 @@
  */
 /** @file
  * @brief Channel management and maintenance
- * @version $Id: channel.c,v 1.147 2005/08/29 21:39:26 entrope Exp $
+ * @version $Id: channel.c,v 1.148 2005/08/31 00:12:55 entrope Exp $
  */
 #include "config.h"
 
@@ -2527,7 +2527,7 @@
 
   if (state->flags & MODE_PARSE_SET) {
     if (state->dir == MODE_ADD) /* set the new upass */
-      ircd_strncpy(state->chptr->mode.upass, t_str, PASSLEN);
+      ircd_strncpy(state->chptr->mode.upass, t_str, KEYLEN);
     else /* remove the old upass */
       *state->chptr->mode.upass = '\0';
   }
@@ -2635,7 +2635,7 @@
   if (state->flags & MODE_PARSE_SET) {
     if (state->dir == MODE_ADD) { /* set the new apass */
       /* Make it VERY clear to the user that this is a one-time password */
-      ircd_strncpy(state->chptr->mode.apass, t_str, PASSLEN);
+      ircd_strncpy(state->chptr->mode.apass, t_str, KEYLEN);
       if (MyUser(state->sptr)) {
        send_reply(state->sptr, RPL_APASSWARN_SET, state->chptr->mode.apass);
        send_reply(state->sptr, RPL_APASSWARN_SECRET, state->chptr->chname,
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to