| 
      
      
      From: Bob A. <apt...@cy...> - 2006-10-25 06:24:33
      
     | 
| Hi,
I've run the refactored version for about a day now and I've cleaned up
a runtime warning and added support for Time::HiRes if it's available[1].
Things seem to be working properly. I have to fix the system() call in
sendmail() that's breaking in taint-mode and review the updated 'killing
spree' code (I suspect my quest for portable signal numbers broke some
stuff.) One comment on taint mode: it took a handful of changes to make
it run cleanly in taint mode which is IMHO pretty impressive.
Also, I still have to work out some kinks where it still looks for the
.conf file by default (rather than the .ini file that Config::Tiny
expects) but it's simple to derive an .ini file from the original .conf
file with:
sqlgreyng --configfile=/etc/sqlgrey/sqlgrey.conf --showconfig=minimal \
| tee /etc/sqlgrey/sqlgrey.ini
In my case, it creates a file consisting of:
----
db_pass=******
db_type=mysql
optmethod=optout
reject_code=dunno
----
with all other options set to their defaults. Use the above command with
--showconfig=full to get a file with all the available options (good for
converting an existing .conf file to an .ini) and --showconfig=default
to show only the default settings (good for creating your own first .ini
file.)
To run the script, I modified the Debian init script to call sqlgreyng as:
    /usr/sbin/sqlgreyng --configfile=/etc/sqlgrey/sqlgrey.ini -d
Other than that, it seems to be stable. I think for right now I'm going
to focus on the identified issues, the TODO file, migrating pieces into
a module (`h2xs -AXn` is your friend...) and seeing if Regexp::Optimizer
can help speed things up.
-- Bob
[1] Like Net::CIDR, it's ignored if it's not installed. So far it only
gives more accurate timing stats in cleanup().
 |