On Thu, 16 Feb 2006, Marc Haber wrote:
> How about setting umask 077, creating an fopen wrapper which takes a
> mode as well, and adding code to the testsuite that greps through the
> code and raises an alarm whenever it finds an unwrapped fopen() call
> outside the wrapper itself?
There is already a wrapper for opening msglogs, so I guess extending it
makes sense (but I can't remember if it uses fopen() or open()). Having
the test suite grep the code does not fit into the test suite design
(which doesn't require you to have the source available). Although it
could be extended, I'm not sure it is the right thing to do.
I already have a "Detrail" script that removes trailing spaces from the
source. This could perhaps be extended, but on the other hand, this is
just ONE coding "standard", for an issue that might never arise again.
The "right" thing to do would be to create a more comprehensive
"eximlint" script that checked for lots of things. Maybe one day, when
I'm tired of watching flying pigs... :-) Seriously, I can't see myself
finding time soon.
--
Philip Hazel University of Cambridge Computing Service
Get the Exim 4 book: http://www.uit.co.uk/exim-book