Re: [PATCH] unifdef: set a secure umask before calling mkstemp()

2012-08-20 Thread Tony Finch
Bastien ROUCARIES wrote: > > have you tried gnulib for improving portability ? My strategy is to try to avoid using anything outside the standard C89 library. Tony. -- f.anthony.n.finchhttp://dotat.at/ Forties, Cromarty: East, veering southeast, 4 or 5, occasionally 6 at first. Rough,

Re: [PATCH] unifdef: set a secure umask before calling mkstemp()

2012-08-20 Thread Bastien ROUCARIES
On Sat, Aug 18, 2012 at 1:43 AM, Tony Finch wrote: > Jesper Juhl wrote: > >> In newer glibc's (versions > 2.06) reasonably secure permissions of >> 0600 are used when creating a temporary file with mkstemp(). But for >> older glibc's (versions <= 2.06) 0666 is used which is not secure. > >

Re: [PATCH] unifdef: set a secure umask before calling mkstemp()

2012-08-20 Thread Bastien ROUCARIES
On Sat, Aug 18, 2012 at 1:43 AM, Tony Finch d...@dotat.at wrote: Jesper Juhl j...@chaosbits.net wrote: In newer glibc's (versions 2.06) reasonably secure permissions of 0600 are used when creating a temporary file with mkstemp(). But for older glibc's (versions = 2.06) 0666 is used which is

Re: [PATCH] unifdef: set a secure umask before calling mkstemp()

2012-08-20 Thread Tony Finch
Bastien ROUCARIES roucaries.bast...@gmail.com wrote: have you tried gnulib for improving portability ? My strategy is to try to avoid using anything outside the standard C89 library. Tony. -- f.anthony.n.finch d...@dotat.at http://dotat.at/ Forties, Cromarty: East, veering southeast, 4 or

Re: [PATCH] unifdef: set a secure umask before calling mkstemp()

2012-08-19 Thread Jesper Juhl
On Sat, 18 Aug 2012, Tony Finch wrote: > Jesper Juhl wrote: > > > In newer glibc's (versions > 2.06) reasonably secure permissions of > > 0600 are used when creating a temporary file with mkstemp(). But for > > older glibc's (versions <= 2.06) 0666 is used which is not secure. > > Thanks for

Re: [PATCH] unifdef: set a secure umask before calling mkstemp()

2012-08-19 Thread Jesper Juhl
On Sat, 18 Aug 2012, Tony Finch wrote: Jesper Juhl j...@chaosbits.net wrote: In newer glibc's (versions 2.06) reasonably secure permissions of 0600 are used when creating a temporary file with mkstemp(). But for older glibc's (versions = 2.06) 0666 is used which is not secure. Thanks

Re: [PATCH] unifdef: set a secure umask before calling mkstemp()

2012-08-17 Thread Tony Finch
Jesper Juhl wrote: > In newer glibc's (versions > 2.06) reasonably secure permissions of > 0600 are used when creating a temporary file with mkstemp(). But for > older glibc's (versions <= 2.06) 0666 is used which is not secure. Thanks for your suggestion! I'm afraid I prefer not to make the

[PATCH] unifdef: set a secure umask before calling mkstemp()

2012-08-17 Thread Jesper Juhl
In newer glibc's (versions > 2.06) reasonably secure permissions of 0600 are used when creating a temporary file with mkstemp(). But for older glibc's (versions <= 2.06) 0666 is used which is not secure. To ensure that the temporary files created always have reasonably secure permissions, add a

[PATCH] unifdef: set a secure umask before calling mkstemp()

2012-08-17 Thread Jesper Juhl
In newer glibc's (versions 2.06) reasonably secure permissions of 0600 are used when creating a temporary file with mkstemp(). But for older glibc's (versions = 2.06) 0666 is used which is not secure. To ensure that the temporary files created always have reasonably secure permissions, add a

Re: [PATCH] unifdef: set a secure umask before calling mkstemp()

2012-08-17 Thread Tony Finch
Jesper Juhl j...@chaosbits.net wrote: In newer glibc's (versions 2.06) reasonably secure permissions of 0600 are used when creating a temporary file with mkstemp(). But for older glibc's (versions = 2.06) 0666 is used which is not secure. Thanks for your suggestion! I'm afraid I prefer not