* [Bug 51811] New: POSIX now guarantees proper permissions for mkstemp
@ 2012-12-19 9:47 bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
[not found] ` <bug-51811-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
0 siblings, 1 reply; 4+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-12-19 9:47 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=51811
Summary: POSIX now guarantees proper permissions for mkstemp
Product: Documentation
Version: unspecified
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: man-pages
AssignedTo: documentation_man-pages-ztI5WcYan/vQLgFONoPN62D2FQJk+8+b@public.gmane.org
ReportedBy: fweimer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Regression: No
POSIX 2008 says this:
| The mkstemp() function shall create the file, and obtain a file descriptor
for
| it, as if by a call to:
|
| open(filename, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR)
So the warning about permissions is probably obsolete by now.
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <bug-51811-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>]
* [Bug 51811] POSIX now guarantees proper permissions for mkstemp [not found] ` <bug-51811-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/> @ 2012-12-19 9:49 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r 2012-12-20 15:25 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r 2012-12-20 15:37 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r 2 siblings, 0 replies; 4+ messages in thread From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-12-19 9:49 UTC (permalink / raw) To: linux-man-u79uwXL29TY76Z2rM5mHXA https://bugzilla.kernel.org/show_bug.cgi?id=51811 --- Comment #1 from Florian Weimer <fweimer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-12-19 09:49:05 --- The reference to glibc 2.0.6 looks obsolete as well. It was released in 1997, after all. -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 51811] POSIX now guarantees proper permissions for mkstemp [not found] ` <bug-51811-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/> 2012-12-19 9:49 ` [Bug 51811] " bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-12-20 15:25 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r 2012-12-20 15:37 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r 2 siblings, 0 replies; 4+ messages in thread From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-12-20 15:25 UTC (permalink / raw) To: linux-man-u79uwXL29TY76Z2rM5mHXA https://bugzilla.kernel.org/show_bug.cgi?id=51811 Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Resolution| |CODE_FIX --- Comment #2 from Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2012-12-20 15:25:15 --- Thanks for the report, but man-pages tends to have a long memory. Some (few) people will care about this behavior. The POSIX info dates only from 2008. POSIX.1-2001 did not specify that detail. All of that said, the info about old glibc could be deemphasized a little, since it is so old now. So. I've moved it to notes, and added a note about POSIX.1-2008. See the patch below: --- a/man3/mkstemp.3 +++ b/man3/mkstemp.3 @@ -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 () -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 51811] POSIX now guarantees proper permissions for mkstemp [not found] ` <bug-51811-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/> 2012-12-19 9:49 ` [Bug 51811] " bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r 2012-12-20 15:25 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-12-20 15:37 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r 2 siblings, 0 replies; 4+ messages in thread From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-12-20 15:37 UTC (permalink / raw) To: linux-man-u79uwXL29TY76Z2rM5mHXA https://bugzilla.kernel.org/show_bug.cgi?id=51811 --- Comment #3 from Florian Weimer <fweimer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-12-20 15:37:04 --- This looks good to me, thanks. -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-20 15:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-19 9:47 [Bug 51811] New: POSIX now guarantees proper permissions for mkstemp bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
[not found] ` <bug-51811-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
2012-12-19 9:49 ` [Bug 51811] " bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2012-12-20 15:25 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2012-12-20 15:37 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).