开发者

Does umask affect message queues?

开发者 https://www.devze.com 2023-03-19 00:23 出处:网络
In Ubuntu Linux, does changing umask of the system (by calling umask() in a program for example), affect the creation and usage of the IPC facilities like message q开发者_如何学Goueues on the system?F

In Ubuntu Linux, does changing umask of the system (by calling umask() in a program for example), affect the creation and usage of the IPC facilities like message q开发者_如何学Goueues on the system?


From the man page

The umask setting also affects the permissions assigned to POSIX IPC objects (mq_open(3), sem_open(3), shm_open(3)), FIFOs (mkfifo(3)), and UNIX domain sockets (unix(7)) created by the process. The umask does not affect the permissions assigned to System V IPC objects created by the process using msgget(2), semget(2), shmget(2)).

So if your IPC uses the above, then yes. Can you be more specific?

strace myprogram | egrep 'mq_open|sem_open|...' should tell you if you're calling any of these, directly or indirectly.

0

精彩评论

暂无评论...
验证码 换一张
取 消