[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lost Irc administrator.



Here is the same patch for version 2.10.3p5.


Kurt


On Sat, Jan 31, 2004 at 10:27:42PM -0500, Gregory Cohen wrote:
> Actually the people are scattered around the country, two from 
> overseas, several have to connect when traveling. Perhaps inter-office 
> is a better term. We all telecommute. Most of the users are novices, 
> using an irc Java interface. This is great for them, but causes all 
> sorts of issues because the system has in recent times been abused by 
> folks who "know what they are doing", not from our group.
> 
> I can't be the only person who has this need.
> 
> I looked at the code and the patch, and it seems that the whole join 
> mechanism had a major re-write since the point this was done. I suspect 
> the theory would be the same, but in my attempt to dope out the code, 
> the documentation in the code left me a bit flummoxed.  It appears that 
> the join command deals with the room count differently from the old 
> version.
> 
> Now this patch should would on irc2.10a3, I have been unable to find a 
> copy of this version, heck, even the python patch does not work at all 
> on a modern system.
> 
> How insecure would you think an old version of ircd like this would be? 
> Since we are not connecting to anything, I don't know how concerned I 
> should be. In your experience, should I be?
> 
> I'll look at the code of that patch again, and see if I can find 
> parallels, but I fear, unless I dope out the whole server, I won't 
> understand how to do this, and while it may come to that, I'm not sure 
> that I am up to a task of that size.
> 
> I know if someone did this, the irc server with a java interface would 
> become a major player in the single room chat market, and it is a large 
> market. Ever politician in the world tries to have something like this, 
> and none works as well. It might be good for the industry if there was 
> an open source solution used by every politician out there, instead of 
> in my case, the board of the World Yo-Yo Contest.
> 
> -GReg
> 
> 
> 
> On Jan 31, 2004, at 6:50 PM, Kurt Roeckx wrote:
> 
> >On Sat, Jan 31, 2004 at 05:18:27PM -0500, Gregory Cohen wrote:
> >>I am trying to set up an IRCd server where I can either limit the
> >>creation of channels to a fixed number, or limit who (an op) can 
> >>create
> >>a new channel. I want to use this in a in office situation, and we've
> >>had trouble with folks using the IRC server as a way to launch DDOS
> >>attacks, and just to use our resources. We are not on any net, but we
> >>are having trouble.
> >
> >If you only use this in the office, I suggest you only allow
> >people from your office to connect to it in the first place.
> >This could mean put proper I-lines and/or use a firewall.
> >
> >>I found a patch from 1988:
> >>
> >>http://web.irc.org/mla/ircd-users/1998/msg00240.html
> >>
> >>
> >>but nothing more recent that this.
> >>
> >>Any hints of where to go or what to do?
> >
> >This should still work, if you adjust it a little.
> >
> >
> >Kurt
> >
diff -ur irc2.10.3p5/ircd/channel.c irc2.10.3p5+join_irc_op/ircd/channel.c
--- irc2.10.3p5/ircd/channel.c	Sat Oct 11 13:03:23 2003
+++ irc2.10.3p5+join_irc_op/ircd/channel.c	Sun Feb  1 13:42:22 2004
@@ -2221,6 +2221,15 @@
 			return exit_client(sptr, sptr, &me, "Virus Carrier");
 		    }
 
+#ifdef IRCOPCHANNELCREATE
+		if (MyConnect(sptr) && !find_channel(name, (aChannel *)NULL) &&
+			!IsAnOper(sptr))
+		{
+			sendto_one(sptr, err_str(ERR_NOPRIVILEGES, parv[0]));
+			return 2;
+		}
+#endif
+
 		chptr = get_channel(sptr, name, CREATE);
 
 		if (IsMember(sptr, chptr))
diff -ur irc2.10.3p5/support/config.h.dist irc2.10.3p5+join_irc_op/support/config.h.dist
--- irc2.10.3p5/support/config.h.dist	Sat Oct 11 15:25:14 2003
+++ irc2.10.3p5+join_irc_op/support/config.h.dist	Sun Feb  1 13:44:15 2004
@@ -487,6 +487,15 @@
 #define MAXCHANNELSPERUSER  10	/* Recommended value: 10 */
 
 /*
+ * If set, only IRC operators can create new channels. This
+ * can be used on small, customised IRC servers where you want to
+ * restrict what channels people can join.
+ * NOTE: Do NOT enable it on reasonably-sized IRC networks if you are
+ * sane.
+ */
+#undef IRCOPCHANNELCREATE
+
+/*
  * USE_IAUTH makes ircd use the iauth program for authentication.
  * it can always be overriden by using the -s switch
  */