#1977 mq_open lacks support of "mode" argument

Bran S archsbran at gmail.com
Wed Feb 5 06:57:43 UTC 2020


Trying to solve ticket https://devel.rtems.org/ticket/1977

The mode parameter sets access permissions for the created message queue.
Examples:
S_IRUSR  00400 user has read permission
S_IWUSR  00200 user has write permission
S_IXUSR  00100 user has execute permission
Complete list is at: http://man7.org/linux/man-pages/man2/open.2.html

https://github.com/RTEMS/rtems/blob/master/cpukit/posix/src/mqueueopen.c#L176
Is this is the place where we need to take care of the mode argument ?

I am thinking we would need to store the mode bits in
POSIX_Message_queue_Control structure.(Ref:
https://github.com/RTEMS/rtems/blob/master/cpukit/include/rtems/posix/mqueue.h#L57)

Then every time the created queue is accessed we would use the mode
bits to check if the accessor is allowed to access the queue.

Please share your thoughts on solving this.


More information about the devel mailing list