mkstemp.3: Deemphasize discussion of mode 066 in glibc 2.0.6

Glibc 2.0.6 is now so ld that the discussion of details
of that version can be deemphasized placing just under
NOTES.

See https://bugzilla.kernel.org/show_bug.cgi?id=51811

Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2012-12-20 16:22:58 +01:00
parent cab67c641a
commit 35d740b95e
1 changed files with 5 additions and 4 deletions

View File

@ -30,7 +30,7 @@
.\" Modified 990328, aeb
.\" 2008-06-19, mtk, Added mkostemp(); various other changes
.\"
.TH MKSTEMP 3 2012-04-21 "GNU" "Linux Programmer's Manual"
.TH MKSTEMP 3 2012-12-21 "GNU" "Linux Programmer's Manual"
.SH NAME
mkstemp, mkostemp, mkstemps, mkostemps \- create a unique temporary file
.SH SYNOPSIS
@ -89,8 +89,6 @@ must not be a string constant, but should be declared as a character array.
The file is created with
permissions 0600, that is, read plus write for owner only.
(In glibc versions 2.06 and earlier, the file is created with permissions 0666,
that is, read and write for all users.)
The returned file descriptor provides both read and write access to the file.
The file is opened with the
.BR open (2)
@ -187,9 +185,12 @@ and
.BR mkostemps ():
are glibc extensions.
.SH NOTES
The old behavior of creating a file with mode 0666 may be
In glibc versions 2.06 and earlier, the file is created with permissions 0666,
that is, read and write for all users.
This old behavior may be
a security risk, especially since other UNIX flavors use 0600,
and somebody might overlook this detail when porting programs.
POSIX.1-2008 adds a requirement that the file be created with mode 0600.
More generally, the POSIX specification of
.BR mkstemp ()