Subject: [Boost-bugs] [Boost C++ Libraries] #7273: Files created by boost::iostreams::mapped_file have unexpected permissions on Linux
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-24 11:35:40
#7273: Files created by boost::iostreams::mapped_file have unexpected permissions
on Linux
----------------------------------------------------+-----------------------
Reporter: Mika Fischer <mika.fischer@â¦> | Owner: turkanis
Type: Bugs | Status: new
Milestone: To Be Determined | Component: iostreams
Version: Boost 1.51.0 | Severity: Problem
Keywords: |
----------------------------------------------------+-----------------------
The mapped_file class opens the file unconditionally via:
{{{
#!c++
::open(p.path.c_str(), flags, S_IRWXU);
}}}
Which sets the permissions to read, write, execute for the owner and no
permissions for group or others.
This is quite unexpected, and since it cannot be changed by the caller, I
think a more sane default behavior would be to just use the default of
open and let the user's umask decide the permission of newly created
files.
I.e. just remove the last parameter:
{{{
#!c++
::open(p.path.c_str(), flags);
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7273> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC