[Boost-bugs] [Boost C++ Libraries] #7369: grow() resets permissions

Subject: [Boost-bugs] [Boost C++ Libraries] #7369: grow() resets permissions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-12 22:01:11


#7369: grow() resets permissions
----------------------------------------------------+-----------------------
 Reporter: Aaron Wright <Aaron_Wright@…> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.49.0 | Severity: Problem
 Keywords: |
----------------------------------------------------+-----------------------
 I need to create shared memory with unrestricted permissions (0666). This
 works fine. When I attempt to grow the shared memory, using the grow()
 function, the permissions get reset to 0644.

 I followed the code a bit and saw that it was using ftruncate.
 Checking the man page for ftruncate reveals, "the set-user-ID and
 set-group-ID permission bits may be cleared." Not sure what affects the
 "may" clause, but it did it every time for me. Umask was set to 0000.

 Obviously this only effects systems using ftruncate. Windows works
 correctly.

 Not sure on what versions may be needed, but:
 libc6 - 2.11.1
 libglib2.0 - 2.24.1
 gcc - 4.4.3

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7369>
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