Page 2 of 2

Posted: Thu Feb 09, 2006 11:01 am
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.

Posted: Thu Feb 09, 2006 2:52 pm
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

Posted: Fri Feb 10, 2006 2:05 pm
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

Posted: Fri Feb 10, 2006 2:24 pm
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

Posted: Tue Feb 14, 2006 5:47 pm
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 ;).

Posted: Tue Feb 14, 2006 9:53 pm
by aquanight
Out of curiosity, would that hostname be subsequently cloaked with all the +x stuff? :)

Posted: Tue Feb 14, 2006 9:55 pm
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 ;)

Posted: Fri Feb 17, 2006 12:43 pm
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).

Posted: Sat Feb 18, 2006 8:38 am
by [UnDeRTaKeR]
hi! long time no see...
thats very good news,
thanks Syzop for the support, ;)

Posted: Sat Feb 18, 2006 4:53 pm
by Stealth
This sounds fun... Release 3.2.5 tomorrow plz

Posted: Mon Feb 27, 2006 5:50 am
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!