View Issue Details

IDProjectCategoryView StatusLast Update
0004306unrealircdpublic2014-04-14 21:06
Reporteridentity Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionwont fix 
Product Version3.2.8 
Summary0004306: Finer granularity for can_localroute
DescriptionMy network and I need for various reasons to be able to assign an oper permissions that allows them to do nothing else but /sconnect a node in the event of a netsplit. It seems "can_localroute" lets an oper CONNECT as well as SQUIT, and the latter is not desired.
I set out to simply patch the daemon myself, and I do believe I have done most of the work.

I have added a new oper flag in the appropriate places, made sure it gets parsed properly by the config parser code and so on. I then set out to modify src/modules/m_connect.c which I understand deals with this command.

The oper definition in the configuration file contains only custom flag in the flag section. After adding a check in m_connect.c, I still get told I have incorrect ircop privs. Trying to understand what was going on, I added some code into m_connect.c to log some of the state and so on, but it doesn't appear that this code ever gets executed.

I assume that the privileges are getting checked somewhere else before the module is even executed, but I cannot for the life of me find out where, in spite of countless grep and scrolling through thousands of lines of code.

I would be very grateful if I could get some tips on how it would be best to do this task, if I'm going about it the wrong way, or just some explanations on how/where oper commands and privileges are being handled before the module code gets executed.

Regards,
3rd party modules

Activities

Stealth

2014-04-13 18:00

reporter   ~0018133

This can be done much easier using a module rather than modifying the IRCd (which we do not support doing, and will continue upholding our policy). In a module just override the SQUIT command and only allow the oper levels you want to run the command.

My m_restrictrehash module does a similar function by restricting the REHASH command to netadmins only. This would be the best place to start when trying to achieve what you are wanting. The m_restrictrehash module is available at http://unreal.x-tab.org/mods

As for this being changed in UnrealIRCd, being able to CONNECT and SQUIT is part of the can_localroute feature to give opers with that flag the ability to correct and disconnect servers as needed to keep the network properly linked.

For further discussion about UnrealIRCd permissions and modules, I recommend creating a post on our forums, http://forums.unrealircd.com.

syzop

2014-04-14 21:06

administrator   ~0018135

Hmm. okay. I guess Stealth referred you to some code that may be of help ;)

As for your feature request, you could post this in 0004157 which is a thread about how granular oper permissions should be. Unfortunately very little feedback there. It wouldn't really help you to get this feature fast, but if you got some good feedback it would be appreciated.

Issue History

Date Modified Username Field Change
2014-04-13 16:55 identity New Issue
2014-04-13 18:00 Stealth Note Added: 0018133
2014-04-13 18:00 Stealth Status new => closed
2014-04-13 18:00 Stealth Resolution open => wont fix
2014-04-14 21:06 syzop Note Added: 0018135