boostorg / boostorg/interprocess

Named mutex might not value permissions correctly

Open
#84 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
185
Forks
131
PR merge metrics
No merged PRs in 30d

Description

Hi!

When using a named_mutex within POSIX, and setting the Permissions Object, everything boils down to an ::sem_open call. There, the permissions are passed. But ::sem_open masks the permissions with the processes umask. Therefore, the semaphore might not have 0666 permissions, but e.g. 644, even though, permissions were passed with set_unrestricted().

Workaround there would be setting umask to 0 before ::sem_open, and restoring again after.
At least, this behaviour should be documented.

Regards,

Matthias

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.