Unix questions - Re: how to restrict access of FIFO-pipes to two dedicated

This is Interesting: Free IT Magazines  
Home > Archive > Unix questions > April 2004 > Re: how to restrict access of FIFO-pipes to two dedicated





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: how to restrict access of FIFO-pipes to two dedicated
those who know me have no need of my name

2004-04-18, 10:42 am

in comp.unix.questions i read:

>if someone on purpose or by accident accesses the pipe in the meantime
>during my usage, there will be a lack of data, as this pipe is open to
>all usage as long as it "lives".


>I can't believe that there should be no command to restrict the access,


there are no such commands, not even the notion, in a classical unix-ish
system. some modern systems may have acl's you can apply (though they tend
to be highly system specific) or you can use the classic solution of
removing the file after the reader (gzip) has it open -- neither are atomic
so there is still a period of time which is vulnerable.

an example of the later, which should executed via a single call to the
shell is:

mknod apipe$$ p ; gzip -1 < apipe$$ > apipe$$.gz & rm -f apipe$$

i've used $$ so that the same program running more than one at a time will
not destroy each other's files. whether that's appropriate you will have
to decide.

--
a signature
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com