If I have some sensitive data to transfer between two processes, I can create a named FIFO in /tmp
and delete it after use. I want to know if this me开发者_开发技巧thod secure? How easy will it be to break the FIFO?
I know there are several ways to perform IPC(inter-processes communication), but IMHO, pipe is not ideal since it sometimes left buffered data on harddisk; shared memory is secure but not always feasible.
The short answer would be no. Fifo's are just named pipes that any process can use. Instead I believe that you can assign permissions to these pipes which is called file locking and you can say say which users,groups,others have what privileges to using these pipes. Though it depends what your trying to keep your info safe from. I'd imagine you could encrypt your data so that at any point your info is compromised, the attacker will end up with jibberish. I would look up file locking if I were you. Beejs IPC guide is pretty good, though most people have seen that material and it can sometimes be lacking. Other than that good luck.
精彩评论