Subject: Re: per-user /tmp
To: Jason Thorpe <thorpej@shagadelic.org>
From: SODA Noriyuki <soda@sra.co.jp>
List: tech-security
Date: 02/06/2007 09:15:09
>>>>> On Sun, 4 Feb 2007 20:34:47 -0800,
      Jason Thorpe <thorpej@shagadelic.org> said:

>> is it how mac's /private/tmp is used?
>> if you follow their naming, it's better to follow their semantics as  
>> well.

> OS X's /private/tmp is kind of a hold-over from NeXTSTEP -- IIRC, / 
> private on NeXTSTEP was intended to be "private to this  
> machine" (think of shared /). 

So, MacOS X is using somewhat legacy convention from NeXTSTEP.
It seems the toplevel directory in NeXTSTEP is what modern UNIX
variants call /var.

> On OS X, /tmp is simply a symlink to / 
> private/tmp.
	:
> That said, OS X does have per-user temporary space:
> thorpej-mbp:thorpej$ cd /tmp/
> thorpej-mbp:thorpej$ ls -la
	:
>    0 drwx------  2 thorpej  wheel    102 Feb  4 20:04 501/

So, if NetBSD follows what MacOS does, the per user directory must be
/tmp/$UID, because NetBSD doesn't use a symlink for /tmp.

Or, if we'd like to avoid using /tmp (I guess this is what elad wants),
a directory under /var (e.g. /var/perusertmp/$USER) seems appropriate
for me.

Unless there is concrete reason to have /private instead of /var,
I think we shouldn't introduce new toplevel hierarchy.
-- 
soda