[1704] in linux-security and linux-alert archive
[linux-security] Re: Re: Re: Re: Towards a solution of tmp-file
daemon@ATHENA.MIT.EDU (DAVID BALAZIC)
Fri Mar 13 01:44:49 1998
Date: Thu, 12 Mar 1998 11:27:26 +0100 (MET)
From: DAVID BALAZIC <david.balazic@uni-mb.si>
To: linux-security@redhat.com
X-Vms-To: ALPHAM::IN%"linux-security@redhat.com"
Resent-From: linux-security@redhat.com
Reply-To: linux-security@redhat.com
>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.
How about creating a subdir in /tmp with 600 mode and
creating tmp files there ?
--
David Balazic , student
E-mail : 1stein@writeme.com | living in sLOVEnija
home page: http://surf.to/stein
Computer: Amiga 1200 + Quantum LPS-340AT
--
--
----------------------------------------------------------------------
Please refer to the information about this list as well as general
information about Linux security at http://www.aoy.com/Linux/Security.
----------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe test-list-request@redhat.com < /dev/null