Re: bogoutil and realpath
David Relson <[email protected]>
| Newsgroups | gmane.mail.bogofilter.devel |
|---|---|
| Organization | Osage Software Systems, Inc. |
| Message-ID | <[email protected]> |
On Wed, 20 Apr 2005 21:15:28 -0400 David Relson wrote: > 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 thought has made it apparent that there are additional factors affecting the need (or lack thereof) for path checking. The check for matching paths is needed to ensure that multiple databases use the same database environment. So it only applies when transactions are enabled and doesn't apply to bogoutil (which only uses a single database). _______________________________________________ Bogofilter-dev mailing list [email protected] http://www.bogofilter.org/mailman/listinfo/bogofilter-dev