Skip to content

Named mutex might not value permissions correctly #84

Open

Description

@DasRoteSkelett

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

Activity

  1. romainreignier commented on Feb 27, 2024

    @romainreignier

    Indeed, the chmod is commented here without any documentation or workaround described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions