On Friday 30 April 2004 1:02 pm, Andre Poenitz wrote:
> > Shall I add this to tempfile.C? It would become:
> >
> > inline
> > int make_tempfile(char * templ)
> > {
[...snip contents..]
> > }
>
> Unrelated, but: why inline?
Shrug. No reason AFAICS. I'll remove the offending word.
Angus
On Fri, Apr 30, 2004 at 09:43:13AM +0100, Angus Leeming wrote:
> Reading the Secure-Programs-HOWTO, I see that it suggests creating
> temporary files with reduced permissions, using umask(2).
> http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/avoid-race.html
>
> /* C
Angus Leeming wrote:
> Shall I add this to tempfile.C? It would become:
IMO yes: The amount of extra code is small, so it does not hurt even if it
is needed only in rare circumstances.
Georg
Reading the Secure-Programs-HOWTO, I see that it suggests creating
temporary files with reduced permissions, using umask(2).
http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/avoid-race.html
/* Create file with restrictive permissions */
old_mode = umask(077);
temp_fd = mkstemp