3.2.4 + cgiirc host module

These are old archives. They are kept for historic purposes only.
el_Misry
Posts: 3
Joined: Wed Feb 08, 2006 3:19 pm

Post by el_Misry »

well i have added an except on the mask where the cgi is located. i guess i'll just go back to the previous version of unreal and hope that someone will update de cgiirc module in the future since it could be of great importance to alot of users. thnx for your help.
Last edited by el_Misry on Thu Feb 09, 2006 5:51 pm, edited 1 time in total.
Hal9000
Posts: 6
Joined: Mon Mar 29, 2004 12:47 am
Contact:

Post by Hal9000 »

i tried too commenting out line 46, it compiles, loads and works...
but as soon as a cgi user disconnects from the net, the ircd crashes...
so I'm back to 3.2.3 now :(
hal
Karl

Post by Karl »

Hi

You should be able to fix the error on line 46 by changing:

Code: Select all

extern int		find_tkline_match(aClient *, int);
To

Code: Select all

extern int		(*find_tkline_match)(aClient *, int);
Apparantly this doesn't break any of the tkline checking code in the module. However, I've yet to try banning a cgi-irc user. I fixed this module up while I was using my cgi-irc server as a test for Unreal3.2.4, so my production server isn't running the new Unreal/module yet.

As for the crash when clients disconnect, you should try commenting out line 334:

Code: Select all

cptr->hostp = gethostbyname(p->host);
I believe this line causes problems because of the new resolver code. Note that you will lose the ability to confirm that the cgi-irc user's hostname resolve both ways (their fdns and rdns match) if you remove this!

Edit: While you could use the temp hostent to validate the DNS, the code in the module appears to only fire off the warning, but not revoke the invalid hostname (correct me if I'm wrong). Using gethostbyname() in connection events probably isn't a good idea either - it blocks, and could freeze your IRCd for a while if the DNS servers you're trying to query are down or your DNS is misconfigured.

You should only use these changes if you can't wait for someone to make a proper solution.

I make no guarantees that this code will make the module stable so make sure you don't load it into a production server before testing.

Best wishes,

Karl
Last edited by Karl on Fri Feb 10, 2006 3:18 pm, edited 1 time in total.
Hal9000
Posts: 6
Joined: Mon Mar 29, 2004 12:47 am
Contact:

Post by Hal9000 »

dude, thanks!
the cgi module now works... when quitting the ircd doesnt crash anymore.
also, i am able to /kill /gline without problems
although this is a temporary solution, at least i can use 3.2.4 now :)
hal
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop »

I've added CGI:IRC support in UnrealIRCd itself in current CVS (unreal3_2_fixes branch):

Code: Select all

- Added CGI:IRC host spoofing support. This means you can mark specific CGI:IRC gateways as
  "trusted" and the IRCd will show the users' _real_ host/ip everywhere on IRC, instead of the
  host/ip of the CGI:IRC-gateway.
  To do so you must set 'realhost_as_password' to 1 in your cgiirc.conf. And add the
  CGI:IRC gateway(s) you fully trust to set::cgiirc::hosts.
It seems to work fine for me, though that is of course no guarantee ;).
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

Out of curiosity, would that hostname be subsequently cloaked with all the +x stuff? :)
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop »

Basically, we just fill in the IP and hostname everywhere in the client/user struct before the client is fully connected, so everything goes as usual, including +x ;).

Of course cloaking is useless if you have 'encoded_ip' in cgiirc.config set to anything other than 0, but that's another story ;)
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop »

Oh btw, I basically rewrote it yesterday. The CGI:IRC stuff is now configured in cgiirc { } blocks.
Also, the prefered way is now the webirc_password way instead of realhost_as_password (see link).
[UnDeRTaKeR]
Posts: 84
Joined: Mon Nov 21, 2005 6:15 am
Location: Cuba

Post by [UnDeRTaKeR] »

hi! long time no see...
thats very good news,
thanks Syzop for the support, ;)
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

This sounds fun... Release 3.2.5 tomorrow plz
SpaceDoG
Posts: 301
Joined: Mon Feb 27, 2006 5:44 am
Contact:

Post by SpaceDoG »

I must confess the dev version is very very nice. I need the CGI:IRC module for my network and was kinda upset when I went to 3.2.4 but since I put in the dev version that Syzop was talkin about things are rather nice. CGIIRC itself took the config change just fine and my users get their ip added very easily. It's loverly I must confess. Thanks Unreal dev team!
Post Reply