[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: checks/scripts / checkbashsims updates



On Mon, 2008-02-18 at 16:33 -0800, Russ Allbery wrote:
> "Adam D. Barratt" <adam@adam-barratt.org.uk> writes:
> 
> > Please let me know how you'd prefer to handle these, and any such issues
> > that arise in future. I'm more than happy to simply provide a list (as
> > below), send patches to the list or file bugs against lintian with
> > patches.
> 
> Either patches to the list or bugs against lintian with a list would be
> ideal for me.

Okay, thanks. I'll bear that in mind.

[...]
> > The second issue that was highlighted is the check for arguments being
> > passed to scripts that are sourced (i.e. ". foo bar"). There are a
> > number of constructs that the current check flags, which so far as I can
> > tell are all legitimate:
> >
> >         . ${sysconfdir}/pop3d; \
> >         . ${sysconfdir}/pop3d-ssl ; \
> >         . `dirname $0`/guilt
> >         
> > I've modified the check to:
> >
> >         if (not $found and m/^\s*(\.\s+[^\s;]+\s+([^\s]+))/) {
> >
> > which allows all of the above. The only problem I've found with it is
> > that constructs such as
> >
> >         . `foo bar` `foobar baz`
> >
> > aren't flagged, but IMHO that's the lesser of two evils.
> 
> I assume that you mean [^\s;\`] here instead of only ;.  Done similarly in
> lintian.

I didn't, but it works better, so I do now. :-) The final [^\s]+ group
alwo wants to be [^\s;]+ or

. ${sysconfdir}/pop3d-ssl ; \

is still flagged. (Adding ` to that group didn't seem to make any
difference to my test expressions).

Adam


Reply to: