how to restrict access of FIFO-pipes to two dedicated processes?
From: bine (sabine.hubrig-schaumburg_at_sungard.de)
Date: 04/16/04
- Previous message: Bill Marcum: "Re: HowTo convert "seconds since `00:00:00 1970-01-01 UTC" into a human readable date"
- Next in thread: those who know me have no need of my name: "Re: how to restrict access of FIFO-pipes to two dedicated processes?"
- Reply: those who know me have no need of my name: "Re: how to restrict access of FIFO-pipes to two dedicated processes?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 16 Apr 2004 07:40:08 -0700
I want to use a pipe to directly zip data written out of a
(MF-cobol-)programm, because the I/O for writing the amount of
uncompressed data costs more time (at a special customer's
configuration) than the CPU for the additional zipping...
so I create the pipe with
mknod MYPIPE p
(in fact inside of the Cobolprogram by making a systemcall)
I start the zipping with
gzip -1 < MYPIPE > MYPIPE.gz &
(equally from COB)
and then I write into the pipe using this "file" MYPIPE for normal
OPEN OUTPUT,
when I CLOSE the file, the gzip is finished and the data is ok...
BUT:
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". Recuding the normal fileaccessrights
(chmod go-rw ...) only reduces the problem but still gives a
percentage of risk, as my user still can "steal" data by simply
calling more, head, ... and receiving some bytes which were meant for
the gzip.
I tried this damage "successfully" on AIX 5.2 as well as on Linux
(2.4.21-198-smp #1 SMP Thu Mar 11 17:56:49 UTC 2004 i686 unknown).
I can't believe that there should be no command to restrict the
access, but I fear it might be somewhere deep inside the coding of the
operatingsystemcalls and not usable as simple shellscript-syntax?
- Previous message: Bill Marcum: "Re: HowTo convert "seconds since `00:00:00 1970-01-01 UTC" into a human readable date"
- Next in thread: those who know me have no need of my name: "Re: how to restrict access of FIFO-pipes to two dedicated processes?"
- Reply: those who know me have no need of my name: "Re: how to restrict access of FIFO-pipes to two dedicated processes?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|