Deleted Added
full compact
tmpnam.3 (167652) tmpnam.3 (208027)
1.\" Copyright (c) 1988, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the American National Standards Committee X3, on Information
6.\" Processing Systems.
7.\"
8.\" Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)tmpnam.3 8.2 (Berkeley) 11/17/93
1.\" Copyright (c) 1988, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the American National Standards Committee X3, on Information
6.\" Processing Systems.
7.\"
8.\" Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)tmpnam.3 8.2 (Berkeley) 11/17/93
33.\" $FreeBSD: head/lib/libc/stdio/tmpnam.3 167652 2007-03-16 21:46:24Z maxim $
33.\" $FreeBSD: head/lib/libc/stdio/tmpnam.3 208027 2010-05-13 12:07:55Z uqs $
34.\"
35.Dd March 18, 2007
36.Dt TMPFILE 3
37.Os
38.Sh NAME
39.Nm tempnam ,
40.Nm tmpfile ,
41.Nm tmpnam

--- 170 unchanged lines hidden (view full) ---

212.Fn tempnam
213function
214may fail and set
215.Va errno
216for any of the errors specified for the library functions
217.Xr malloc 3
218or
219.Xr mktemp 3 .
34.\"
35.Dd March 18, 2007
36.Dt TMPFILE 3
37.Os
38.Sh NAME
39.Nm tempnam ,
40.Nm tmpfile ,
41.Nm tmpnam

--- 170 unchanged lines hidden (view full) ---

212.Fn tempnam
213function
214may fail and set
215.Va errno
216for any of the errors specified for the library functions
217.Xr malloc 3
218or
219.Xr mktemp 3 .
220.Sh SEE ALSO
221.Xr mkstemp 3 ,
222.Xr mktemp 3
223.Sh STANDARDS
224The
225.Fn tmpfile
226and
227.Fn tmpnam
228functions
229conform to
230.St -isoC .
220.Sh SECURITY CONSIDERATIONS
221The
222.Fn tmpnam
223and
224.Fn tempnam
225functions are susceptible to a race condition
226occurring between the selection of the file name
227and the creation of the file,
228which allows malicious users
229to potentially overwrite arbitrary files in the system,
230depending on the level of privilege of the running program.
231Additionally, there is no means by which
232file permissions may be specified.
233It is strongly suggested that
234.Xr mkstemp 3
235be used in place of these functions.
236(See
237the FSA.)
231.Sh SECURITY CONSIDERATIONS
232The
233.Fn tmpnam
234and
235.Fn tempnam
236functions are susceptible to a race condition
237occurring between the selection of the file name
238and the creation of the file,
239which allows malicious users
240to potentially overwrite arbitrary files in the system,
241depending on the level of privilege of the running program.
242Additionally, there is no means by which
243file permissions may be specified.
244It is strongly suggested that
245.Xr mkstemp 3
246be used in place of these functions.
247(See
248the FSA.)
238.Sh SEE ALSO
239.Xr mkstemp 3 ,
240.Xr mktemp 3
241.Sh STANDARDS
242The
243.Fn tmpfile
244and
245.Fn tmpnam
246functions
247conform to
248.St -isoC .