I'm developing some programs in C that intercommunicate through message queue.
So for example in th开发者_如何学Pythone two programs there is a line like this:
msgget(key, 0666 | IPC_CREAT);
They share the same key and the same message structure.
However was wondering: What about the security?
If another program write messages on the same queue of the two above could be a problem for me. Do you have any kind of suggestion for dealing with security in the meaning of authentication and authorization?
Thanks a lot, Andrea
With 0666
permissions any process can access the message queue. You can make it more secure by using more restrictive permissions like 0600
so only the current user can access it.
精彩评论