[PATCH 3/5] Restrict known_hooks to only sub-directories of hookdir

James Laska jlaska at redhat.com
Tue Sep 21 20:59:42 UTC 2010


On Tue, 2010-09-21 at 16:05 -0400, Kamil Paral wrote:
> ----- "James Laska" <jlaska at redhat.com> wrote:
> 
> > ---
> >  autoqa |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> > diff --git a/autoqa b/autoqa
> > index e6bd8c9..56aea8e 100755
> > --- a/autoqa
> > +++ b/autoqa
> > @@ -181,7 +181,8 @@ if not os.path.isdir(conf['hookdir']):
> >      print "Can't find hooks in %s. Check your installation." %
> > conf['hookdir']
> >      sys.exit(1)
> >  # known hooks = dirs in hookdir
> > -known_hooks = [d for d in os.listdir(conf['hookdir'])]
> > +# FIXME - would be nice to have some way to determine what makes a
> > hook valid
> 
> What about creating /usr/share/autoqa/hooks and putting all hooks there?
> That way we can be sure that just hooks are there and nothing else.

I like that idea.  I'll work up something and send to the list later
this week.

Thanks,
James



More information about the autoqa-devel mailing list