Nick Andrew
1998-Mar-11 21:55 UTC
Re: [linux-security] Re: Re: Towards a solution of tmp-file problems (fwd)
Forwarding a message from Steve \"Stevers!\" Coile:> This is already possible. Create the file then unlink it. The file > contents aren''t deleted and i-node isn''t released until the file is > closed.Without kernel support, unlinking the file at creation time requires a code change in the process which creates the file. And this doesn''t protect scripts which use temp files for communication between their subprocesses, e.g. #!/bin/sh cat > /tmp/a.$$ awk '' { print $1 } '' < /tmp.a.$$ | sort -o /tmp/field1.$$ awk '' { print $2 } '' < /tmp.a.$$ | sort -o /tmp/field2.$$ paste /tmp/field1.$$ /tmp/field2.$$ rm -f /tmp/a.$$ /tmp/field1.$$ /tmp/field2.$$ exit 0 A private namespace protects this script and its subprocesses by making the files _totally_ inaccessible to unrelated processes. The private namespace can be imposed from above or the script can define its own. Nick. -- Zeta Internet SP4 Fax: +61-2-9233-6545 Voice: 9231-9400 G.P.O. Box 3400, Sydney NSW 1043 http://www.zeta.org.au/
Seemingly Similar Threads
- Re: Re: Re: Re: Towards a solution of tmp-file problems (fwd)
- Re: message rejected: Re: Re: Towards a solution of tmp-file problems.
- Re: Re: Towards a solution of tmp-file problems
- sorting in 'merge'
- rspec model testing - test on user defined validation- How do I test that the create failed.