]> git.saurik.com Git - apple/libc.git/blame - stdio/FreeBSD/mktemp.3.patch
Libc-583.tar.gz
[apple/libc.git] / stdio / FreeBSD / mktemp.3.patch
CommitLineData
34e8f829
A
1--- mktemp.3.orig 2008-02-29 10:45:39.000000000 -0800
2+++ mktemp.3 2008-02-29 11:21:10.000000000 -0800
224c7076
A
3@@ -36,20 +36,33 @@
4 .Dt MKTEMP 3
5 .Os
6 .Sh NAME
7-.Nm mktemp
8+.Nm mkdtemp ,
9+.Nm mkstemp ,
10+.Nm mktemp ,
11+.Nm mktemps
12 .Nd make temporary file name (unique)
13 .Sh LIBRARY
14 .Lb libc
15 .Sh SYNOPSIS
16 .In unistd.h
17 .Ft char *
18-.Fn mktemp "char *template"
19+.Fo mkdtemp
20+.Fa "char *template"
21+.Fc
22 .Ft int
23-.Fn mkstemp "char *template"
24+.Fo mkstemps
25+.Fa "char *template"
26+.Fa "int suffixlen"
27+.Fc
28+.In stdlib.h
29 .Ft int
30-.Fn mkstemps "char *template" "int suffixlen"
31+.Fo mkstemp
32+.Fa "char *template"
33+.Fc
34 .Ft char *
35-.Fn mkdtemp "char *template"
36+.Fo mktemp
37+.Fa "char *template"
38+.Fc
39 .Sh DESCRIPTION
40 The
41 .Fn mktemp
42@@ -137,7 +150,7 @@
43 .Pp
44 The
45 .Fn mkstemp ,
46-.Fn mkstemps
47+.Fn mkstemps ,
48 and
49 .Fn mkdtemp
50 functions
51@@ -171,7 +184,7 @@
52 passes in a read-only string to
53 .Fn mktemp ,
54 .Fn mkstemp ,
55-.Fn mkstemps
56+.Fn mkstemps ,
57 or
58 .Fn mkdtemp .
59 This is common with programs that were developed before
34e8f829
A
60@@ -219,19 +232,19 @@
61 This will ensure that the program does not continue blindly
62 in the event that an attacker has already created the file
63 with the intention of manipulating or reading its contents.
224c7076
A
64+.Sh LEGACY SYNOPSIS
65+.Fd #include <unistd.h>
34e8f829
A
66 .Pp
67-The implementation of these functions calls
68-.Xr arc4random 3 ,
69-which is not reentrant.
70-You must provide your own locking around this and other consumers of the
71-.Xr arc4random 3
72-API.
224c7076
A
73+The include file
74+.In unistd.h
75+is necessary and sufficient for all functions.
76 .Sh SEE ALSO
77 .Xr chmod 2 ,
78 .Xr getpid 2 ,
79 .Xr mkdir 2 ,
80 .Xr open 2 ,
81-.Xr stat 2
82+.Xr stat 2 ,
83+.Xr compat 5
84 .Sh HISTORY
85 A
86 .Fn mktemp