[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mkstemp
From: |
Eric Blake |
Subject: |
Re: mkstemp |
Date: |
Wed, 27 Apr 2011 16:48:29 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9 |
On 04/27/2011 04:37 PM, Bruno Haible wrote:
> Eric Blake wrote:
>>> +# On some hosts, mkstemp creates files with mode 0666, which is a security
>>> +# problem.
>>
>> Also, it was valid in POSIX 2001, but violates POSIX 2008.
>
> What about mkstemps? Does it have the same problem as mkstemp?
In all my testing, I couldn't even find one of the "older platforms"
where mkstemp used 0666 instead of 0600 - HP-UX 10.20 has broken
mkstemp, but still had correct permissions.
mkstemps is a newer interface, not yet standardized in POSIX - any
platform new enough to implement it is already starting from a decent
mkstemp interface.
> The answer is fortunately "no". The platforms x symbols matrix shows that
> mkstemps() is defined on MacOS X, FreeBSD, OpenBSD, Solaris 11, and Cygwin
> 1.7.
Which matches the fact that mkstemps is newer.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: mkstemp, (continued)
- Re: mkstemp, Reuben Thomas, 2011/04/27
- Re: mkstemp, Eric Blake, 2011/04/27
- [PATCH] mkstemp: replace if system version uses wrong permissions, Eric Blake, 2011/04/27
- Re: [PATCH] mkstemp: replace if system version uses wrong permissions, Reuben Thomas, 2011/04/27
- Re: [PATCH] mkstemp: replace if system version uses wrong permissions, Eric Blake, 2011/04/27
- Re: [PATCH] mkstemp: replace if system version uses wrong permissions, Bruno Haible, 2011/04/27
- Re: mkstemp, Bruno Haible, 2011/04/27
- Re: mkstemp,
Eric Blake <=