Bug#495193: predictable filename if too short template used

2008-08-15 Thread Riku Voipio
On Fri, Aug 15, 2008 at 12:04:22PM +0200, Dirk Wetter wrote: > Am 15.08.2008 11:21, Riku Voipio schrieb: > >>mktemp /tmp/$0.$$.X > > > >The problem here is that you are using too short template. Try: > > > >mktemp /tmp/$0.$$.XXX > > The problem with that is that scripts wi

Bug#495193: predictable filename if too short template used

2008-08-15 Thread Dirk Wetter
Am 15.08.2008 12:05, Sven Joachim schrieb: On 2008-08-15 11:21 +0200, Riku Voipio wrote: using only 5 * X as in your version makes your app quite possibly brute-forceable. Not really, to make mktemp fail with 5 X's an attacker would have to create 52^5 = 380204032 file names, which would prob

Bug#495193: predictable filename if too short template used

2008-08-15 Thread Dirk Wetter
Am 15.08.2008 11:21, Riku Voipio schrieb: mktemp /tmp/$0.$$.X The problem here is that you are using too short template. Try: mktemp /tmp/$0.$$.XXX The problem with that is that scripts with X>=6 are not portable to other Unices. And to compensate Debian's ineffective

Bug#495193: predictable filename if too short template used

2008-08-15 Thread Sven Joachim
On 2008-08-15 11:21 +0200, Riku Voipio wrote: >> mktemp /tmp/$0.$$.X > > The problem here is that you are using too short template. Try: > > mktemp /tmp/$0.$$.XXX > > using only 5 * X as in your version makes your app quite possibly > brute-forceable. Not really, to make

Bug#495193: predictable filename if too short template used

2008-08-15 Thread Riku Voipio
> mktemp /tmp/$0.$$.X The problem here is that you are using too short template. Try: mktemp /tmp/$0.$$.XXX using only 5 * X as in your version makes your app quite possibly brute-forceable. > This is the way it should be (Opensuse): I suspect opensuse uses the gnu co