Bug#344553: [Logcheck-devel] Bug#344553: logcheck: Fails silently to read config file

Maximilian Attems max at sternwelten.at
Mon Jan 2 11:37:27 UTC 2006


On Mon, Jan 02, 2006 at 04:44:37AM -0500, Todd Troxell wrote:
> On Sun, Jan 01, 2006 at 08:15:16PM +0200, Markus Peuhkuri wrote:
> > Todd Troxell wrote:
> > > I see your point.  The config is not really essential.
> > > 
> > > What do you think about this:
> > > 
> > > if [ -f $CONFFILE -a -r $CONFFILE]; then
> > 
> > The problem is still that if CONFFILE is somehow mistyped, it still
> > fails silently even if the fragment fixes the error I had with
> > permissions.  For my view the correct operation would be following:
> > 
> > 1) if CONFFILE (from command line) is set, use it.  If it does not
> > exists or is unreadable, issue an error
> > 
> > 2) if CONFFILE is not set, but the default CONFFILE exists AND is
> > readable use it
> > 
> > 3) if default CONFFILE exists, but is unreadable, provide an error

no the debian packaging takes care of that,
no need to issue an error in that case.
if you change the permissions of the CONFFILE you are on your own.

> > 4) if default CONFFILE does not exists, use defauls
> 
> This sounds right to me.  I've patched CVS similar to the below.
> Thanks again.

cool thanks todd for integrating.
i'm ok with most, beside aboves point 3)

> > if [ -r $CONFFILE ]; then
> >   . $CONFFILE
> > elif [ -f $CONFFILE ]; then  # this provides 3)
> >   error "Config file $CONFFILE unreadable"
> > fi

nacked.

--
maks





More information about the Logcheck-devel mailing list