summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2010-12-27 21:18:44 +0000
committermillert <millert@openbsd.org>2010-12-27 21:18:44 +0000
commit7f21d708d84aeb64b39d44c1ba615ff9b1f8b13d (patch)
tree9b6e70012bf2dfa6ae1a5e963e8b1dd2c8a55502
parentCorrect x86_atomic_*_ul() to operate on 64bit integers, eliminate (diff)
downloadwireguard-openbsd-7f21d708d84aeb64b39d44c1ba615ff9b1f8b13d.tar.xz
wireguard-openbsd-7f21d708d84aeb64b39d44c1ba615ff9b1f8b13d.zip
mktemp(3) (and thus mktemp(1)) no longer use the process ID when
replacing the Xs, it is now purely random. Also replace a use of .Fn that should be .Xr. OK jmc@
-rw-r--r--lib/libc/stdio/mktemp.35
-rw-r--r--usr.bin/mktemp/mktemp.19
2 files changed, 6 insertions, 8 deletions
diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3
index 2ec0e325c86..00d850beb12 100644
--- a/lib/libc/stdio/mktemp.3
+++ b/lib/libc/stdio/mktemp.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mktemp.3,v 1.44 2010/03/22 20:18:12 schwarze Exp $
+.\" $OpenBSD: mktemp.3,v 1.45 2010/12/27 21:18:44 millert Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: March 22 2010 $
+.Dd $Mdocdate: December 27 2010 $
.Dt MKTEMP 3
.Os
.Sh NAME
@@ -248,7 +248,6 @@ to any value specified by the
function.
.Sh SEE ALSO
.Xr chmod 2 ,
-.Xr getpid 2 ,
.Xr lstat 2 ,
.Xr mkdir 2 ,
.Xr open 2 ,
diff --git a/usr.bin/mktemp/mktemp.1 b/usr.bin/mktemp/mktemp.1
index f132af6922a..90094ce3ebe 100644
--- a/usr.bin/mktemp/mktemp.1
+++ b/usr.bin/mktemp/mktemp.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mktemp.1,v 1.25 2007/05/31 19:20:13 jmc Exp $
+.\" $OpenBSD: mktemp.1,v 1.26 2010/12/27 21:18:44 millert Exp $
.\"
.\" Copyright (c) 1996, 2000, 2001 Todd C. Miller <Todd.Miller@courtesan.com>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: December 27 2010 $
.Dt MKTEMP 1
.Os
.Sh NAME
@@ -48,8 +48,7 @@ flag is implied (see below).
.Pp
The trailing
.Ql X Ns s
-are replaced with a combination of the current process number and
-random letters.
+are replaced with a unique digit and letter combination.
The name chosen depends both on the number of
.Ql X Ns s
in the
@@ -138,7 +137,7 @@ The temp file will be unlinked before
.Nm
exits.
This is slightly better than
-.Fn mktemp 3
+.Xr mktemp 3
but still introduces a race condition.
Use of this option is not encouraged.
.El