Re: Secure temporary fifo creation

2004-05-18 Thread Philippe Troin
Goswin von Brederlow <[EMAIL PROTECTED]> writes: > Philippe Troin <[EMAIL PROTECTED]> writes: > > > Not needed... This should be race-free: > > > > char *s; > > while (s = (tempnam("/tmp", "foo")) { > > if (mknod(s, S_IFIFO|0600, 0) == 0) > > break; > > if (errno != EEXIST) > >

Re: Secure temporary fifo creation

2004-05-18 Thread Philippe Troin
Goswin von Brederlow <[EMAIL PROTECTED]> writes: > Philippe Troin <[EMAIL PROTECTED]> writes: > > > Not needed... This should be race-free: > > > > char *s; > > while (s = (tempnam("/tmp", "foo")) { > > if (mknod(s, S_IFIFO|0600, 0) == 0) > > break; > > if (errno != EEXIST) > >

Re: Secure temporary fifo creation

2004-05-18 Thread Goswin von Brederlow
Philippe Troin <[EMAIL PROTECTED]> writes: > Greg Deitrick <[EMAIL PROTECTED]> writes: > >> Hello, >> >> What is the recommended method for securely creating a temporary named pipe >> in >> C code? >> >> Looking at the man pages for various library calls it appears that >> tmpfile(3) >> is p

Re: Secure temporary fifo creation

2004-05-18 Thread Richard Atterer
On Mon, May 17, 2004 at 07:45:17PM -0500, Greg Deitrick wrote: > What is the recommended method for securely creating a temporary named pipe > in > C code? See this for an interesting discussion: http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html You can e.g. adapt the code from the

Re: Secure temporary fifo creation

2004-05-18 Thread Goswin von Brederlow
Philippe Troin <[EMAIL PROTECTED]> writes: > Greg Deitrick <[EMAIL PROTECTED]> writes: > >> Hello, >> >> What is the recommended method for securely creating a temporary named pipe in >> C code? >> >> Looking at the man pages for various library calls it appears that tmpfile(3) >> is probably

Re: Secure temporary fifo creation

2004-05-18 Thread Richard Atterer
On Mon, May 17, 2004 at 07:45:17PM -0500, Greg Deitrick wrote: > What is the recommended method for securely creating a temporary named pipe in > C code? See this for an interesting discussion: http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html You can e.g. adapt the code from the GN

Re: Secure temporary fifo creation

2004-05-17 Thread Philippe Troin
Greg Deitrick <[EMAIL PROTECTED]> writes: > Hello, > > What is the recommended method for securely creating a temporary named pipe > in > C code? > > Looking at the man pages for various library calls it appears that tmpfile(3) > is probably an acceptable means of creating a temporary file, b

Re: Secure temporary fifo creation

2004-05-17 Thread George Georgalis
On Mon, May 17, 2004 at 07:45:17PM -0500, Greg Deitrick wrote: >Hello, > >What is the recommended method for securely creating a temporary named pipe in >C code? > >Looking at the man pages for various library calls it appears that tmpfile(3) >is probably an acceptable means of creating a tempora

Secure temporary fifo creation

2004-05-17 Thread Greg Deitrick
Hello, What is the recommended method for securely creating a temporary named pipe in C code? Looking at the man pages for various library calls it appears that tmpfile(3) is probably an acceptable means of creating a temporary file, but this returns a FILE *. The upstram source I'm packaging

Re: Secure temporary fifo creation

2004-05-17 Thread Philippe Troin
Greg Deitrick <[EMAIL PROTECTED]> writes: > Hello, > > What is the recommended method for securely creating a temporary named pipe in > C code? > > Looking at the man pages for various library calls it appears that tmpfile(3) > is probably an acceptable means of creating a temporary file, but

Re: Secure temporary fifo creation

2004-05-17 Thread George Georgalis
On Mon, May 17, 2004 at 07:45:17PM -0500, Greg Deitrick wrote: >Hello, > >What is the recommended method for securely creating a temporary named pipe in >C code? > >Looking at the man pages for various library calls it appears that tmpfile(3) >is probably an acceptable means of creating a tempora

Secure temporary fifo creation

2004-05-17 Thread Greg Deitrick
Hello, What is the recommended method for securely creating a temporary named pipe in C code? Looking at the man pages for various library calls it appears that tmpfile(3) is probably an acceptable means of creating a temporary file, but this returns a FILE *. The upstram source I'm packaging