bogoutil and realpath

David Relson relson at osagesoftware.com
Thu Apr 21 03:15:28 CEST 2005


Matthias,


Accessibility of the wordlist has been verified by bogoutil before
dbe_init is called.  Part of the success of this check should be to set
bogohome (unless it's already set).

Then, in dbe_init there are calls to realpath (which can generate error
messages) and there's also a strcmp() when can generate a different
message.  Either of the messages is followed by an error exit.  It
seems like some refactoring is possible.

For example, suppose checkpath() did all the checking and message
printing and returned true/false.  Then dbe_inint() could call checkpath
() and error exit if appropriate.

This division of labor would put all the checking logic in one place
and make clear that the top level function is responsible for exit/no-
exit.

By the way, have you read the manpage of realpath?  It says "do not
use" :0

I'll experiment a bit and see where these ideas lead.

David




More information about the bogofilter-dev mailing list