Modify

Opened 7 years ago

Closed 7 years ago

#4250 closed Bugs (fixed)

Interprocess tmp folder permission denied problem

Reported by: josephsieh@… Owned by: igaztanaga
Milestone: Boost 1.45.0 Component: interprocess
Version: Boost 1.44.0 Severity: Problem
Keywords: Cc:

Description

shmData = new shared_memory_object (

create_only, shmDataName, read_write

);

When shared_memory_object is created, IPC will create a tmp folder "boost_interprocess" in "C:\ProgramData?" folder under Windows VISTA+, and in "/tmp" under Mac. Then start to create a file under "boost_interprocess" directory.

The issue happens when user A call the IPC (C:\ProgramData?\boost_interprocess" will be created), then switch to another user B account, try to call the IPC again, then IPC will fail, due to "boost_interprocess" is already created by user A, therefore, user B has no permission to write anything into created "boost_interprocess" folder.

A quick fix of this problem might be modification of "inline void get_tmp_base_dir(std::string &tmp_name)" function in "boost/interprocess/detail/tmp_dir_helpers.hpp".

In line 103, instead of using the same "/boost_interprocess", maybe "boost_interprocess_$username" will be a solution for multiple users problem.

This issue exists at least from 1.40.0 to 1.43.0.

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by igaztanaga

  • Milestone changed from Boost 1.43.0 to Boost-1.45.0
  • Resolution set to fixed
  • Status changed from new to closed

Fixed for Boost 1.45 in release branch (folder is created without all access).

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain igaztanaga.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.