[20431] in bugtraq

home help back first fref pref prev next nref lref last post

Re: Linux patches to solve /tmp race problem

daemon@ATHENA.MIT.EDU (Chris Wright)
Wed Apr 25 03:47:32 2001

Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Message-ID:  <20010423153042.A17422@figure1.int.wirex.com>
Date:         Mon, 23 Apr 2001 15:30:42 -0700
Reply-To: Chris Wright <chris@WIREX.COM>
From: Chris Wright <chris@WIREX.COM>
To: BUGTRAQ@SECURITYFOCUS.COM
In-Reply-To:  <15072.12895.627024.191687@localhost.localdomain>; from
              matthew@DATADELIVERANCE.COM on Fri, Apr 20,
              2001 at 10:28:07PM +0930

* Donaldson, Matthew (matthew@DATADELIVERANCE.COM) wrote:
> Hi all,
>
> I have recently developed some patches to the Linux 2.2 kernels which solve
> the /tmp race problem without needing to define environment variables -
> useful particularly for naive applications and scripts which dont use
> TMPDIR and friends.
>
> The patch creates "dynamic" symlinks, which point to different paths
> depending on the user accessing them (for example, including the UID in the
> path name).  Such a link can be placed instead of /tmp and/or /var/tmp, and
> any other similar directories.  More usefully, these links can be configured
> to automatically create the directory they refer to if it does not exist.
>
> This means you can create a directory such as /tmp_files, for example, and
> have the /tmp link automatically create user directories in it on demand.
> Default permissions and ownership can be specified.
>
> The patches are available from http://www.datadeliverance.com in the Linux
> Patches section, along with a full discussion of the issues involved.  Your
> comments on the scheme are invited.

After reading the explanation of your work, I missed how you can actually have
global data in the /tmp directory.  For example, /tmp/.font-unix or
/tmp/.X11-unix.

-chris

home help back first fref pref prev next nref lref last post