<br><tt><font size=2>Eric Blake <eblake@redhat.com> wrote on 04/07/2010
05:15:12 PM:<br>
<br>
</font></tt>
<br><tt><font size=2>> <br>
> On 04/07/2010 03:02 PM, Stefan Berger wrote:<br>
> >> If this is a bash test, you need to update the #!.<br>
> >> Otherwise, you have to give up on local variables.<br>
> > <br>
> > I'll change this to be a bash script. No point in making the
test program <br>
> > portable across shells.<br>
> > <br>
> >>> +  tmpfile=`mktemp`<br>
> >>> +  tmpfile2=`mktemp`<br>
> >><br>
> >> Not all systems have mktemp; is it worth adding fallback
code in that <br>
> > case?<br>
> > <br>
> > Hm, two hardcoded files like '/tmp/nwfiltervmtest1' and <br>
> > '/tmp/nwfiltervmtest2' could actually be a replacement, no?<br>
> <br>
> Yeah, but names that obvious are prone to DoS attacks.  If you
are<br>
> assuming bash, you can at least use $RANDOM to get past the worst
of the<br>
> security hole in being that blatant.  Or, as long as we are assuming<br>
> bash and linux, you could just skip the test if mktemp doesn't exist.</font></tt>
<br>
<br><tt><font size=2>Alright, alright. I'll write a function that simulates
mktemp if not available using the ${RANDOM} suffix.</font></tt>
<br><tt><font size=2>Though I hope nobody will DoS attack this test suite
program :-)</font></tt>
<br><tt><font size=2><br>
> <br>
> >> My review stops here - shell is my area of expertise, but
my Linux<br>
> >> network filtering knowledge is sparse.<br>
> > <br>
> > Ok. Thanks for the review. Will adapt and re-post.<br>
> <br>
> Well, one of the joys of open source is that you can have multiple<br>
> reviewers, each with different angles of expertise, with a cumulative<br>
> review better than any one person could give.</font></tt>
<br>
<br><tt><font size=2>Yeah, definitely a good thing.</font></tt>
<br>
<br><tt><font size=2>   Stefan</font></tt>
<br><tt><font size=2><br>
> <br>
> -- <br>
> Eric Blake   eblake@redhat.com    +1-801-349-2682<br>
> Libvirt virtualization library </font></tt><a href=http://libvirt.org/><tt><font size=2>http://libvirt.org</font></tt></a><tt><font size=2><br>
> <br>
> [attachment "signature.asc" deleted by Stefan Berger/Watson/IBM]
</font></tt>