CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_11_05
Commit time: 2003-08-30 11:49:26 UTC
Modified files:
Tag: u2_10_11_05
ChangeLog ircd/gline.c
Log message:
Author: hikari <[EMAIL PROTECTED]>
Log message:
Hopefuly fixes a bug with malformed realname GLINEs (ie missing the R
after the $) causing the server to wibbly. Unfortunatly I can't get
gnuworld to compile so this hasn't actually been tested.
bb
hikari
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.128.2.29 ircu2.10/ChangeLog:1.290.2.128.2.30
--- ircu2.10/ChangeLog:1.290.2.128.2.29 Sun Jul 13 05:10:37 2003
+++ ircu2.10/ChangeLog Sat Aug 30 04:49:16 2003
@@ -1,3 +1,8 @@
+2003-08-28 hikari <[EMAIL PROTECTED]>
+ * ircd/gline.c: Throw a protocol_violation if we get sent an
+ invalid GLINE with $ in it (suspected cause of recent core where
+ a GLINE was missing the R after $ to denote relanme.
+
2003-07-13 hikari <[EMAIL PROTECTED]>
* ircd/IPcheck.c: Fixed (another) overflow problem in
ip_registry_check_local()
Index: ircu2.10/ircd/gline.c
diff -u ircu2.10/ircd/gline.c:1.38.2.7.4.1 ircu2.10/ircd/gline.c:1.38.2.7.4.2
--- ircu2.10/ircd/gline.c:1.38.2.7.4.1 Sat Apr 19 04:06:28 2003
+++ ircu2.10/ircd/gline.c Sat Aug 30 04:49:16 2003
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: gline.c,v 1.38.2.7.4.1 2003/04/19 11:06:28 isomer Exp $
+ * $Id: gline.c,v 1.38.2.7.4.2 2003/08/30 11:49:16 shad0w Exp $
*/
#include "config.h"
@@ -347,16 +347,19 @@
host = 0;
} else if (*userhost == '$'
# ifndef NO_OLD_GLINE
- || userhost[2] == '$'
+ || userhost[2] == '$'
# endif /* OLD_GLINE */
- ) {
- switch (*userhost == '$' ? userhost[1] : userhost[3]) {
- case 'R': flags |= GLINE_REALNAME; break;
- default:
- /* uh, what to do here? */
- break;
- }
- user = (*userhost =='$' ? userhost : userhost+2);
+ ) {
+ switch (*userhost == '$' ? userhost[1] : userhost[3]) {
+ case 'R': flags |= GLINE_REALNAME; break;
+ default:
+ /* uh, what to do here? */
+ /* The answer, my dear Watson, is we throw a protocol_violation()
+ -- hikari */
+ return protocol_violation(sptr,"%s has been smoking the sweet leaf and sent
me a whacky gline",cli_name(sptr));
+ break;
+ }
+ user = (*userhost =='$' ? userhost : userhost+2);
} else {
canon_userhost(userhost, &user, &host, "*");
if (sizeof(uhmask) <
----------------------- End of diff -----------------------