From sacadmin Wed Apr 25 08:56:38 2007
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3PFubYR003014;
	Wed, 25 Apr 2007 08:56:38 -0700 (PDT)
Received: (from darrenm@localhost)
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id l3PFubcW003010;
	Wed, 25 Apr 2007 08:56:37 -0700 (PDT)
Date: Wed, 25 Apr 2007 08:56:37 -0700 (PDT)
From: Darren J Moffat <darrenm@sac.sfbay.sun.com>
Message-Id: <200704251556.l3PFubcW003010@sac.sfbay.sun.com>
To: PSARC@sac.sfbay.sun.com
Cc: roland.mainz@nrubsig.org, shell-discussion@opensolaris.org
Subject: Default shell environment: TMPDIR [PSARC/2007/236 Timeout:  05/02/2007]
Status: RO
Content-Length: 3028

Subject: PSARC FastTrack [05/02/2007]: Default shell environment: TMPDIR


Template Version: @(#)sac_nextcase %I% %G% SMI
1. Introduction
    1.1. Project/Component Working Name:
	 Default shell environment: TMPDIR
    1.2. Name of Document Author/Supplier:
	 Author:  Roland Mainz
    1.3  Date of This Document:
	25 April, 2007
4. Technical Description

Default shell environment enhancements: TMPDIR

Description and Justification:

This case proposes to introduce a set of enhancements for the default
shell environment in Solaris to provide a more user-friendly environment
for new users which are not yet familar with all the details in Unix and
to provide some help for adminstrators via introducing better system-wide
defaults and more configuration options.

The proposed changes are:

- A modification to "/etc/profile" (and the matching csh file) to set TMPDIR
  to  "/tmp/${LOGNAME}" if TMPDIR was not set yet. If the directory specified
  by  "/tmp/${LOGNAME}" does not exist "/etc/profile"&co. will be responsible
  for creating this directory with the same permissions as the current "/tmp".
  If the directory already exists "/etc/profile"&co. is responsible to check
  whether the directory is owned by the current user (e.g.
  $ /usr/bin/test -O dir #) and writeable (e.g. /usr/bin/test -w dir #),
  if these conditions are not met TMPDIR will not be set.

  The purpose of this change is to provide a "cleaner" layout of the /tmp
  filesystem on large multiuser systems - instead of storing zillions of
  files of various users into one directory it may be better to provide
  something like  a "home directory for temporary files", e.g. create one
  subdir per user to store  the temporary files there. This would allow
  users and adminstrators to find their own temporary files more easily
  and would avoid that something like $ ls -l /tmp #  returns a few thousand
  files of thousands of users.
  
  A disadvantage is that "/tmp" will fill-up with per-user directories over
  time, however this is still better than having all files in one flat
  directory which makes even simple searches for some files difficult if
  the "/tmp"-directory contains too many files (a future sub-project of the
  OpenSolaris.org "shell"  project will look at this problem again and may
  provide at least a simple way to cleanup empry directories).

Notes:
- The TMPDIR is set in "/etc/profile" for the whole machine but users are
  always allowed to override these settings in their local environment
  files (e.g. ~/.profile, ~/.kshrc, ~/.bashrc) on demand.

Interfaces:

Interface	        Stability	Description
=========               =========	===========
env-var "TMPDIR"        Committed       Environment variable to define a
                                        directory where temporary files
                                        should be stored.


6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: FastTrack

From sacadmin Wed Apr 25 12:32:46 2007
Received: from eastmail1bur.East.Sun.COM (eastmail1bur.East.Sun.COM [129.148.9.49])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3PJWkVV018381;
	Wed, 25 Apr 2007 12:32:46 -0700 (PDT)
Received: from thunk.east.sun.com (thunk.East.Sun.COM [129.148.174.66])
	by eastmail1bur.East.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l3PJVrJI013691;
	Wed, 25 Apr 2007 15:31:53 -0400 (EDT)
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by thunk.east.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3PJVrPl006067;
	Wed, 25 Apr 2007 15:31:53 -0400 (EDT)
Subject: Re: 2007/236 TMPDIR in default shell environment
From: Bill Sommerfeld <sommerfeld@sun.com>
To: Darren J Moffat <darrenm@sac.sfbay.sun.com>
Cc: PSARC@sac.sfbay.sun.com, roland.mainz@nrubsig.org,
        shell-discussion@opensolaris.org
In-Reply-To: <200704251556.l3PFubcW003010@sac.sfbay.sun.com>
References: <200704251556.l3PFubcW003010@sac.sfbay.sun.com>
Content-Type: text/plain
Date: Wed, 25 Apr 2007 15:31:52 -0400
Message-Id: <1177529512.4494.15.camel@thunk>
Mime-Version: 1.0
X-Mailer: Evolution 2.8.1.1 
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 1037

(note: I rearranged the subject line to make better use of limited
space)
>   If the directory specified
>   by  "/tmp/${LOGNAME}" does not exist "/etc/profile"&co. will be responsible
>   for creating this directory with the same permissions as the current "/tmp".
>   If the directory already exists "/etc/profile"&co. is responsible to check
>   whether the directory is owned by the current user (e.g.
>   $ /usr/bin/test -O dir #) and writeable (e.g. /usr/bin/test -w dir #),
>   if these conditions are not met TMPDIR will not be set.

I think there's an error in this spec -- the way I read this, TMPDIR
would never get set for any user other than root.

 - file permissions include owner, group, mode, and acl.
 - by default, /tmp is owned by root, group root, mode 01777, no acl.
 - if the per-user subdir is created owned by root, then it would fail
the "owned by the current user" test.

I don't see the rationale, however, for making the per-user subdirs be
mode 01777 ; 0700 or 0711 would make more sense.

						- Bill





From sacadmin Wed Apr 25 12:54:30 2007
Received: from zion.eng.sun.com (zion [129.146.17.75])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3PJsU2Q019320;
	Wed, 25 Apr 2007 12:54:30 -0700 (PDT)
Received: from [129.146.228.109] (cyber [129.146.228.109])
	by zion.eng.sun.com (8.13.7+Sun/8.13.7) with ESMTP id l3PJreFh003987;
	Wed, 25 Apr 2007 12:53:40 -0700 (PDT)
Message-ID: <462FB179.5070600@Sun.COM>
Date: Wed, 25 Apr 2007 12:52:25 -0700
From: Bart Smaalders <bart.smaalders@Sun.COM>
Organization: Sun Microsystems
User-Agent: Thunderbird 2.0b2 (X11/20070227)
MIME-Version: 1.0
To: Bill Sommerfeld <sommerfeld@sun.com>
CC: Darren J Moffat <darrenm@sac.sfbay.sun.com>, PSARC@sac.sfbay.sun.com,
        roland.mainz@nrubsig.org, shell-discussion@opensolaris.org
Subject: Re: 2007/236 TMPDIR in default shell environment
References: <200704251556.l3PFubcW003010@sac.sfbay.sun.com> <1177529512.4494.15.camel@thunk>
In-Reply-To: <1177529512.4494.15.camel@thunk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 1334

Bill Sommerfeld wrote:
> (note: I rearranged the subject line to make better use of limited
> space)
>>   If the directory specified
>>   by  "/tmp/${LOGNAME}" does not exist "/etc/profile"&co. will be responsible
>>   for creating this directory with the same permissions as the current "/tmp".
>>   If the directory already exists "/etc/profile"&co. is responsible to check
>>   whether the directory is owned by the current user (e.g.
>>   $ /usr/bin/test -O dir #) and writeable (e.g. /usr/bin/test -w dir #),
>>   if these conditions are not met TMPDIR will not be set.
> 
> I think there's an error in this spec -- the way I read this, TMPDIR
> would never get set for any user other than root.
> 
>  - file permissions include owner, group, mode, and acl.
>  - by default, /tmp is owned by root, group root, mode 01777, no acl.
>  - if the per-user subdir is created owned by root, then it would fail
> the "owned by the current user" test.
> 
> I don't see the rationale, however, for making the per-user subdirs be
> mode 01777 ; 0700 or 0711 would make more sense.
> 
> 						- Bill
> 
> 
> 
> 

I always make mine 0700.

The only real downside I've run into is that pkgadd is braindead
about non-writable TMPDIR.

- Bart


-- 
Bart Smaalders			Solaris Kernel Performance
barts@cyber.eng.sun.com		http://blogs.sun.com/barts

From sacadmin Wed Apr 25 13:13:46 2007
Received: from sfbaymail1sca.SFBay.Sun.COM (sfbaymail1sca.SFBay.Sun.COM [129.145.154.35])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3PKDkIF019974;
	Wed, 25 Apr 2007 13:13:46 -0700 (PDT)
Received: from sca-ea-mail-3.sun.com (sca-ea-mail-3.Sun.COM [192.18.43.21])
	by sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l3PKCujP011221;
	Wed, 25 Apr 2007 13:12:56 -0700 (PDT)
Received: from relay44i.sun.com ([192.5.209.118])
	by sca-ea-mail-3.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3PK7ssp010361;
	Wed, 25 Apr 2007 20:12:56 GMT
Received: from mms49es.sun.com ([160.41.221.233] [160.41.221.233]) by relay44i.sun.com with ESMTP id BT-MMP-85416; Wed, 25 Apr 2007 20:12:56 Z
Received: from relay43i.sun.com ([192.5.209.74] [192.5.209.74]) by mms49es.sun.com with ESMTP id BT-MMP-356202; Wed, 25 Apr 2007 20:12:56 Z
Received: from mail-in-13.arcor-online.net ([151.189.21.53] [151.189.21.53]) by relay4i.sun.com with ESMTP id BT-MMP-672676; Wed, 25 Apr 2007 20:12:55 Z
Received: from mail-in-01-z2.arcor-online.net (mail-in-06-z2.arcor-online.net [151.189.8.18])
	by mail-in-13.arcor-online.net (Postfix) with ESMTP id 25EDD2F5843;
	Wed, 25 Apr 2007 22:12:55 +0200 (CEST)
Received: from mail-in-04.arcor-online.net (mail-in-04.arcor-online.net [151.189.21.44])
	by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id 16ABC5BFFD;
	Wed, 25 Apr 2007 22:12:55 +0200 (CEST)
Received: from jupiterb48.nrubsig.org (dslb-084-059-015-006.pools.arcor-ip.net [84.59.15.6])
	by mail-in-04.arcor-online.net (Postfix) with ESMTP id C9FCE236E4C;
	Wed, 25 Apr 2007 22:12:54 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])
	by jupiterb48.nrubsig.org (8.13.8+Sun/8.13.8) with ESMTP id l3PKCpm8008477;
	Wed, 25 Apr 2007 22:12:51 +0200 (CEST)
Sender: gisburn@jupiterb48.nrubsig.org
Message-Id: <462FB642.87421F2C@nrubsig.org>
Date: Wed, 25 Apr 2007 22:12:51 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
X-Accept-Language: en
MIME-Version: 1.0
To: Bill Sommerfeld <sommerfeld@sun.com>
CC: Darren J Moffat <darrenm@sac.sfbay.sun.com>, PSARC@sac.sfbay.sun.com,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>
Subject: Re: 2007/236 TMPDIR in default shell environment
References: <200704251556.l3PFubcW003010@sac.sfbay.sun.com> <1177529512.4494.15.camel@thunk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 2714

Bill Sommerfeld wrote:
[Note: shell-discussion@opensolaris.org does not exist, setting CC: to
shell-discuss@opensolaris.org]
> 
> (note: I rearranged the subject line to make better use of limited
> space)
> >   If the directory specified
> >   by  "/tmp/${LOGNAME}" does not exist "/etc/profile"&co. will be responsible
> >   for creating this directory with the same permissions as the current "/tmp".
> >   If the directory already exists "/etc/profile"&co. is responsible to check
> >   whether the directory is owned by the current user (e.g.
> >   $ /usr/bin/test -O dir #) and writeable (e.g. /usr/bin/test -w dir #),
> >   if these conditions are not met TMPDIR will not be set.
> 
> I think there's an error in this spec -- the way I read this, TMPDIR
> would never get set for any user other than root.

Erm, yes... the description is misleading. When I wrote 'creating this
directory with the same permissions as the current "/tmp"' I was
thinking about how the old (pre-SMF) scripts created the /tmp
directory... I wasn't thinking about something like a complex "copy
mode+ACL procedure. Currently the code for our site looks more or less
like this:
-- snip --
# set TMPDIR to /tmp/${LOGNAME}/
if [ "${LOGNAME}" != "" -a "${TMPDIR}" = "" ] ; then
    utmpdir="/tmp/${LOGNAME}"

    /usr/bin/mkdir -p -m 1777 "${utmpdir}"

    # we have to use /usr/bin/test because /sbin/sh is a bourne shell
    if /usr/bin/test -d "${utmpdir}" -a -O "${utmpdir}" ; then
        TMPDIR="${utmpdir}"
        export TMPDIR
    fi
                
    unset utmpdir
fi
-- snip --

>  - file permissions include owner, group, mode, and acl.
>  - by default, /tmp is owned by root, group root, mode 01777, no acl.
>  - if the per-user subdir is created owned by root, then it would fail
> the "owned by the current user" test.
> 
> I don't see the rationale, however, for making the per-user subdirs be
> mode 01777 ; 0700 or 0711 would make more sense.

The idea is to create something like a "per-user home dir for temporary
data" which works like the normal /tmp directory (think about really big
SunRay machines with many users or machines where many students
login/work/logout in one day... usually /tmp looks like a giant garbage
dump after one week and finding your own files becomes a challange
(assuming you don't have any degree in informatics or voodoo magic)).
The idea was not to adjust the mode to increase security since this may
break some tools which expect that they can do a $ cd "$TMPDIR" ; ls -l
# (or similar code).

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

From sacadmin Wed Apr 25 13:20:26 2007
Received: from sfbaymail1sca.SFBay.Sun.COM (sfbaymail1sca.SFBay.Sun.COM [129.145.154.35])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3PKKQSd020235;
	Wed, 25 Apr 2007 13:20:26 -0700 (PDT)
Received: from sca-ea-mail-4.sun.com (sca-ea-mail-4.Sun.COM [192.18.43.22])
	by sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l3PKJatI014122;
	Wed, 25 Apr 2007 13:19:36 -0700 (PDT)
Received: from relay3.sun.com (relay3.sun.com [150.143.103.54] (may be forged))
	by sca-ea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3PJNOhC017681;
	Wed, 25 Apr 2007 20:19:36 GMT
Received: from mms04es.sun.com ([150.143.104.74] [150.143.104.74]) by relay3.sun.com with ESMTP id BT-MMP-2426; Wed, 25 Apr 2007 20:19:36 Z
Received: from relay4.sun.com (relay4.sun.com [150.143.103.74]) by mms04es.sun.com with ESMTP id BT-MMP-20295; Wed, 25 Apr 2007 20:19:36 Z
Received: from mail-in-01.arcor-online.net ([151.189.21.41] [151.189.21.41]) by relay4.sun.com with ESMTP id BT-MMP-973826; Wed, 25 Apr 2007 20:19:35 Z
Received: from mail-in-01-z2.arcor-online.net (mail-in-10-z2.arcor-online.net [151.189.8.27])
	by mail-in-01.arcor-online.net (Postfix) with ESMTP id D8B58174324;
	Wed, 25 Apr 2007 22:19:34 +0200 (CEST)
Received: from mail-in-03.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43])
	by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id CBBBC23D342;
	Wed, 25 Apr 2007 22:19:34 +0200 (CEST)
Received: from jupiterb48.nrubsig.org (dslb-084-059-015-006.pools.arcor-ip.net [84.59.15.6])
	by mail-in-03.arcor-online.net (Postfix) with ESMTP id A11C283BE6;
	Wed, 25 Apr 2007 22:19:34 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])
	by jupiterb48.nrubsig.org (8.13.8+Sun/8.13.8) with ESMTP id l3PKJVrm008500;
	Wed, 25 Apr 2007 22:19:32 +0200 (CEST)
Sender: gisburn@jupiterb48.nrubsig.org
Message-Id: <462FB7D3.2CB1FCD8@nrubsig.org>
Date: Wed, 25 Apr 2007 22:19:31 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
X-Accept-Language: en
MIME-Version: 1.0
To: Bart Smaalders <bart.smaalders@sun.com>
CC: Bill Sommerfeld <sommerfeld@sun.com>,
        Darren J Moffat <darrenm@sac.sfbay.sun.com>, PSARC@sac.sfbay.sun.com,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>
Subject: Re: 2007/236 TMPDIR in default shell environment
References: <200704251556.l3PFubcW003010@sac.sfbay.sun.com> <1177529512.4494.15.camel@thunk> <462FB179.5070600@Sun.COM>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 1873

Bart Smaalders wrote:
> Bill Sommerfeld wrote:
> > (note: I rearranged the subject line to make better use of limited
> > space)
> >>   If the directory specified
> >>   by  "/tmp/${LOGNAME}" does not exist "/etc/profile"&co. will be responsible
> >>   for creating this directory with the same permissions as the current "/tmp".
> >>   If the directory already exists "/etc/profile"&co. is responsible to check
> >>   whether the directory is owned by the current user (e.g.
> >>   $ /usr/bin/test -O dir #) and writeable (e.g. /usr/bin/test -w dir #),
> >>   if these conditions are not met TMPDIR will not be set.
> >
> > I think there's an error in this spec -- the way I read this, TMPDIR
> > would never get set for any user other than root.
> >
> >  - file permissions include owner, group, mode, and acl.
> >  - by default, /tmp is owned by root, group root, mode 01777, no acl.
> >  - if the per-user subdir is created owned by root, then it would fail
> > the "owned by the current user" test.
> >
> > I don't see the rationale, however, for making the per-user subdirs be
> > mode 01777 ; 0700 or 0711 would make more sense.
> 
> I always make mine 0700.
> 
> The only real downside I've run into is that pkgadd is braindead
> about non-writable TMPDIR.

The point is to create a "home dir for temporary files" and not trying
to tweak security (e.g. this is about usuabilty (and helping the admins
a little bit)). The "/tmp/${LOGNAME}"-directories should work like the
normal "/tmp", e.g. have the same mode mask (e.g. "1777") including the
sticky bit and should be owned by the current user.

----

Bye,
Roland

P.S:: Fixing "shell-discussion@opensolaris.org" to
"shell-discuss@opensolaris.org"

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

From John.Plocher@sun.com Thu Apr 26 14:27:49 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3QLRmmO016272
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 26 Apr 2007 14:27:49 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3QLQe93007721
	for <@sunmail3mpk.sfbay.sun.com:PSARC-EXT@sun.com>; Thu, 26 Apr 2007 22:26:56 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH400E07JKV2D00@nwk-avmta-2.sfbay.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Thu, 26 Apr 2007 14:26:55 -0700 (PDT)
Received: from nwk-ea-fw-1.sun.com ([10.4.134.6]) by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH4003FZJKRO4D0@nwk-avmta-2.sfbay.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Thu,
 26 Apr 2007 14:26:55 -0700 (PDT)
Received: from d1-sfbay-09.sun.com ([192.18.39.119])
	by nwk-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3QLQo9Y029136	for
 <PSARC-EXT@sun.com>; Thu, 26 Apr 2007 14:26:50 -0700 (PDT)
Received: from conversion-daemon.d1-sfbay-09.sun.com by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JH400L01JH1FW00@d1-sfbay-09.sun.com>
 (original mail from John.Plocher@Sun.COM)
 for PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Thu,
 26 Apr 2007 14:26:50 -0700 (PDT)
Received: from [129.146.58.87] by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JH400AGXJKQCDNJ@d1-sfbay-09.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Thu, 26 Apr 2007 14:26:50 -0700 (PDT)
Date: Thu, 26 Apr 2007 14:26:49 -0700
From: John Plocher <John.Plocher@sun.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
Sender: John.Plocher@sun.com
To: Roland Mainz <roland.mainz@nrubsig.org>, PSARC-EXT@sun.com
Message-id: <46311919.9080107@Sun.Com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221)
Status: RO
Content-Length: 402

 > ...making things easier for users...

Why should the user care about this?  By definition, things in TMPDIR
are ephemeral and don't usually get noticed by users - unless the
system is h0rked and there is no space left there.

Since most users don't touch TMPDIR today, and in a well functioning
system the existing default should "just work", I'm not sure what the
problem really is...

   -John




From sacadmin Thu Apr 26 14:42:02 2007
Received: from sfbaymail1sca.SFBay.Sun.COM (sfbaymail1sca.SFBay.Sun.COM [129.145.154.35])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3QLg27B016725;
	Thu, 26 Apr 2007 14:42:02 -0700 (PDT)
Received: from [129.146.108.211] (almas.SFBay.Sun.COM [129.146.108.211])
	by sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l3QLfA63009610;
	Thu, 26 Apr 2007 14:41:10 -0700 (PDT)
Message-ID: <46311C75.7010405@sun.com>
Date: Thu, 26 Apr 2007 14:41:09 -0700
From: Alan Coopersmith <alan.coopersmith@sun.com>
User-Agent: Thunderbird 2.0.0.0 (X11/20070423)
MIME-Version: 1.0
To: Darren J Moffat <darrenm@sac.sfbay.sun.com>
CC: PSARC@sac.sfbay.sun.com, roland.mainz@nrubsig.org,
        Shells discussion <shell-discuss@opensolaris.org>
Subject: Re: Default shell environment: TMPDIR [PSARC/2007/236 Timeout:  05/02/2007]
References: <200704251556.l3PFubcW003010@sac.sfbay.sun.com>
In-Reply-To: <200704251556.l3PFubcW003010@sac.sfbay.sun.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 515

Darren J Moffat wrote:
> - A modification to "/etc/profile" (and the matching csh file) to set TMPDIR
>   to  "/tmp/${LOGNAME}" if TMPDIR was not set yet. 

Note that this will move the default location used for files
created with tempnam() etal. from the on-disk /var/tmp to the
tmpfs /tmp.   Does anything depend on being able to access
such files across reboots (like editor autosave/recovery) ?

-- 
	-Alan Coopersmith-           alan.coopersmith@sun.com
	 Sun Microsystems, Inc. - X Window System Engineering


From Nicolas.Williams@sun.com Thu Apr 26 15:19:17 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3QMJGNg017922
	for <psarc-ext@sac.sfbay.Sun.COM>; Thu, 26 Apr 2007 15:19:16 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l3QMIKbO012816;
	Fri, 27 Apr 2007 06:18:22 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH400H03LYK0G00@nwk-avmta-2.sfbay.sun.com>; Thu,
 26 Apr 2007 15:18:20 -0700 (PDT)
Received: from binky.central.sun.com ([129.153.128.104])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH400GEVLYJG810@nwk-avmta-2.sfbay.sun.com>; Thu,
 26 Apr 2007 15:18:20 -0700 (PDT)
Received: from binky.central.sun.com (localhost [127.0.0.1])
	by binky.central.sun.com (8.13.8+Sun/8.13.6) with ESMTP id l3QMHFsq022437;
 Thu, 26 Apr 2007 17:17:15 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.central.sun.com (8.13.8+Sun/8.13.8/Submit) id l3QMHF4j022436; Thu,
 26 Apr 2007 17:17:15 -0500 (CDT)
Date: Thu, 26 Apr 2007 17:17:15 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <46311919.9080107@Sun.Com>
To: John Plocher <John.Plocher@sun.com>
Cc: Roland Mainz <roland.mainz@nrubsig.org>, PSARC-EXT@sun.com
Message-id: <20070426221714.GA21027@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com>
X-Authentication-warning: binky.central.sun.com: nw141292 set sender to
 Nicolas.Williams@sun.com using -f
User-Agent: Mutt/1.5.7i
Status: RO
Content-Length: 964

On Thu, Apr 26, 2007 at 02:26:49PM -0700, John Plocher wrote:
> > ...making things easier for users...
> 
> Why should the user care about this?  By definition, things in TMPDIR
> are ephemeral and don't usually get noticed by users - unless the
> system is h0rked and there is no space left there.
> 
> Since most users don't touch TMPDIR today, and in a well functioning
> system the existing default should "just work", I'm not sure what the
> problem really is...

I think you could argue that private TMPDIRs are more secure -- no
chance of following a malicious symlink placed in a 1777 tmpdir if your
tmpdir isn't 1777.  But otherwise it doesn't seem friendlier that
TMPDIR=/tmp.  One problem: TMPDIR should probably be mkdtemp'ed, else
there's a DoS (nico% mkdir /tmp/plocher; chmod 700 /tmp/plocher; echo
muahahaha), but if mkdtemped then how to make sure that multiple login
sessions for the same user share the same TMPDIR?  (Search for one?)

Nico
-- 

From roland.mainz@nrubsig.org Thu Apr 26 16:00:50 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3QN0n3h019350
	for <psarc-ext@sac.sfbay.Sun.COM>; Thu, 26 Apr 2007 16:00:50 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l3QMxjLG024429;
	Fri, 27 Apr 2007 06:59:54 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH400J05NVR3100@nwk-avmta-2.sfbay.sun.com>; Thu,
 26 Apr 2007 15:59:51 -0700 (PDT)
Received: from sca-ea-mail-2.sun.com ([192.18.43.25])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH400G6CNVRG450@nwk-avmta-2.sfbay.sun.com>; Thu,
 26 Apr 2007 15:59:51 -0700 (PDT)
Received: from relay1.sun.com (relay1.sun.com [150.143.103.14] (may be forged))
	by sca-ea-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l3QM29fj020179;
 Thu, 26 Apr 2007 22:59:50 +0000 (GMT)
Received: from mms04es.sun.com ([150.143.104.74] [150.143.104.74])
 by relay1.sun.com with ESMTP id BT-MMP-159078; Thu,
 26 Apr 2007 22:59:47 +0000 (Z)
Received: from relay1.sun.com (relay1.sun.com [150.143.103.14])
 by mms04es.sun.com with ESMTP id BT-MMP-1565453; Thu,
 26 Apr 2007 22:59:46 +0000 (Z)
Received: from mail-in-06.arcor-online.net ([151.189.21.46] [151.189.21.46])
 by relay1.sun.com with ESMTP id BT-MMP-1248330; Thu,
 26 Apr 2007 22:59:46 +0000 (Z)
Received: from mail-in-01-z2.arcor-online.net
 (mail-in-01-z2.arcor-online.net [151.189.8.13])	by mail-in-06.arcor-online.net
 (Postfix) with ESMTP id F3DF831EC73; Fri, 27 Apr 2007 00:59:45 +0200 (CEST)
Received: from mail-in-03.arcor-online.net
 (mail-in-03.arcor-online.net [151.189.21.43])
	by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id E47AAE1758; Fri,
 27 Apr 2007 00:59:45 +0200 (CEST)
Received: from jupiterb48.nrubsig.org
 (dslb-084-058-208-162.pools.arcor-ip.net [84.58.208.162])
	by mail-in-03.arcor-online.net (Postfix) with ESMTP id 236E2312761; Fri,
 27 Apr 2007 00:59:44 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])	by jupiterb48.nrubsig.org
 (8.13.8+Sun/8.13.8) with ESMTP id l3QMxgon008836; Fri,
 27 Apr 2007 00:59:43 +0200 (CEST)
Date: Fri, 27 Apr 2007 00:59:42 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
Sender: gisburn@jupiterb48.nrubsig.org
To: Nicolas Williams <Nicolas.Williams@Sun.COM>
Cc: John Plocher <John.Plocher@Sun.COM>, PSARC-EXT@Sun.COM,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>
Message-id: <46312EDE.6A61848E@nrubsig.org>
MIME-version: 1.0
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
Status: RO
Content-Length: 2133

Nicolas Williams wrote:
> On Thu, Apr 26, 2007 at 02:26:49PM -0700, John Plocher wrote:
> > > ...making things easier for users...
> >
> > Why should the user care about this?  By definition, things in TMPDIR
> > are ephemeral and don't usually get noticed by users - unless the
> > system is h0rked and there is no space left there.
> >
> > Since most users don't touch TMPDIR today, and in a well functioning
> > system the existing default should "just work", I'm not sure what the
> > problem really is...
> 
> I think you could argue that private TMPDIRs are more secure -- no
> chance of following a malicious symlink placed in a 1777 tmpdir if your
> tmpdir isn't 1777. 
> But otherwise it doesn't seem friendlier that
> TMPDIR=/tmp.

For users it appears to be friendlier (compared to have _all_ the files
in one flat directory where you have to search for your files via $ ls
-l | fgrep "myusername" # or worse).

> One problem: TMPDIR should probably be mkdtemp'ed, else
> there's a DoS (nico% mkdir /tmp/plocher; chmod 700 /tmp/plocher; echo
> muahahaha), but if mkdtemped then how to make sure that multiple login
> sessions for the same user share the same TMPDIR?  (Search for one?)

The example code I've posted earlier (e.g.
-- snip --
# set TMPDIR to /tmp/${LOGNAME}/
if [ "${LOGNAME}" != "" -a "${TMPDIR}" = "" ] ; then
   utmpdir="/tmp/${LOGNAME}"

   /usr/bin/mkdir -p -m 1777 "${utmpdir}"

   # we have to use /usr/bin/test because /sbin/sh is a bourne shell
   if /usr/bin/test -d "${utmpdir}" -a -O "${utmpdir}" ; then
       TMPDIR="${utmpdir}"
       export TMPDIR
   fi

   unset utmpdir
fi
-- snip --
) explicitly tests for such cases to make sure that no malicious user
can cause trouble my "squatting" directories, e.g. TMPDIR will only be
set if the directory is avaiable and owned by the user defined by
${LOGNAME} (these conditions are usually "true" unless something goes
wrong (which should be the exception)) ...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

From Nicolas.Williams@sun.com Thu Apr 26 16:05:39 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3QN5cip019545
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 26 Apr 2007 16:05:39 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3QN4fX1003659;
	Fri, 27 Apr 2007 00:04:45 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH400J03O3WC800@nwk-avmta-1.sfbay.Sun.COM>; Thu,
 26 Apr 2007 16:04:44 -0700 (PDT)
Received: from binky.central.sun.com ([129.153.128.104])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH40028FO3V6C80@nwk-avmta-1.sfbay.Sun.COM>; Thu,
 26 Apr 2007 16:04:44 -0700 (PDT)
Received: from binky.central.sun.com (localhost [127.0.0.1])
	by binky.central.sun.com (8.13.8+Sun/8.13.6) with ESMTP id l3QN3dKg022516;
 Thu, 26 Apr 2007 18:03:39 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.central.sun.com (8.13.8+Sun/8.13.8/Submit) id l3QN3drC022515; Thu,
 26 Apr 2007 18:03:39 -0500 (CDT)
Date: Thu, 26 Apr 2007 18:03:39 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <46312EDE.6A61848E@nrubsig.org>
To: Roland Mainz <roland.mainz@nrubsig.org>
Cc: John Plocher <John.Plocher@sun.com>, PSARC-EXT@sun.com,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>
Message-id: <20070426230338.GB21027@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <46312EDE.6A61848E@nrubsig.org>
X-Authentication-warning: binky.central.sun.com: nw141292 set sender to
 Nicolas.Williams@sun.com using -f
User-Agent: Mutt/1.5.7i
Status: RO
Content-Length: 1518

On Fri, Apr 27, 2007 at 12:59:42AM +0200, Roland Mainz wrote:
> Nicolas Williams wrote:
> 
> For users it appears to be friendlier (compared to have _all_ the files
> in one flat directory where you have to search for your files via $ ls
> -l | fgrep "myusername" # or worse).

Right, but I think that's marginal: I never type "cd $TMPDIR" -- like
everyone else I type "cd /tmp" and old habits die hard.

> > One problem: TMPDIR should probably be mkdtemp'ed, else
> > there's a DoS (nico% mkdir /tmp/plocher; chmod 700 /tmp/plocher; echo
> > muahahaha), but if mkdtemped then how to make sure that multiple login
> > sessions for the same user share the same TMPDIR?  (Search for one?)
> 
> The example code I've posted earlier (e.g.
> -- snip --
> # set TMPDIR to /tmp/${LOGNAME}/
> if [ "${LOGNAME}" != "" -a "${TMPDIR}" = "" ] ; then
>    utmpdir="/tmp/${LOGNAME}"
> 
>    /usr/bin/mkdir -p -m 1777 "${utmpdir}"
> 
>    # we have to use /usr/bin/test because /sbin/sh is a bourne shell
>    if /usr/bin/test -d "${utmpdir}" -a -O "${utmpdir}" ; then
>        TMPDIR="${utmpdir}"
>        export TMPDIR
>    fi
> 
>    unset utmpdir
> fi
> -- snip --
> ) explicitly tests for such cases to make sure that no malicious user
> can cause trouble my "squatting" directories, e.g. TMPDIR will only be
> set if the directory is avaiable and owned by the user defined by
> ${LOGNAME} (these conditions are usually "true" unless something goes
> wrong (which should be the exception)) ...

OK, so fallback on TMPDIR=/tmp/.

From John.Plocher@Sun.Com Thu Apr 26 17:18:31 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3R0IVa3021800
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 26 Apr 2007 17:18:31 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3R0HZq0029616
	for <@newsunmail1brm.central.sun.com:PSARC-EXT@sun.com>; Thu, 26 Apr 2007 17:17:39 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH400G0DRHDK200@brm-avmta-1.central.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Thu, 26 Apr 2007 18:17:37 -0600 (MDT)
Received: from nwk-ea-fw-1.sun.com ([10.4.134.5])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH400EQGRHCPDB0@brm-avmta-1.central.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Thu,
 26 Apr 2007 18:17:36 -0600 (MDT)
Received: from d1-sfbay-09.sun.com ([192.18.39.119])
	by nwk-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3R0Haij000177	for
 <PSARC-EXT@sun.com>; Thu, 26 Apr 2007 17:17:36 -0700 (PDT)
Received: from conversion-daemon.d1-sfbay-09.sun.com by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JH400C01RG1VI00@d1-sfbay-09.sun.com>
 (original mail from John.Plocher@Sun.COM)
 for PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Thu,
 26 Apr 2007 17:17:36 -0700 (PDT)
Received: from [129.146.58.87] by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JH400ALSRHCCDSK@d1-sfbay-09.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Thu, 26 Apr 2007 17:17:36 -0700 (PDT)
Date: Thu, 26 Apr 2007 17:17:34 -0700
From: John Plocher <John.Plocher@Sun.Com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <46312EDE.6A61848E@nrubsig.org>
Sender: John.Plocher@Sun.Com
To: Roland Mainz <roland.mainz@nrubsig.org>
Cc: PSARC-EXT@Sun.Com,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>
Message-id: <4631411E.2000109@Sun.Com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <46312EDE.6A61848E@nrubsig.org>
User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221)
Status: RO
Content-Length: 752

Roland Mainz wrote:
> For users it appears to be friendlier (compared to have _all_ the files
> in one flat directory where you have to search for your files via $ ls
> -l | fgrep "myusername" # or worse).


But /why/ would I ever be searching for files there?  I have /never/
had a reason to do a "ls -l $TMPDIR" in all my 20 years of using Unix,
USG, Linux and Solaris.  I could see this proposal as being interesting
if this were an operation that was frequently performed, but looking
under the covers as the various programs do their thing isn't something
that users usually do...

I can't do anything with those files, there is no guarantee that they
won't be deleted in the near future, their content us unknown and
unknowable, etc.

   -John



From joshhurst@gmail.com Thu Apr 26 17:40:48 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3R0elBR022700
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 26 Apr 2007 17:40:48 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3R0dtWu028458
	for <@sunmail3mpk.sfbay.sun.com:PSARC-EXT@sun.com>; Fri, 27 Apr 2007 01:39:55 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH400101SIJF900@nwk-avmta-2.sfbay.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Thu, 26 Apr 2007 17:39:55 -0700 (PDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH400GDMSIIG6B0@nwk-avmta-2.sfbay.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Thu,
 26 Apr 2007 17:39:54 -0700 (PDT)
Received: from relay42i.sun.com ([192.5.209.72])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3R0dr9t017124	for
 <PSARC-EXT@sun.com>; Fri, 27 Apr 2007 00:39:54 +0000 (GMT)
Received: from mms49es.sun.com ([160.41.221.233] [160.41.221.233])
 by relay42i.sun.com with ESMTP id BT-MMP-160998 for PSARC-EXT@sun.com; Fri,
 27 Apr 2007 00:39:53 +0000 (Z)
Received: from relay44i.sun.com ([192.5.209.118] [192.5.209.118])
 by mms49es.sun.com with ESMTP id BT-MMP-259479 for PSARC-EXT@sun.com; Fri,
 27 Apr 2007 00:39:53 +0000 (Z)
Received: from nz-out-0506.google.com ([64.233.162.239] [64.233.162.239])
 by relay4i.sun.com with ESMTP id BT-MMP-1290598 for PSARC-EXT@sun.com; Fri,
 27 Apr 2007 00:39:53 +0000 (Z)
Received: by nz-out-0506.google.com with SMTP id m7so1023769nzf for
 <PSARC-EXT@sun.com>; Thu, 26 Apr 2007 17:39:53 -0700 (PDT)
Received: by 10.114.93.17 with SMTP id q17mr787425wab.1177634392989; Thu,
 26 Apr 2007 17:39:52 -0700 (PDT)
Received: by 10.115.17.12 with HTTP; Thu, 26 Apr 2007 17:39:52 -0700 (PDT)
Date: Fri, 27 Apr 2007 02:39:52 +0200
From: Josh Hurst <joshhurst@gmail.com>
Subject: Re: [shell-discuss] Re: PSARC 2007/236 Default shell environment:
 TMPDIR
In-reply-to: <4631411E.2000109@Sun.Com>
To: Shells discussion <shell-discuss@opensolaris.org>
Cc: Roland Mainz <roland.mainz@nrubsig.org>, PSARC-EXT@sun.com
Message-id: <dadc8efd0704261739o2d71db5fjf9478283ca62e790@mail.gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
Content-disposition: inline
DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;        d=gmail.com; s=beta;
 h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
 b=qWYhmhHMMR/FZZGgJwlT/llZuukiWg1ex0yZiV2Voq5IC5ggz59XFfsD7EUGo/hcwFPJ2hw111Yle5DNU7lASkQ5xEQmocTbvo2ub6t0e5RbnkAtoNyDJ5KerA2BYvZPcJV8lKgSGoOoBn00KSU2zVn2V04I6DuHvcWzHcYuGkU=
DomainKey-Signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=beta;
 h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
 b=K+B4mRJlX90Ya884DuTm9IkAZ3beT5nzCLhnrm3w1TzDpmSnnRKfTR5A8a4WhSaB31JOmYjCIH/+ihgGVh41THTlIsr6X3Jey0woJgaFIoGXuLvJ31xUgeoZTBa6GjQby+8y3o9p6mqtpx5vnNfA+YDKjGqDTtbScOdB0qlOKxg=
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <46312EDE.6A61848E@nrubsig.org> <4631411E.2000109@Sun.Com>
Status: RO
Content-Length: 923

On 4/27/07, John Plocher <John.Plocher@sun.com> wrote:
> Roland Mainz wrote:
> > For users it appears to be friendlier (compared to have _all_ the files
> > in one flat directory where you have to search for your files via $ ls
> > -l | fgrep "myusername" # or worse).
>
>
> But /why/ would I ever be searching for files there?  I have /never/
> had a reason to do a "ls -l $TMPDIR" in all my 20 years of using Unix,
> USG, Linux and Solaris.

Did you use any desktop application recently? Try: Open Konqueror, go
to www.sun.com, select menu item Save As... You get a file dialog and
the sidebar has predefined locations, including Desktop
(file:///home/yamis/Desktop/), Documents
file:///home/yamis/Documents/), Home Folder (file:///home/yamis/),
Temporary Folder (file:///tmp/yamis/), Storage Media (media:/),
Network Folder (remote:/)
Temporary Folder (file:///tmp/yamis/) is set to the value of TMPDIR by default

Josh

From joshhurst@gmail.com Thu Apr 26 17:48:56 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3R0mubC022875
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 26 Apr 2007 17:48:56 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3R0m3iZ004314
	for <@sunmail2sca.sfbay.sun.com:PSARC-EXT@sun.com>; Thu, 26 Apr 2007 17:48:04 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH400715SW39F00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Thu, 26 Apr 2007 17:48:03 -0700 (PDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH4002QHSW26GD0@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Thu,
 26 Apr 2007 17:48:02 -0700 (PDT)
Received: from relay44i.sun.com ([192.5.209.118])
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3R0m2YO001569	for
 <PSARC-EXT@sun.com>; Fri, 27 Apr 2007 00:48:02 +0000 (GMT)
Received: from mms48es.sun.com ([160.41.221.231] [160.41.221.231])
 by relay44i.sun.com with ESMTP id BT-MMP-161455 for PSARC-EXT@sun.com; Fri,
 27 Apr 2007 00:48:01 +0000 (Z)
Received: from relay41i.sun.com ([192.5.209.70] [192.5.209.70])
 by mms48es.sun.com with ESMTP id BT-MMP-458373 for PSARC-EXT@sun.com; Fri,
 27 Apr 2007 00:48:01 +0000 (Z)
Received: from nz-out-0506.google.com ([64.233.162.225] [64.233.162.225])
 by relay4i.sun.com with ESMTP id BT-MMP-738798 for PSARC-EXT@sun.com; Fri,
 27 Apr 2007 00:48:01 +0000 (Z)
Received: by nz-out-0506.google.com with SMTP id m7so1025476nzf for
 <PSARC-EXT@sun.com>; Thu, 26 Apr 2007 17:48:01 -0700 (PDT)
Received: by 10.114.199.1 with SMTP id w1mr777460waf.1177634881140; Thu,
 26 Apr 2007 17:48:01 -0700 (PDT)
Received: by 10.115.17.12 with HTTP; Thu, 26 Apr 2007 17:48:01 -0700 (PDT)
Date: Fri, 27 Apr 2007 02:48:01 +0200
From: Josh Hurst <joshhurst@gmail.com>
Subject: Re: [shell-discuss] Re: PSARC 2007/236 Default shell environment:
 TMPDIR
In-reply-to: <46311919.9080107@Sun.Com>
To: Shells discussion <shell-discuss@opensolaris.org>
Cc: Roland Mainz <roland.mainz@nrubsig.org>, PSARC-EXT@sun.com
Message-id: <dadc8efd0704261748t388883a4wb0ac0bc9052d8051@mail.gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
Content-disposition: inline
DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;        d=gmail.com; s=beta;
 h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
 b=q8xqNtNMtG19OFw+mxTIOsRF1dFpuHnGhLUmotUXnV7986qdhP4g7SgQaX/Pksx6/LiCxYtlmTewWzyes+sjuyW8L068HjP1CJsCL/MRI4myXq7K5nUNNmIP1PVsiI4Mu32KV+Lih+DGY7lOfrTWQw289/SwdWq6FphCqzhClcI=
DomainKey-Signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=beta;
 h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
 b=J7caMoc1sl7nw5jcQTpnTkCl3tByK5UAMmxZzBIxLyINJBNoOwvFyTM4eCApBd39hYC4lc8j3GGDVyA3bGJUG/8+9Dg+pdJjJyJgUc2F6XQi3VHDBqQfryCuyZNkxlOrdntZkwlFgr9S3VRR17mNhMQtqGtAwofANdoAXOBXL5U=
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com>
Status: RO
Content-Length: 485

On 4/26/07, John Plocher <John.Plocher@sun.com> wrote:
>  > ...making things easier for users...
>
> Why should the user care about this?  By definition, things in TMPDIR
> are ephemeral and don't usually get noticed by users

All desktops expose TMPDIR to the users. KDE and Enlightenment have
bookmarks in the dialogs, Mozilla stores downloads in TMPDIR by
default and Opera downloads files for plugins and external
applications there. The users know about that and use TMPDIR

Josh

From casper@holland.sun.com Thu Apr 26 23:35:20 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3R6ZI08003763
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 26 Apr 2007 23:35:20 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3R6YPZt024322;
	Thu, 26 Apr 2007 23:34:26 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH500K0F8XDBE00@nwk-avmta-2.sfbay.sun.com>; Thu,
 26 Apr 2007 23:34:25 -0700 (PDT)
Received: from sr1-eaft06-01.holland.sun.com ([129.159.237.36])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH500CVQ8XB7760@nwk-avmta-2.sfbay.sun.com>; Thu,
 26 Apr 2007 23:34:24 -0700 (PDT)
Received: from holland (room101 [129.159.248.23])
	by sr1-eaft06-01.holland.sun.com (8.13.7+Sun/8.13.7)
 with ESMTP id l3R6YM7N049056; Fri, 27 Apr 2007 08:34:22 +0200 (MEST)
Date: Fri, 27 Apr 2007 08:34:22 +0200
From: Casper.Dik@Sun.COM
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <20070426221714.GA21027@Sun.COM>
Sender: casper@holland.sun.com
To: Nicolas Williams <Nicolas.Williams@Sun.COM>
Cc: John Plocher <John.Plocher@Sun.COM>,
        Roland Mainz <roland.mainz@nrubsig.org>, PSARC-EXT@Sun.COM
Message-id: <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
Status: RO
Content-Length: 1143


>On Thu, Apr 26, 2007 at 02:26:49PM -0700, John Plocher wrote:
>> > ...making things easier for users...
>> 
>> Why should the user care about this?  By definition, things in TMPDIR
>> are ephemeral and don't usually get noticed by users - unless the
>> system is h0rked and there is no space left there.
>> 
>> Since most users don't touch TMPDIR today, and in a well functioning
>> system the existing default should "just work", I'm not sure what the
>> problem really is...
>
>I think you could argue that private TMPDIRs are more secure -- no
>chance of following a malicious symlink placed in a 1777 tmpdir if your
>tmpdir isn't 1777.  But otherwise it doesn't seem friendlier that
>TMPDIR=/tmp.  One problem: TMPDIR should probably be mkdtemp'ed, else
>there's a DoS (nico% mkdir /tmp/plocher; chmod 700 /tmp/plocher; echo
>muahahaha), but if mkdtemped then how to make sure that multiple login
>sessions for the same user share the same TMPDIR?  (Search for one?)


Unfortunately the use of TMPDIR is inherited across "su" and
then, when users assume roles, TMPDIR no longer works.

I would think this is too risky to change.

Casper

From casper@holland.sun.com Fri Apr 27 00:06:47 2007
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3R76kNn005608
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 27 Apr 2007 00:06:46 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3R75r0C047935
	for <@sunmail2sca.sfbay.sun.com:PSARC-EXT@sun.com>; Fri, 27 Apr 2007 01:05:54 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH500K01ADUAZ00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Fri, 27 Apr 2007 00:05:54 -0700 (PDT)
Received: from sr1-eaft06-01.holland.sun.com ([129.159.237.36])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH500NDBADT29A0@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Fri,
 27 Apr 2007 00:05:53 -0700 (PDT)
Received: from holland (room101 [129.159.248.23])
	by sr1-eaft06-01.holland.sun.com (8.13.7+Sun/8.13.7)
 with ESMTP id l3R75q2R003136; Fri, 27 Apr 2007 09:05:52 +0200 (MEST)
Date: Fri, 27 Apr 2007 09:05:51 +0200
From: Casper.Dik@Sun.COM
Subject: Re: [shell-discuss] Re: PSARC 2007/236 Default shell environment:
 TMPDIR
In-reply-to: <4631411E.2000109@Sun.Com>
Sender: casper@holland.sun.com
To: Shells discussion <shell-discuss@opensolaris.org>
Cc: Roland Mainz <roland.mainz@nrubsig.org>, PSARC-EXT@Sun.COM
Message-id: <200704270705.l3R75q2R003136@sr1-eaft06-01.holland.sun.com>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <46312EDE.6A61848E@nrubsig.org> <4631411E.2000109@Sun.Com>
Status: RO
Content-Length: 593


>But /why/ would I ever be searching for files there?  I have /never/
>had a reason to do a "ls -l $TMPDIR" in all my 20 years of using Unix,
>USG, Linux and Solaris.  I could see this proposal as being interesting
>if this were an operation that was frequently performed, but looking
>under the covers as the various programs do their thing isn't something
>that users usually do...

Neither have I; and when I went looking for files their it was
invariable for files I copied their myself.

I don't see users changing from:

	cd /tmp
	wget something

to
	cd $TMPDIR
	wget something

Casper

From iszczesniak@gmail.com Fri Apr 27 02:24:53 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3R9Oq7M009783
	for <psarc-ext@sac.sfbay.Sun.COM>; Fri, 27 Apr 2007 02:24:53 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l3R9NpZS025415
	for <@newsunmail1brm.central.sun.com:PSARC-EXT@sun.com>; Fri, 27 Apr 2007 17:23:59 +0800 (SGT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH500401GRWLO00@brm-avmta-1.central.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Fri, 27 Apr 2007 03:23:56 -0600 (MDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH5000RWGRVWY90@brm-avmta-1.central.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Fri,
 27 Apr 2007 03:23:55 -0600 (MDT)
Received: from relay21.sun.com
 (relay21.sun.com [192.12.251.14] (may be forged))	by brmea-mail-2.sun.com
 (8.13.6+Sun/8.12.9) with ESMTP id l3R9Ntac029411	for <PSARC-EXT@sun.com>; Fri,
 27 Apr 2007 09:23:55 +0000 (GMT)
Received: from mms23es.sun.com ([150.143.232.54] [150.143.232.54])
 by relay21.sun.com with ESMTP id BT-MMP-1341200 for PSARC-EXT@sun.com; Fri,
 27 Apr 2007 09:23:55 +0000 (Z)
Received: from mms24bas.mms.us.syntegra.com
 (relay24.mms.us.syntegra.com [192.12.251.70]) by mms23es.sun.com with ESMTP id
 BT-MMP-2672299 for PSARC-EXT@sun.com; Fri, 27 Apr 2007 09:23:55 +0000 (Z)
Received: from an-out-0708.google.com ([209.85.132.242] [209.85.132.242])
 by relay24.sun.com with ESMTP id BT-MMP-6657986 for PSARC-EXT@sun.com; Fri,
 27 Apr 2007 09:23:55 +0000 (Z)
Received: by an-out-0708.google.com with SMTP id c2so538564anc for
 <PSARC-EXT@sun.com>; Fri, 27 Apr 2007 02:23:55 -0700 (PDT)
Received: by 10.101.1.13 with SMTP id d13mr1857237ani.1177665834846; Fri,
 27 Apr 2007 02:23:54 -0700 (PDT)
Received: by 10.100.168.4 with HTTP; Fri, 27 Apr 2007 02:23:54 -0700 (PDT)
Date: Fri, 27 Apr 2007 11:23:54 +0200
From: "I. Szczesniak" <iszczesniak@gmail.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
To: "Casper.Dik@sun.com" <Casper.Dik@sun.com>
Cc: Nicolas Williams <Nicolas.Williams@sun.com>,
        John Plocher <John.Plocher@sun.com>, PSARC-EXT@sun.com
Message-id: <cd45720b0704270223o65be9be1p60981cfee78bbc5f@mail.gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
Content-disposition: inline
DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;        d=gmail.com; s=beta;
 h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
 b=fMZqTa8AhSW1ufRdTh5ck0XnVvAm03xPTXUbYVr80oLqITX1CNQKrVDGFNyT3xnNxALwdRPln7Ee3qPmTD98paSaXzP9O563rgyZUE67VILHMS116pFgJQ5FKEzpBqNu0hWHK/MwnTv4xhITuT2PAeNssrKRQR5wgoM90U1ozgc=
DomainKey-Signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=beta;
 h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
 b=IlPAMQQrrFnXXEx9mMI/ZxdrimLBkwKuJ64kgK3RFSTkG3Ld7rQwtbwLnsVNgD+pTbVbtgH46PtaRVpud+0qr7aWuKhMk2x/97+oEFBndMO9R4UdodlMgK6w2wsFqXgRoGDJlSL7doMvQOP0UWGRp6NBfg8haBFubIdMufPTyiI=
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
Status: RO
Content-Length: 1376

On 4/27/07, Casper.Dik@sun.com <Casper.Dik@sun.com> wrote:
>
> >On Thu, Apr 26, 2007 at 02:26:49PM -0700, John Plocher wrote:
> >> > ...making things easier for users...
> >>
> >> Why should the user care about this?  By definition, things in TMPDIR
> >> are ephemeral and don't usually get noticed by users - unless the
> >> system is h0rked and there is no space left there.
> >>
> >> Since most users don't touch TMPDIR today, and in a well functioning
> >> system the existing default should "just work", I'm not sure what the
> >> problem really is...
> >
> >I think you could argue that private TMPDIRs are more secure -- no
> >chance of following a malicious symlink placed in a 1777 tmpdir if your
> >tmpdir isn't 1777.  But otherwise it doesn't seem friendlier that
> >TMPDIR=/tmp.  One problem: TMPDIR should probably be mkdtemp'ed, else
> >there's a DoS (nico% mkdir /tmp/plocher; chmod 700 /tmp/plocher; echo
> >muahahaha), but if mkdtemped then how to make sure that multiple login
> >sessions for the same user share the same TMPDIR?  (Search for one?)
>
>
> Unfortunately the use of TMPDIR is inherited across "su" and
> then, when users assume roles, TMPDIR no longer works.
>
> I would think this is too risky to change.

If that's true then the TMPDIR functionality needs to be removed from
libc and all applications because it is insecure by default.

Irek

From Darren.Moffat@sun.com Fri Apr 27 05:20:38 2007
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3RCKcg1015106
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 27 Apr 2007 05:20:38 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3RCJin3035596
	for <@newsunmail1brm.central.sun.com:PSARC-EXT@sun.com>; Fri, 27 Apr 2007 06:19:45 -0600 (MDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH50000TOWW4700@brm-avmta-1.central.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Fri, 27 Apr 2007 06:19:44 -0600 (MDT)
Received: from gmp-ea-fw-1.sun.com ([129.156.42.6])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH500L0UOWUMN10@brm-avmta-1.central.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Fri,
 27 Apr 2007 06:19:43 -0600 (MDT)
Received: from d1-emea-09.sun.com ([192.18.2.119])
	by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3RCJgDP029622	for
 <PSARC-EXT@sun.com>; Fri, 27 Apr 2007 12:19:42 +0000 (GMT)
Received: from conversion-daemon.d1-emea-09.sun.com by d1-emea-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JH500B01OS8KQ00@d1-emea-09.sun.com>
 (original mail from Darren.Moffat@Sun.COM)
 for PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Fri,
 27 Apr 2007 13:19:42 +0100 (BST)
Received: from [129.156.173.21] by d1-emea-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JH500ANOOWTFV00@d1-emea-09.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Fri, 27 Apr 2007 13:19:41 +0100 (BST)
Date: Fri, 27 Apr 2007 13:19:41 +0100
From: Darren J Moffat <Darren.Moffat@sun.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <cd45720b0704270223o65be9be1p60981cfee78bbc5f@mail.gmail.com>
Sender: Darren.Moffat@sun.com
To: "I. Szczesniak" <iszczesniak@gmail.com>
Cc: "Casper.Dik@sun.com" <Casper.Dik@sun.com>,
        John Plocher <John.Plocher@sun.com>, PSARC-EXT@sun.com
Message-id: <4631EA5D.6070208@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <cd45720b0704270223o65be9be1p60981cfee78bbc5f@mail.gmail.com>
User-Agent: Thunderbird 2.0b2 (X11/20070326)
Status: RO
Content-Length: 597

I. Szczesniak wrote:
>> Unfortunately the use of TMPDIR is inherited across "su" and
>> then, when users assume roles, TMPDIR no longer works.
>>
>> I would think this is too risky to change.
> 
> If that's true then the TMPDIR functionality needs to be removed from
> libc and all applications because it is insecure by default.

It isn't insecure, that isn't what Casper said, it just doesn't work 
nicely.  If applications don't check return codes from libc functions 
and act accordingly then it is them that is broken, and maybe insecure, 
not the functions themselves.


-- 
Darren J Moffat

From carlsonj@phorcys.east.sun.com Fri Apr 27 11:34:24 2007
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3RIYNNr028813
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 27 Apr 2007 11:34:24 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3RIXO3b015356;
	Fri, 27 Apr 2007 11:33:26 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH600D0567QW400@brm-avmta-1.central.sun.com>; Fri,
 27 Apr 2007 12:33:26 -0600 (MDT)
Received: from phorcys.east.sun.com ([129.148.174.143])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH6005AV67PJR50@brm-avmta-1.central.sun.com>; Fri,
 27 Apr 2007 12:33:25 -0600 (MDT)
Received: from phorcys.east.sun.com (localhost [127.0.0.1])
	by phorcys.east.sun.com (8.14.1+Sun/8.14.1) with ESMTP id l3RIXPC7008110; Fri,
 27 Apr 2007 14:33:25 -0400 (EDT)
Received: (from carlsonj@localhost)
	by phorcys.east.sun.com (8.14.1+Sun/8.14.1/Submit) id l3RIXP8E008107; Fri,
 27 Apr 2007 14:33:25 -0400 (EDT)
Date: Fri, 27 Apr 2007 14:33:25 -0400
From: James Carlson <james.d.carlson@sun.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
To: Casper.Dik@sun.com
Cc: Nicolas Williams <Nicolas.Williams@sun.com>,
        John Plocher <John.Plocher@sun.com>, PSARC-EXT@sun.com
Message-id: <17970.16885.382847.920432@gargle.gargle.HOWL>
MIME-version: 1.0
X-Mailer: VM 7.01 under Emacs 21.3.1
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
Status: RO
Content-Length: 1330

Casper.Dik@Sun.COM writes:
> Unfortunately the use of TMPDIR is inherited across "su" and
> then, when users assume roles, TMPDIR no longer works.

That point would seem to be a show-stopper to me.  Having an RBAC role
fail to work because $TMPDIR is now set (when it wasn't before) and
owned by the original user would be an incompatible change and clearly
a Bad Thing.

I've been staying out of this particular issue until now, as I could
see both sides of it.  But it looks now like the weight of evidence is
against the proposal: not just RBAC damage, but also unnecessary
*extra* clutter in /tmp (due to the one-per-user directories, even if
no temp files are used), but also the fact that admins can already set
this up if they want, that the target of "easy to use" (the isolated,
one-user system) won't benefit at all, and that it seems to fix a
non-existent problem (who cares what's in /tmp anyway?) all argue
against doing this.

As it's no longer "obvious" and thus not appropriate for a fast-track,
if that's not removed from the proposal, I'll derail for a full review
and a written opinion.

-- 
James Carlson, Solaris Networking              <james.d.carlson@sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

From Tim.Marsland@sun.com Fri Apr 27 14:24:27 2007
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3RLORFn004626
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 27 Apr 2007 14:24:27 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3RLNXjS022175;
	Fri, 27 Apr 2007 15:23:33 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH600201E393400@nwk-avmta-1.sfbay.Sun.COM>; Fri,
 27 Apr 2007 14:23:33 -0700 (PDT)
Received: from jurassic-x4600.sfbay.sun.com ([129.146.17.63])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH6001OOE38U700@nwk-avmta-1.sfbay.Sun.COM>; Fri,
 27 Apr 2007 14:23:33 -0700 (PDT)
Received: from jurassic-x4600.sfbay.sun.com (localhost [127.0.0.1])
	by jurassic-x4600.sfbay.sun.com (8.14.1+Sun/8.14.1)
 with ESMTP id l3RLNJLj259139
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri,
 27 Apr 2007 14:23:19 -0700 (PDT)
Received: (from tpm@localhost)	by jurassic-x4600.sfbay.sun.com
 (8.14.1+Sun/8.14.1/Submit) id l3RLNHnX259136; Fri,
 27 Apr 2007 14:23:17 -0700 (PDT)
Date: Fri, 27 Apr 2007 14:23:17 -0700
From: Tim Marsland <tpm@eng.sun.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
To: Casper.Dik@sun.com
Cc: Nicolas Williams <Nicolas.Williams@sun.com>,
        John Plocher <John.Plocher@sun.com>,
        Roland Mainz <roland.mainz@nrubsig.org>, PSARC-EXT@sun.com
Reply-to: Tim Marsland <Tim.Marsland@sun.com>
Message-id: <20070427212316.GC254295@eng.sun.com>
Organization: Software; Sun Microsystems, Inc.
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
User-Agent: Mutt/1.4.2.1i
Status: RO
Content-Length: 340

> Unfortunately the use of TMPDIR is inherited across "su" and
> then, when users assume roles, TMPDIR no longer works.
> 
> I would think this is too risky to change.

It doesn't seem like *risk* per se, it's more like it's an incomplete
change.  If we're to make TMPDIR "work" correctly, it needs to handle
the su and rbac case too.

tim

From roland.mainz@nrubsig.org Fri Apr 27 17:26:54 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3S0QqaG010005
	for <psarc-ext@sac.sfbay.Sun.COM>; Fri, 27 Apr 2007 17:26:53 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l3S0Pp3h012620;
	Sat, 28 Apr 2007 08:25:52 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH600L01MJ3J200@nwk-avmta-1.sfbay.Sun.COM>; Fri,
 27 Apr 2007 17:25:51 -0700 (PDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH6005EPMIZSB70@nwk-avmta-1.sfbay.Sun.COM>; Fri,
 27 Apr 2007 17:25:51 -0700 (PDT)
Received: from relay1.sun.com (relay1.sun.com [150.143.103.14] (may be forged))
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3RHKsZN014246; Sat,
 28 Apr 2007 00:25:47 +0000 (GMT)
Received: from mms04es.sun.com ([150.143.104.74] [150.143.104.74])
 by relay1.sun.com with ESMTP id BT-MMP-281348; Sat,
 28 Apr 2007 00:25:47 +0000 (Z)
Received: from relay1.sun.com (relay1.sun.com [150.143.103.14])
 by mms04es.sun.com with ESMTP id BT-MMP-97543; Sat,
 28 Apr 2007 00:25:47 +0000 (Z)
Received: from mail-in-01.arcor-online.net ([151.189.21.41] [151.189.21.41])
 by relay1.sun.com with ESMTP id BT-MMP-2293657; Sat,
 28 Apr 2007 00:25:46 +0000 (Z)
Received: from mail-in-01-z2.arcor-online.net
 (mail-in-10-z2.arcor-online.net [151.189.8.27])	by mail-in-01.arcor-online.net
 (Postfix) with ESMTP id 1AEE91749A9; Sat, 28 Apr 2007 02:25:46 +0200 (CEST)
Received: from mail-in-03.arcor-online.net
 (mail-in-03.arcor-online.net [151.189.21.43])
	by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id 1068423D3C9; Sat,
 28 Apr 2007 02:25:46 +0200 (CEST)
Received: from jupiterb48.nrubsig.org
 (dslb-084-058-195-116.pools.arcor-ip.net [84.58.195.116])
	by mail-in-03.arcor-online.net (Postfix) with ESMTP id E9B8F34261B; Sat,
 28 Apr 2007 02:25:45 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])	by jupiterb48.nrubsig.org
 (8.13.8+Sun/8.13.8) with ESMTP id l3S0PhNN009088; Sat,
 28 Apr 2007 02:25:43 +0200 (CEST)
Date: Sat, 28 Apr 2007 02:25:43 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
Sender: gisburn@jupiterb48.nrubsig.org
To: John Plocher <John.Plocher@sun.com>
Cc: PSARC-EXT@sun.com
Message-id: <46329487.38FFB128@nrubsig.org>
MIME-version: 1.0
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com>
Status: RO
Content-Length: 982

John Plocher wrote:
>  > ...making things easier for users...
> 
> Why should the user care about this?  By definition, things in TMPDIR
> are ephemeral and don't usually get noticed by users - unless the
> system is h0rked and there is no space left there.
> 
> Since most users don't touch TMPDIR today,

Erm, that's not true.
Many of our users use TMPDIR for some quick testing or work which
doesn't need to be saved permanently (perfect example are training
sessions for newbies or just compile another quick testcase for a bug).
And AFAIK we're not the only site where people behave like that since
I've seen similar settings for TMPDIR at other universities, too. That's
why I came up with the proposal: This setting is very popular and may be
usefull as general default for login sessions.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

From roland.mainz@nrubsig.org Fri Apr 27 17:33:18 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3S0XHlb010161
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 27 Apr 2007 17:33:17 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3S0WF6x000405;
	Sat, 28 Apr 2007 01:32:20 +0100 (BST)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH600403MTUB900@brm-avmta-1.central.sun.com>; Fri,
 27 Apr 2007 18:32:18 -0600 (MDT)
Received: from sca-ea-mail-2.sun.com ([192.18.43.25])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH6006E2MTT64A0@brm-avmta-1.central.sun.com>; Fri,
 27 Apr 2007 18:32:17 -0600 (MDT)
Received: from relay24.sun.com
 (ip192-12-251-74.block6.us.syntegra.com [192.12.251.74])
	by sca-ea-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l3S0WHA8026884;
 Sat, 28 Apr 2007 00:32:17 +0000 (GMT)
Received: from mms25es.sun.com ([150.143.232.94] [150.143.232.94])
 by relay24.sun.com with ESMTP id BT-MMP-1394909; Sat,
 28 Apr 2007 00:32:16 +0000 (Z)
Received: from mms24bas.mms.us.syntegra.com
 (relay24.mms.us.syntegra.com [192.12.251.70]) by mms25es.sun.com with ESMTP id
 BT-MMP-244694; Sat, 28 Apr 2007 00:32:16 +0000 (Z)
Received: from mail-in-12.arcor-online.net ([151.189.21.52] [151.189.21.52])
 by relay24.sun.com with ESMTP id BT-MMP-7276121; Sat,
 28 Apr 2007 00:32:16 +0000 (Z)
Received: from mail-in-01-z2.arcor-online.net
 (mail-in-05-z2.arcor-online.net [151.189.8.17])	by mail-in-12.arcor-online.net
 (Postfix) with ESMTP id AD5864C27D; Sat, 28 Apr 2007 02:32:15 +0200 (CEST)
Received: from mail-in-13.arcor-online.net
 (mail-in-13.arcor-online.net [151.189.21.53])
	by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id 9F97C2DA967; Sat,
 28 Apr 2007 02:32:15 +0200 (CEST)
Received: from jupiterb48.nrubsig.org
 (dslb-084-058-195-116.pools.arcor-ip.net [84.58.195.116])
	by mail-in-13.arcor-online.net (Postfix) with ESMTP id 78BF322D161; Sat,
 28 Apr 2007 02:32:15 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])	by jupiterb48.nrubsig.org
 (8.13.8+Sun/8.13.8) with ESMTP id l3S0WCJ7009093; Sat,
 28 Apr 2007 02:32:13 +0200 (CEST)
Date: Sat, 28 Apr 2007 02:32:12 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
Sender: gisburn@jupiterb48.nrubsig.org
To: Casper.Dik@sun.com
Cc: Nicolas Williams <Nicolas.Williams@sun.com>,
        John Plocher <John.Plocher@sun.com>, PSARC-EXT@sun.com,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>
Message-id: <4632960C.7214AAA6@nrubsig.org>
MIME-version: 1.0
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
Status: RO
Content-Length: 1890

Casper.Dik@Sun.COM wrote:
> >On Thu, Apr 26, 2007 at 02:26:49PM -0700, John Plocher wrote:
> >> > ...making things easier for users...
> >>
> >> Why should the user care about this?  By definition, things in TMPDIR
> >> are ephemeral and don't usually get noticed by users - unless the
> >> system is h0rked and there is no space left there.
> >>
> >> Since most users don't touch TMPDIR today, and in a well functioning
> >> system the existing default should "just work", I'm not sure what the
> >> problem really is...
> >
> >I think you could argue that private TMPDIRs are more secure -- no
> >chance of following a malicious symlink placed in a 1777 tmpdir if your
> >tmpdir isn't 1777.  But otherwise it doesn't seem friendlier that
> >TMPDIR=/tmp.  One problem: TMPDIR should probably be mkdtemp'ed, else
> >there's a DoS (nico% mkdir /tmp/plocher; chmod 700 /tmp/plocher; echo
> >muahahaha), but if mkdtemped then how to make sure that multiple login
> >sessions for the same user share the same TMPDIR?  (Search for one?)
> 
> Unfortunately the use of TMPDIR is inherited across "su" and
> then, when users assume roles, TMPDIR no longer works.
> 
> I would think this is too risky to change.

Why ?
1. The directory created by /etc/profile always has mode 1777 set and
therefore anyone can create/read/write files in that directory. It could
be a theoretical problem for something like mode=700 but we do not
propose that in this case...
2. If there is a problem with "su" and RBAC/roles tha it is a general
problem and needs to be fixed, e.g. the hole is there and can always be
exploited by plain users setting TMPDIR and it doesn't matter whether we
set it in /etc/profile or not... right ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

From roland.mainz@nrubsig.org Fri Apr 27 17:51:12 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3S0pC6e010593
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 27 Apr 2007 17:51:12 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3S0oHIN025899;
	Fri, 27 Apr 2007 17:50:17 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH600C0BNNSDK00@nwk-avmta-2.sfbay.sun.com>; Fri,
 27 Apr 2007 17:50:16 -0700 (PDT)
Received: from sca-ea-mail-1.sun.com ([192.18.43.24])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH600B6LNNRV020@nwk-avmta-2.sfbay.sun.com>; Fri,
 27 Apr 2007 17:50:15 -0700 (PDT)
Received: from relay23.sun.com
 (relay23.sun.com [192.12.251.54] (may be forged))	by sca-ea-mail-1.sun.com
 (8.13.7+Sun/8.12.9) with ESMTP id l3S0oFj6024680; Sat,
 28 Apr 2007 00:50:15 +0000 (GMT)
Received: from mms24es.sun.com ([150.143.232.74] [150.143.232.74])
 by relay23.sun.com with ESMTP id BT-MMP-1395656; Sat,
 28 Apr 2007 00:50:15 +0000 (Z)
Received: from mms24bas.mms.us.syntegra.com
 (relay24.mms.us.syntegra.com [192.12.251.70]) by mms24es.sun.com with ESMTP id
 BT-MMP-253223; Sat, 28 Apr 2007 00:50:14 +0000 (Z)
Received: from mail-in-08.arcor-online.net ([151.189.21.48] [151.189.21.48])
 by relay24.sun.com with ESMTP id BT-MMP-7284266; Sat,
 28 Apr 2007 00:50:14 +0000 (Z)
Received: from mail-in-01-z2.arcor-online.net
 (mail-in-07-z2.arcor-online.net [151.189.8.19])	by mail-in-08.arcor-online.net
 (Postfix) with ESMTP id F3E1F27AD10; Sat, 28 Apr 2007 02:50:13 +0200 (CEST)
Received: from mail-in-06.arcor-online.net
 (mail-in-06.arcor-online.net [151.189.21.46])
	by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id DB9752C6C80; Sat,
 28 Apr 2007 02:50:13 +0200 (CEST)
Received: from jupiterb48.nrubsig.org
 (dslb-084-058-195-116.pools.arcor-ip.net [84.58.195.116])
	by mail-in-06.arcor-online.net (Postfix) with ESMTP id ADACF35E5A8; Sat,
 28 Apr 2007 02:50:13 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])	by jupiterb48.nrubsig.org
 (8.13.8+Sun/8.13.8) with ESMTP id l3S0oA56009099; Sat,
 28 Apr 2007 02:50:11 +0200 (CEST)
Date: Sat, 28 Apr 2007 02:50:10 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
Sender: gisburn@jupiterb48.nrubsig.org
To: James Carlson <james.d.carlson@sun.com>
Cc: Casper.Dik@sun.com, Nicolas Williams <Nicolas.Williams@sun.com>,
        John Plocher <John.Plocher@sun.com>, PSARC-EXT@sun.com,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>,
        Darren J Moffat <darrenm@sac.sfbay.sun.com>
Message-id: <46329A42.EB66A59D@nrubsig.org>
MIME-version: 1.0
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL>
Status: RO
Content-Length: 2994

James Carlson wrote:
> Casper.Dik@Sun.COM writes:
> > Unfortunately the use of TMPDIR is inherited across "su" and
> > then, when users assume roles, TMPDIR no longer works.
> 
> That point would seem to be a show-stopper to me.  Having an RBAC role
> fail to work because $TMPDIR is now set (when it wasn't before) and
> owned by the original user would be an incompatible change and clearly
> a Bad Thing.

I doubt the RBAC role will fail because the role application can write
to /tmp/$LOGNAME unless the user him-/herself changes the mode to
something different than 1777.

> I've been staying out of this particular issue until now, as I could
> see both sides of it.  But it looks now like the weight of evidence is
> against the proposal: not just RBAC damage, but also unnecessary
> *extra* clutter in /tmp (due to the one-per-user directories,

Which extra "clutter" ? Right now a plain desktop user always creates
multiple files in /tmp, for example:
-- snip --
$ ls -l /tmp | fgrep fosdem
drwx------  2 gfosdem gfosdem      48 2006-02-25 10:15 gconfd-gfosdem
drwx------  2 gfosdem gfosdem     120 2006-03-02 20:30 kde-gfosdem
drwx------  3 gfosdem gfosdem     112 2006-03-02 20:41 ksocket-gfosdem
drwx------  2 gfosdem gfosdem     144 2006-02-25 10:15 orbit-gfosdem
srw-------  1 gfosdem gfosdem       0 2006-03-02 20:30
scim-panel-socket-:1-gfosdem
drwx------  2 gfosdem gfosdem      80 2006-02-25 13:27 vmware-gfosdem
-- snip --
The matching account was only used for a FOSDEM demo and never again and
the two logins ever made by it generated six files.
IMO it is better to create a subdir in this case since it means that $
ls -l /tmp # only lists _one_ entry per user instead of six. IMO this is
less clutter (1/6th in the example above) in /tmp and not more (unless
you start counting all inodes in the whole /tmp filesystem).

> even if
> no temp files are used), but also the fact that admins can already set
> this up if they want,

Yes, but it may be nice to have something like this done by default
since it appears to be a common construct which is usefull for both
end-users and adminstrators.

> that the target of "easy to use" (the isolated,
> one-user system) won't benefit at all, and that it seems to fix a
> non-existent problem (who cares what's in /tmp anyway?)

It appears that the desktop environment make use of $TMPDIR and expose
this "interface" to the end-user (see
http://mail.opensolaris.org/pipermail/shell-discuss/2007-April/000245.html)
- which matches my obervation how our users here behave.

> all argue
> against doing this.
> 
> As it's no longer "obvious" and thus not appropriate for a fast-track,
> if that's not removed from the proposal, I'll derail for a full review
> and a written opinion.

Darren: Any comments/objections/suggestions/etc. about this ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

From roland.mainz@nrubsig.org Fri Apr 27 17:52:51 2007
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3S0qpDP010683
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 27 Apr 2007 17:52:51 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3S0puiN052834;
	Fri, 27 Apr 2007 18:51:56 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH600C05NQKGU00@nwk-avmta-2.sfbay.sun.com>; Fri,
 27 Apr 2007 17:51:56 -0700 (PDT)
Received: from sca-ea-mail-3.sun.com ([192.18.43.21])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH600BFMNQKV020@nwk-avmta-2.sfbay.sun.com>; Fri,
 27 Apr 2007 17:51:56 -0700 (PDT)
Received: from relay23.sun.com
 (relay23.sun.com [192.12.251.54] (may be forged))	by sca-ea-mail-3.sun.com
 (8.13.6+Sun/8.12.9) with ESMTP id l3S0ptqI000008; Sat,
 28 Apr 2007 00:51:56 +0000 (GMT)
Received: from mms23es.sun.com ([150.143.232.54] [150.143.232.54])
 by relay23.sun.com with ESMTP id BT-MMP-1395712; Sat,
 28 Apr 2007 00:51:55 +0000 (Z)
Received: from mms25bas.mms.us.syntegra.com
 (ip192-12-251-90.block6.us.syntegra.com [192.12.251.90])
 by mms23es.sun.com with ESMTP id BT-MMP-277460; Sat,
 28 Apr 2007 00:51:55 +0000 (Z)
Received: from mail-in-07.arcor-online.net ([151.189.21.47] [151.189.21.47])
 by relay21.sun.com with ESMTP id BT-MMP-9459860; Sat,
 28 Apr 2007 00:51:55 +0000 (Z)
Received: from mail-in-01-z2.arcor-online.net
 (mail-in-07-z2.arcor-online.net [151.189.8.19])	by mail-in-07.arcor-online.net
 (Postfix) with ESMTP id D0FE424AE96; Sat, 28 Apr 2007 02:51:54 +0200 (CEST)
Received: from mail-in-06.arcor-online.net
 (mail-in-06.arcor-online.net [151.189.21.46])
	by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id C3E882C6C72; Sat,
 28 Apr 2007 02:51:54 +0200 (CEST)
Received: from jupiterb48.nrubsig.org
 (dslb-084-058-195-116.pools.arcor-ip.net [84.58.195.116])
	by mail-in-06.arcor-online.net (Postfix) with ESMTP id A5EF435E5A8; Sat,
 28 Apr 2007 02:51:54 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])	by jupiterb48.nrubsig.org
 (8.13.8+Sun/8.13.8) with ESMTP id l3S0pquJ009102; Sat,
 28 Apr 2007 02:51:53 +0200 (CEST)
Date: Sat, 28 Apr 2007 02:51:52 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
Sender: gisburn@jupiterb48.nrubsig.org
To: Tim Marsland <tim.marsland@sun.com>
Cc: Casper.Dik@sun.com, Nicolas Williams <Nicolas.Williams@sun.com>,
        John Plocher <John.Plocher@sun.com>, PSARC-EXT@sun.com,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>
Message-id: <46329AA8.B7AD2601@nrubsig.org>
MIME-version: 1.0
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <20070427212316.GC254295@eng.sun.com>
Status: RO
Content-Length: 656

Tim Marsland wrote:
> > Unfortunately the use of TMPDIR is inherited across "su" and
> > then, when users assume roles, TMPDIR no longer works.
> >
> > I would think this is too risky to change.
> 
> It doesn't seem like *risk* per se, it's more like it's an incomplete
> change.  If we're to make TMPDIR "work" correctly, it needs to handle
> the su and rbac case too.

AFAIK no changes are required if the "/tmp/${LOGNAME}"-directory is
created with mode=1777, right ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

From roland.mainz@nrubsig.org Fri Apr 27 18:18:38 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3S1IbFv013391
	for <psarc-ext@sac.sfbay.Sun.COM>; Fri, 27 Apr 2007 18:18:37 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l3S1HbQ2023039;
	Sat, 28 Apr 2007 09:17:39 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH60030ZOXDN200@nwk-avmta-1.sfbay.Sun.COM>; Fri,
 27 Apr 2007 18:17:37 -0700 (PDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH6005XTOX6RZ90@nwk-avmta-1.sfbay.Sun.COM>; Fri,
 27 Apr 2007 18:17:31 -0700 (PDT)
Received: from relay23.sun.com
 (relay23.sun.com [192.12.251.54] (may be forged))	by brmea-mail-1.sun.com
 (8.13.6+Sun/8.12.9) with ESMTP id l3S1HUfw004529; Sat,
 28 Apr 2007 01:17:30 +0000 (GMT)
Received: from mms22es.sun.com ([150.143.232.34] [150.143.232.34])
 by relay23.sun.com with ESMTP id BT-MMP-1396711; Sat,
 28 Apr 2007 01:17:30 +0000 (Z)
Received: from mms25bas.mms.us.syntegra.com
 (ip192-12-251-90.block6.us.syntegra.com [192.12.251.90])
 by mms22es.sun.com with ESMTP id BT-MMP-263981; Sat,
 28 Apr 2007 01:17:30 +0000 (Z)
Received: from mail-in-01.arcor-online.net ([151.189.21.41] [151.189.21.41])
 by relay21.sun.com with ESMTP id BT-MMP-9474218; Sat,
 28 Apr 2007 01:17:29 +0000 (Z)
Received: from mail-in-01-z2.arcor-online.net
 (mail-in-11-z2.arcor-online.net [151.189.8.28])	by mail-in-01.arcor-online.net
 (Postfix) with ESMTP id 09A6F174A2B; Sat, 28 Apr 2007 03:17:29 +0200 (CEST)
Received: from mail-in-02.arcor-online.net
 (mail-in-02.arcor-online.net [151.189.21.42])
	by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id F1BD4345D60; Sat,
 28 Apr 2007 03:17:28 +0200 (CEST)
Received: from jupiterb48.nrubsig.org
 (dslb-084-058-195-116.pools.arcor-ip.net [84.58.195.116])
	by mail-in-02.arcor-online.net (Postfix) with ESMTP id A017136E862; Sat,
 28 Apr 2007 03:17:28 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])	by jupiterb48.nrubsig.org
 (8.13.8+Sun/8.13.8) with ESMTP id l3S1HRkI009115; Sat,
 28 Apr 2007 03:17:27 +0200 (CEST)
Date: Sat, 28 Apr 2007 03:17:27 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
Sender: gisburn@jupiterb48.nrubsig.org
To: "I. Szczesniak" <iszczesniak@gmail.com>
Cc: "Casper.Dik@sun.com" <Casper.Dik@Sun.COM>,
        Nicolas Williams <Nicolas.Williams@Sun.COM>,
        John Plocher <John.Plocher@Sun.COM>, PSARC-EXT@Sun.COM
Message-id: <4632A0A7.738F4E8E@nrubsig.org>
MIME-version: 1.0
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <cd45720b0704270223o65be9be1p60981cfee78bbc5f@mail.gmail.com>
Status: RO
Content-Length: 1719

"I. Szczesniak" wrote:
> 
> On 4/27/07, Casper.Dik@sun.com <Casper.Dik@sun.com> wrote:
> >
> > >On Thu, Apr 26, 2007 at 02:26:49PM -0700, John Plocher wrote:
> > >> > ...making things easier for users...
> > >>
> > >> Why should the user care about this?  By definition, things in TMPDIR
> > >> are ephemeral and don't usually get noticed by users - unless the
> > >> system is h0rked and there is no space left there.
> > >>
> > >> Since most users don't touch TMPDIR today, and in a well functioning
> > >> system the existing default should "just work", I'm not sure what the
> > >> problem really is...
> > >
> > >I think you could argue that private TMPDIRs are more secure -- no
> > >chance of following a malicious symlink placed in a 1777 tmpdir if your
> > >tmpdir isn't 1777.  But otherwise it doesn't seem friendlier that
> > >TMPDIR=/tmp.  One problem: TMPDIR should probably be mkdtemp'ed, else
> > >there's a DoS (nico% mkdir /tmp/plocher; chmod 700 /tmp/plocher; echo
> > >muahahaha), but if mkdtemped then how to make sure that multiple login
> > >sessions for the same user share the same TMPDIR?  (Search for one?)
> >
> > Unfortunately the use of TMPDIR is inherited across "su" and
> > then, when users assume roles, TMPDIR no longer works.
> >
> > I would think this is too risky to change.
> 
> If that's true then the TMPDIR functionality needs to be removed from
> libc and all applications because it is insecure by default.

AFAIK thats not neccesary since the mode=1777 AFAIK doesn't trigger the
problem...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

From roland.mainz@nrubsig.org Fri Apr 27 18:20:23 2007
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3S1KNX2013761
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 27 Apr 2007 18:20:23 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3S1JUS2024931;
	Fri, 27 Apr 2007 18:19:30 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH600301P0IQL00@nwk-avmta-1.sfbay.Sun.COM>; Fri,
 27 Apr 2007 18:19:30 -0700 (PDT)
Received: from sca-ea-mail-1.sun.com ([192.18.43.24])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH6005IBP07S980@nwk-avmta-1.sfbay.Sun.COM>; Fri,
 27 Apr 2007 18:19:19 -0700 (PDT)
Received: from relay21.sun.com
 (relay21.sun.com [192.12.251.14] (may be forged))	by sca-ea-mail-1.sun.com
 (8.13.7+Sun/8.12.9) with ESMTP id l3S1JIXm028846; Sat,
 28 Apr 2007 01:19:19 +0000 (GMT)
Received: from mms25es.sun.com ([150.143.232.94] [150.143.232.94])
 by relay21.sun.com with ESMTP id BT-MMP-1395930; Sat,
 28 Apr 2007 01:19:18 +0000 (Z)
Received: from relay22.sun.com (relay22.sun.com [192.12.251.34])
 by mms25es.sun.com with ESMTP id BT-MMP-266554; Sat,
 28 Apr 2007 01:19:18 +0000 (Z)
Received: from mail-in-13.arcor-online.net ([151.189.21.53] [151.189.21.53])
 by relay22.sun.com with ESMTP id BT-MMP-6790630; Sat,
 28 Apr 2007 01:19:18 +0000 (Z)
Received: from mail-in-14-z2.arcor-online.net
 (mail-in-14-z2.arcor-online.net [151.189.8.31])	by mail-in-13.arcor-online.net
 (Postfix) with ESMTP id 6EFB21E541E; Sat, 28 Apr 2007 03:19:17 +0200 (CEST)
Received: from mail-in-02.arcor-online.net
 (mail-in-02.arcor-online.net [151.189.21.42])
	by mail-in-14-z2.arcor-online.net (Postfix) with ESMTP id 4A484100C3; Sat,
 28 Apr 2007 03:19:17 +0200 (CEST)
Received: from jupiterb48.nrubsig.org
 (dslb-084-058-195-116.pools.arcor-ip.net [84.58.195.116])
	by mail-in-02.arcor-online.net (Postfix) with ESMTP id 2A85036E862; Sat,
 28 Apr 2007 03:19:17 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])	by jupiterb48.nrubsig.org
 (8.13.8+Sun/8.13.8) with ESMTP id l3S1JEM5009118; Sat,
 28 Apr 2007 03:19:15 +0200 (CEST)
Date: Sat, 28 Apr 2007 03:19:14 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
Sender: gisburn@jupiterb48.nrubsig.org
To: John Plocher <John.Plocher@sun.com>
Cc: PSARC-EXT@sun.com,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>
Message-id: <4632A112.36E65566@nrubsig.org>
MIME-version: 1.0
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <46312EDE.6A61848E@nrubsig.org> <4631411E.2000109@Sun.Com>
Status: RO
Content-Length: 922

John Plocher wrote:
> Roland Mainz wrote:
> > For users it appears to be friendlier (compared to have _all_ the files
> > in one flat directory where you have to search for your files via $ ls
> > -l | fgrep "myusername" # or worse).
> 
> But /why/ would I ever be searching for files there?  I have /never/
> had a reason to do a "ls -l $TMPDIR" in all my 20 years of using Unix,
> USG, Linux and Solaris.  I could see this proposal as being interesting
> if this were an operation that was frequently performed, but looking
> under the covers as the various programs do their thing isn't something
> that users usually do...

What about
http://mail.opensolaris.org/pipermail/shell-discuss/2007-April/000245.html
and Shawn's comments ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

From sacadmin Fri Apr 27 18:24:48 2007
Received: from sfbaymail1sca.SFBay.Sun.COM (sfbaymail1sca.SFBay.Sun.COM [129.145.154.35])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3S1OmCr014177;
	Fri, 27 Apr 2007 18:24:48 -0700 (PDT)
Received: from brmea-mail-4.sun.com (brmea-mail-4.Sun.COM [192.18.98.36])
	by sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l3S1NsjD005194;
	Fri, 27 Apr 2007 18:23:54 -0700 (PDT)
Received: from relay24.sun.com (ip192-12-251-74.block6.us.syntegra.com [192.12.251.74])
	by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3S1NsfD010929;
	Sat, 28 Apr 2007 01:23:54 GMT
Received: from mms25es.sun.com ([150.143.232.94] [150.143.232.94]) by relay24.sun.com with ESMTP id BT-MMP-1396845; Sat, 28 Apr 2007 01:23:54 Z
Received: from mms25bas.mms.us.syntegra.com (ip192-12-251-90.block6.us.syntegra.com [192.12.251.90]) by mms25es.sun.com with ESMTP id BT-MMP-268517; Sat, 28 Apr 2007 01:23:54 Z
Received: from mail-in-08.arcor-online.net ([151.189.21.48] [151.189.21.48]) by relay21.sun.com with ESMTP id BT-MMP-9477619; Sat, 28 Apr 2007 01:23:53 Z
Received: from mail-in-01-z2.arcor-online.net (mail-in-12-z2.arcor-online.net [151.189.8.29])
	by mail-in-08.arcor-online.net (Postfix) with ESMTP id 608BE27AD8B;
	Sat, 28 Apr 2007 03:23:53 +0200 (CEST)
Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45])
	by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id 33EA2279403;
	Sat, 28 Apr 2007 03:23:53 +0200 (CEST)
Received: from jupiterb48.nrubsig.org (dslb-084-058-195-116.pools.arcor-ip.net [84.58.195.116])
	by mail-in-05.arcor-online.net (Postfix) with ESMTP id 14E2C1DB1F2;
	Sat, 28 Apr 2007 03:23:53 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])
	by jupiterb48.nrubsig.org (8.13.8+Sun/8.13.8) with ESMTP id l3S1Nnmw009121;
	Sat, 28 Apr 2007 03:23:50 +0200 (CEST)
Sender: gisburn@jupiterb48.nrubsig.org
Message-Id: <4632A225.FDE2A1E3@nrubsig.org>
Date: Sat, 28 Apr 2007 03:23:49 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
X-Accept-Language: en
MIME-Version: 1.0
To: Alan Coopersmith <alan.coopersmith@sun.com>
CC: Darren J Moffat <darrenm@sac.sfbay.sun.com>, PSARC@sac.sfbay.sun.com,
        Shells discussion <shell-discuss@opensolaris.org>
Subject: Re: Default shell environment: TMPDIR [PSARC/2007/236 Timeout:  
 05/02/2007]
References: <200704251556.l3PFubcW003010@sac.sfbay.sun.com> <46311C75.7010405@sun.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 846

Alan Coopersmith wrote:
> Darren J Moffat wrote:
> > - A modification to "/etc/profile" (and the matching csh file) to set TMPDIR
> >   to  "/tmp/${LOGNAME}" if TMPDIR was not set yet.
> 
> Note that this will move the default location used for files
> created with tempnam() etal. from the on-disk /var/tmp to the
> tmpfs /tmp.   Does anything depend on being able to access
> such files across reboots (like editor autosave/recovery) ?

AFAIK no since APIs like |tmpfile()| and |tmpnam()| are for temporary
data only and they should not be used for permanent storage (e.g. AFAIK
it is a bug when applications would use these APIs for storing permanent
data).

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

From sacadmin Fri Apr 27 19:20:38 2007
Received: from jurassic-x4600.sfbay.sun.com (cretaceous [129.146.17.59])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3S2KciC016440;
	Fri, 27 Apr 2007 19:20:38 -0700 (PDT)
Received: from [129.150.12.53] (vpn-129-150-12-53.SFBay.Sun.COM [129.150.12.53])
	by jurassic-x4600.sfbay.sun.com (8.14.1+Sun/8.14.1) with ESMTP id l3S2JYBo307451;
	Fri, 27 Apr 2007 19:19:34 -0700 (PDT)
Message-ID: <4632AF2E.7070404@sun.com>
Date: Fri, 27 Apr 2007 16:19:26 -1000
From: Joseph Kowalski <jek3@sun.com>
User-Agent: Thunderbird 1.5.0.5 (X11/20060925)
MIME-Version: 1.0
To: Roland Mainz <roland.mainz@nrubsig.org>
CC: Alan Coopersmith <alan.coopersmith@sun.com>,
        Darren J Moffat <darrenm@sac.sfbay.sun.com>, PSARC@sac.sfbay.sun.com,
        Shells discussion <shell-discuss@opensolaris.org>
Subject: Re: Default shell environment: TMPDIR [PSARC/2007/236 Timeout: 05/02/2007]
References: <200704251556.l3PFubcW003010@sac.sfbay.sun.com> <46311C75.7010405@sun.com> <4632A225.FDE2A1E3@nrubsig.org>
In-Reply-To: <4632A225.FDE2A1E3@nrubsig.org>
Content-Type: multipart/alternative;
 boundary="------------090000060103050602000103"
Status: RO
Content-Length: 5892

This is a multi-part message in MIME format.
--------------090000060103050602000103
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Roland Mainz wrote:
> Alan Coopersmith wrote:
>   
>> Note that this will move the default location used for files
>> created with tempnam() etal. from the on-disk /var/tmp to the
>> tmpfs /tmp.   Does anything depend on being able to access
>> such files across reboots (like editor autosave/recovery) ?
>>     
>
> AFAIK no since APIs like |tmpfile()| and |tmpnam()| are for temporary
> data only and they should not be used for permanent storage (e.g. AFAIK
> it is a bug when applications would use these APIs for storing permanent
> data).
>   

I'm not sure it is architecture, but another attribute of moving from 
/var/tmp to /tmp is that the size of "TMPDIR" is now constrained by the 
size of the swap slice, rather than the "/var" slice (and a limited 
percentage of swap). Configurations that used to run, may now fail.  
Understand, this is a change we could allow, but considering that the 
justification/benefit for this appears to be aesthetics, is it worth 
it?  (BTW: A lot of Solaris installations have rather small swap areas 
because the install default is rather dinky)

Of course, pointing TMPDIR at /var/tmp/$USER addresses this particular 
concern.

Also, what do the editors use for their temporary file?  It would seem 
to be a bit of a problem if they used TMPDIR. :-)   (If they do, its 
just a bug, but bugs happen and there are a couple too many editors in 
the world, its not only the ones shipping with Solaris.) Then again, it 
would seem that we would lose a fair amount of the benefit of per-user 
directories if they didn't use them.  (BTW, can I shoot whoever decided 
that making me manually remove a vim *.swp file after a recovery was a 
good idea?  Speaking of things to fix for the benefit of the novice 
user....)

Staying silent on the "EOU for system administrators" aspect of per-user 
subdirectories, I think its a bad idea to move this from non-volatile 
storage to volatile.  (For that matter, just due to the issues with 
slices/partitioning, I think its would be a bad idea to move it at all.) 
From today's perspective, non-volatile may be suboptimal, but it wasn't 
a random choice.  See:

    1991/024  TMPDIR default    Joseph Kowalski       closed approved 
07/22/92       Jarrett Rosenberg

Yep, this was the 24th PSARC case *ever* submitted (That's me as project 
lead for SunOS 5.0, Jarrett is the ARC member ).

These choices were made with an eye to compatibility with SunOS 4.x and 
System V.

- jek3




--------------090000060103050602000103
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Roland Mainz wrote:
<blockquote cite="mid4632A225.FDE2A1E3@nrubsig.org" type="cite">
  <pre wrap="">Alan Coopersmith wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Note that this will move the default location used for files
created with tempnam() etal. from the on-disk /var/tmp to the
tmpfs /tmp.   Does anything depend on being able to access
such files across reboots (like editor autosave/recovery) ?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
AFAIK no since APIs like |tmpfile()| and |tmpnam()| are for temporary
data only and they should not be used for permanent storage (e.g. AFAIK
it is a bug when applications would use these APIs for storing permanent
data).
  </pre>
</blockquote>
<br>
I'm not sure it is architecture, but another attribute of moving from
/var/tmp to /tmp is that the size of "TMPDIR" is now constrained by the
size of the swap slice, rather than the "/var" slice (and a limited
percentage of swap). Configurations that used to run, may now fail.&nbsp;
Understand, this is a change we could allow, but considering that the
justification/benefit for this appears to be aesthetics, is it worth
it?&nbsp; (BTW: A lot of Solaris installations have rather small swap areas
because the install default is rather dinky)<br>
<br>
Of course, pointing TMPDIR at /var/tmp/$USER addresses this particular
concern.<br>
<br>
Also, what do the editors use for their temporary file?&nbsp; It would seem
to be a bit of a problem if they used TMPDIR. <span
 class="moz-smiley-s1"><span> :-)&nbsp;&nbsp; </span></span>(If they do, its
just a bug, but bugs happen and there are a couple too many editors in
the world, its not only the ones shipping with Solaris.) Then again, it
would seem that we would lose a fair amount of the benefit of per-user
directories if they didn't use them.&nbsp; (BTW, can I shoot whoever decided
that making me manually remove a vim *.swp file after a recovery was a
good idea?&nbsp; Speaking of things to fix for the benefit of the novice
user....)<br>
<br>
Staying silent on the "EOU for system administrators" aspect of
per-user subdirectories, I think its a bad idea to move this from
non-volatile storage to volatile.&nbsp; (For that matter, just due to the
issues with slices/partitioning, I think its would be a bad idea to
move it at all.) From today's perspective, non-volatile may be
suboptimal, but it wasn't a random choice.&nbsp; See:<br>
<br>
&nbsp;&nbsp;&nbsp; 1991/024&nbsp; TMPDIR default&nbsp;&nbsp;&nbsp; Joseph Kowalski&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; closed approved
07/22/92&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Jarrett Rosenberg<br>
<br>
Yep, this was the 24th PSARC case *ever* submitted (That's me as
project lead for SunOS 5.0, Jarrett is the ARC member ).<br>
<br>
These choices were made with an eye to compatibility with SunOS 4.x and
System V.<br>
<br>
- jek3<br>
<br>
<br>
<br>
</body>
</html>

--------------090000060103050602000103--

From schilling@fokus.fraunhofer.de Sat Apr 28 06:24:47 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3SDOk5C011105
	for <psarc-ext@sac.sfbay.Sun.COM>; Sat, 28 Apr 2007 06:24:47 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l3SDNnmK006362;
	Sat, 28 Apr 2007 21:23:50 +0800 (SGT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH700F01MJPT900@brm-avmta-1.central.sun.com>; Sat,
 28 Apr 2007 07:23:49 -0600 (MDT)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH700EOCMJOL900@brm-avmta-1.central.sun.com>; Sat,
 28 Apr 2007 07:23:48 -0600 (MDT)
Received: from relay44i.sun.com ([192.5.209.118])
	by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3SDNmFY014407; Sat,
 28 Apr 2007 13:23:48 +0000 (GMT)
Received: from mms48es.sun.com ([160.41.221.231] [160.41.221.231])
 by relay44i.sun.com with ESMTP id BT-MMP-230852; Sat,
 28 Apr 2007 13:23:47 +0000 (Z)
Received: from relay44i.sun.com ([192.5.209.118] [192.5.209.118])
 by mms48es.sun.com with ESMTP id BT-MMP-1712030; Sat,
 28 Apr 2007 13:23:47 +0000 (Z)
Received: from mailhub.fokus.fraunhofer.de ([193.174.154.14] [193.174.154.14])
 by relay4i.sun.com with ESMTP id BT-MMP-1930815; Sat,
 28 Apr 2007 13:23:47 +0000 (Z)
Received: from burner.fokus.fraunhofer.de (burner [10.147.65.166])
	by mailhub.fokus.fraunhofer.de (8.11.6p2/8.11.6) with ESMTP id l3SDNif28103;
 Sat, 28 Apr 2007 15:23:44 +0200 (MEST)
Received: (from jes@localhost)	by burner.fokus.fraunhofer.de
 (8.12.9+Sun/8.12.9/Submit) id l3SDNN7B009880; Sat,
 28 Apr 2007 15:23:23 +0200 (CEST)
Date: Sat, 28 Apr 2007 15:23:23 +0200
From: Joerg.Schilling@fokus.fraunhofer.de (Joerg Schilling)
Subject: Re: [shell-discuss] Re: PSARC 2007/236 Default shell environment:
 TMPDIR
In-reply-to: <4632960C.7214AAA6@nrubsig.org>
Sender: schilling@fokus.fraunhofer.de
To: shell-discuss@opensolaris.org, Casper.Dik@sun.com
Cc: shell-discuss@opensolaris.org, PSARC-EXT@sun.com, Nicolas.Williams@sun.com,
        John.Plocher@sun.com
Message-id: <46334acb.lCvvl9wiEUuzkOOL%Joerg.Schilling@fokus.fraunhofer.de>
MIME-version: 1.0
Content-type: text/plain; charset=ISO8859-1
Content-transfer-encoding: 8BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <4632960C.7214AAA6@nrubsig.org>
User-Agent: nail 11.22 3/20/05
Status: RO
Content-Length: 1025

Roland Mainz <roland.mainz@nrubsig.org> wrote:

> > Unfortunately the use of TMPDIR is inherited across "su" and
> > then, when users assume roles, TMPDIR no longer works.
> > 
> > I would think this is too risky to change.
>
> Why ?
> 1. The directory created by /etc/profile always has mode 1777 set and
> therefore anyone can create/read/write files in that directory. It could
> be a theoretical problem for something like mode=700 but we do not
> propose that in this case...

If the directory is created with the POSIX file owner == the owner
of the directory and if the mode ia 1777, it is possible for the owner
to remove files creted by other users by doing:

chmod u-t $TMPDIR
rm $TMPDIR/some-file
chmod u+t $TMPDIR

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de                (uni)  
       schilling@fokus.fraunhofer.de     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily

From schilling@fokus.fraunhofer.de Sat Apr 28 06:26:51 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3SDQoaX011163
	for <psarc-ext@sac.sfbay.sun.com>; Sat, 28 Apr 2007 06:26:51 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3SDPuGt009062;
	Sat, 28 Apr 2007 06:25:57 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH70011BMN8YE00@nwk-avmta-1.sfbay.Sun.COM>; Sat,
 28 Apr 2007 06:25:56 -0700 (PDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH700K2OMN6TFA0@nwk-avmta-1.sfbay.Sun.COM>; Sat,
 28 Apr 2007 06:25:54 -0700 (PDT)
Received: from relay42i.sun.com ([192.5.209.72])
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3SDPsX4020412; Sat,
 28 Apr 2007 13:25:54 +0000 (GMT)
Received: from mms48es.sun.com ([160.41.221.231] [160.41.221.231])
 by relay42i.sun.com with ESMTP id BT-MMP-229205; Sat,
 28 Apr 2007 13:25:54 +0000 (Z)
Received: from relay41i.sun.com ([192.5.209.70] [192.5.209.70])
 by mms48es.sun.com with ESMTP id BT-MMP-1713251; Sat,
 28 Apr 2007 13:25:53 +0000 (Z)
Received: from mailhub.fokus.fraunhofer.de ([193.174.154.14] [193.174.154.14])
 by relay4i.sun.com with ESMTP id BT-MMP-1382251; Sat,
 28 Apr 2007 13:25:53 +0000 (Z)
Received: from burner.fokus.fraunhofer.de (burner [10.147.65.166])
	by mailhub.fokus.fraunhofer.de (8.11.6p2/8.11.6) with ESMTP id l3SDPpf28252;
 Sat, 28 Apr 2007 15:25:51 +0200 (MEST)
Received: (from jes@localhost)	by burner.fokus.fraunhofer.de
 (8.12.9+Sun/8.12.9/Submit) id l3SDPUG7009883; Sat,
 28 Apr 2007 15:25:30 +0200 (CEST)
Date: Sat, 28 Apr 2007 15:25:30 +0200
From: Joerg.Schilling@fokus.fraunhofer.de (Joerg Schilling)
Subject: Re: [shell-discuss] Re: PSARC 2007/236 Default shell environment:
 TMPDIR
In-reply-to: <46329A42.EB66A59D@nrubsig.org>
Sender: schilling@fokus.fraunhofer.de
To: shell-discuss@opensolaris.org, james.d.carlson@sun.com
Cc: shell-discuss@opensolaris.org, PSARC-EXT@sun.com, Nicolas.Williams@sun.com,
        John.Plocher@sun.com, darrenm@sac.sfbay.sun.com, Casper.Dik@sun.com
Message-id: <46334b4a.mZbV65LqxrIZULOH%Joerg.Schilling@fokus.fraunhofer.de>
MIME-version: 1.0
Content-type: text/plain; charset=ISO8859-1
Content-transfer-encoding: 8BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <46329A42.EB66A59D@nrubsig.org>
User-Agent: nail 11.22 3/20/05
Status: RO
Content-Length: 1266

Roland Mainz <roland.mainz@nrubsig.org> wrote:

> I doubt the RBAC role will fail because the role application can write
> to /tmp/$LOGNAME unless the user him-/herself changes the mode to
> something different than 1777.
>
> > I've been staying out of this particular issue until now, as I could
> > see both sides of it.  But it looks now like the weight of evidence is
> > against the proposal: not just RBAC damage, but also unnecessary
> > *extra* clutter in /tmp (due to the one-per-user directories,
>
> Which extra "clutter" ? Right now a plain desktop user always creates
> multiple files in /tmp, for example:
> -- snip --
> $ ls -l /tmp | fgrep fosdem
> drwx------  2 gfosdem gfosdem      48 2006-02-25 10:15 gconfd-gfosdem
> drwx------  2 gfosdem gfosdem     120 2006-03-02 20:30 kde-gfosdem

If the mode of the directory is different to 1777, this is a potential
problem for many application, even suid applications that are run by the 
owner of $TMPDIR

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de                (uni)  
       schilling@fokus.fraunhofer.de     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily

From casper@holland.sun.com Sat Apr 28 06:35:37 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3SDZaFd011396
	for <psarc-ext@sac.sfbay.Sun.COM>; Sat, 28 Apr 2007 06:35:36 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l3SDYRet007826;
	Sat, 28 Apr 2007 21:34:38 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH700601N1NAS00@nwk-avmta-2.sfbay.sun.com>; Sat,
 28 Apr 2007 06:34:35 -0700 (PDT)
Received: from sr1-eaft06-01.holland.sun.com ([129.159.237.36])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH7001SKN1LHY70@nwk-avmta-2.sfbay.sun.com>; Sat,
 28 Apr 2007 06:34:34 -0700 (PDT)
Received: from holland (room101 [129.159.248.23])
	by sr1-eaft06-01.holland.sun.com (8.13.7+Sun/8.13.7)
 with ESMTP id l3SDYUho043815; Sat, 28 Apr 2007 15:34:30 +0200 (MEST)
Date: Sat, 28 Apr 2007 15:34:30 +0200
From: Casper.Dik@sun.com
Subject: Re: [shell-discuss] Re: PSARC 2007/236 Default shell environment:
 TMPDIR
In-reply-to: <46334acb.lCvvl9wiEUuzkOOL%Joerg.Schilling@fokus.fraunhofer.de>
Sender: casper@holland.sun.com
To: Joerg.Schilling@fokus.fraunhofer.de (Joerg Schilling)
Cc: shell-discuss@opensolaris.org, PSARC-EXT@sun.com, Nicolas.Williams@sun.com,
        John.Plocher@sun.com
Message-id: <200704281334.l3SDYUho043815@sr1-eaft06-01.holland.sun.com>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <4632960C.7214AAA6@nrubsig.org>
 <46334acb.lCvvl9wiEUuzkOOL%Joerg.Schilling@fokus.fraunhofer.de>
Status: RO
Content-Length: 899


>Roland Mainz <roland.mainz@nrubsig.org> wrote:
>
>> > Unfortunately the use of TMPDIR is inherited across "su" and
>> > then, when users assume roles, TMPDIR no longer works.
>> > 
>> > I would think this is too risky to change.
>>
>> Why ?
>> 1. The directory created by /etc/profile always has mode 1777 set and
>> therefore anyone can create/read/write files in that directory. It could
>> be a theoretical problem for something like mode=700 but we do not
>> propose that in this case...
>
>If the directory is created with the POSIX file owner == the owner
>of the directory and if the mode ia 1777, it is possible for the owner
>to remove files creted by other users by doing:
>
>chmod u-t $TMPDIR
>rm $TMPDIR/some-file
>chmod u+t $TMPDIR

Even without the chmod as the removal of a file in a sticky directory
is allowed by both the owner of the file and the owner of the directory.

Casper

From sacadmin Sat Apr 28 06:40:31 2007
Received: from sfbaymail1sca.SFBay.Sun.COM (sfbaymail1sca.SFBay.Sun.COM [129.145.154.35])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3SDeV7I011499;
	Sat, 28 Apr 2007 06:40:31 -0700 (PDT)
Received: from brmea-mail-3.sun.com (brmea-mail-3.Sun.COM [192.18.98.34])
	by sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l3SDddcO000988;
	Sat, 28 Apr 2007 06:39:39 -0700 (PDT)
Received: from relay1.sun.com (relay1.sun.com [150.143.103.14] (may be forged))
	by brmea-mail-3.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3SBJrmV006725;
	Sat, 28 Apr 2007 13:39:39 GMT
Received: from mms05es.sun.com ([150.143.104.94] [150.143.104.94]) by relay1.sun.com with ESMTP id BT-MMP-315743; Sat, 28 Apr 2007 13:39:38 Z
Received: from relay1.sun.com (relay1.sun.com [150.143.103.14]) by mms05es.sun.com with ESMTP id BT-MMP-591753; Sat, 28 Apr 2007 13:39:38 Z
Received: from mailhub.fokus.fraunhofer.de ([193.174.154.14] [193.174.154.14]) by relay1.sun.com with ESMTP id BT-MMP-2694193; Sat, 28 Apr 2007 13:39:38 Z
Received: from burner.fokus.fraunhofer.de (burner [10.147.65.166])
	by mailhub.fokus.fraunhofer.de (8.11.6p2/8.11.6) with ESMTP id l3SDdZf28984;
	Sat, 28 Apr 2007 15:39:35 +0200 (MEST)
Received: (from jes@localhost)
	by burner.fokus.fraunhofer.de (8.12.9+Sun/8.12.9/Submit) id l3SDdEC5009904;
	Sat, 28 Apr 2007 15:39:14 +0200 (CEST)
Date: Sat, 28 Apr 2007 15:39:14 +0200
From: Joerg.Schilling@fokus.fraunhofer.de (Joerg Schilling)
To: shell-discuss@opensolaris.org, alan.coopersmith@sun.com
Cc: shell-discuss@opensolaris.org, PSARC@sac.sfbay.sun.com,
        darrenm@sac.sfbay.sun.com
Subject: Re: [shell-discuss] Re: Default shell environment: TMPDIR
 [PSARC/2007/236 Timeout: 05/02/2007]
Message-Id: <46334e82.rt+6pGDRgyfg8di8%Joerg.Schilling@fokus.fraunhofer.de>
References: <200704251556.l3PFubcW003010@sac.sfbay.sun.com>
 <46311C75.7010405@sun.com> <4632A225.FDE2A1E3@nrubsig.org>
In-Reply-To: <4632A225.FDE2A1E3@nrubsig.org>
User-Agent: nail 11.22 3/20/05
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO8859-1
Content-Transfer-Encoding: 8bit
Sender: schilling@fokus.fraunhofer.de
Status: RO
Content-Length: 1373

Roland Mainz <roland.mainz@nrubsig.org> wrote:

> Alan Coopersmith wrote:
> > Darren J Moffat wrote:
> > > - A modification to "/etc/profile" (and the matching csh file) to set TMPDIR
> > >   to  "/tmp/${LOGNAME}" if TMPDIR was not set yet.
> > 
> > Note that this will move the default location used for files
> > created with tempnam() etal. from the on-disk /var/tmp to the
> > tmpfs /tmp.   Does anything depend on being able to access
> > such files across reboots (like editor autosave/recovery) ?
>
> AFAIK no since APIs like |tmpfile()| and |tmpnam()| are for temporary
> data only and they should not be used for permanent storage (e.g. AFAIK
> it is a bug when applications would use these APIs for storing permanent
> data).

Storing larger amounts of data in /var/tmp is a relict from older UNIX
releases and not longer correct since 1988 when tmpfs was introduced.

In former times, peole did tend to put larger anout of data in /var/tmp
but this is no longer a good idea since tmpfs results in typically 
large amounts of fast storage to be available in /tmp.

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de                (uni)  
       schilling@fokus.fraunhofer.de     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily

From schilling@fokus.fraunhofer.de Sat Apr 28 06:46:18 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3SDkHnR011673
	for <psarc-ext@sac.sfbay.sun.com>; Sat, 28 Apr 2007 06:46:17 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3SDjIp9023588;
	Sat, 28 Apr 2007 14:45:21 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JH700605NJIVD00@nwk-avmta-2.sfbay.sun.com>; Sat,
 28 Apr 2007 06:45:18 -0700 (PDT)
Received: from brmea-mail-3.sun.com ([192.18.98.34])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JH7001RZNJII270@nwk-avmta-2.sfbay.sun.com>; Sat,
 28 Apr 2007 06:45:18 -0700 (PDT)
Received: from relay21.sun.com
 (relay21.sun.com [192.12.251.14] (may be forged))	by brmea-mail-3.sun.com
 (8.13.6+Sun/8.12.9) with ESMTP id l3SDjHA0012829; Sat,
 28 Apr 2007 13:45:18 +0000 (GMT)
Received: from mms22es.sun.com ([150.143.232.34] [150.143.232.34])
 by relay21.sun.com with ESMTP id BT-MMP-1423873; Sat,
 28 Apr 2007 13:45:17 +0000 (Z)
Received: from mms24bas.mms.us.syntegra.com
 (relay24.mms.us.syntegra.com [192.12.251.70]) by mms22es.sun.com with ESMTP id
 BT-MMP-632514; Sat, 28 Apr 2007 13:45:17 +0000 (Z)
Received: from mailhub.fokus.fraunhofer.de ([193.174.154.14] [193.174.154.14])
 by relay24.sun.com with ESMTP id BT-MMP-7703988; Sat,
 28 Apr 2007 13:45:17 +0000 (Z)
Received: from burner.fokus.fraunhofer.de (burner [10.147.65.166])
	by mailhub.fokus.fraunhofer.de (8.11.6p2/8.11.6) with ESMTP id l3SDjEf29361;
 Sat, 28 Apr 2007 15:45:14 +0200 (MEST)
Received: (from jes@localhost)	by burner.fokus.fraunhofer.de
 (8.12.9+Sun/8.12.9/Submit) id l3SDirIO009931; Sat,
 28 Apr 2007 15:44:53 +0200 (CEST)
Date: Sat, 28 Apr 2007 15:44:53 +0200
From: Joerg.Schilling@fokus.fraunhofer.de (Joerg Schilling)
Subject: Re: [shell-discuss] Re: PSARC 2007/236 Default shell environment:
 TMPDIR
In-reply-to: <200704281334.l3SDYUho043815@sr1-eaft06-01.holland.sun.com>
Sender: schilling@fokus.fraunhofer.de
To: Casper.Dik@sun.com
Cc: shell-discuss@opensolaris.org, PSARC-EXT@sun.com, Nicolas.Williams@sun.com,
        John.Plocher@sun.com
Message-id: <46334fd5.hWBC7GL6jUjlT6p2%Joerg.Schilling@fokus.fraunhofer.de>
MIME-version: 1.0
Content-type: text/plain; charset=ISO8859-1
Content-transfer-encoding: 8BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <4632960C.7214AAA6@nrubsig.org>
 <46334acb.lCvvl9wiEUuzkOOL%Joerg.Schilling@fokus.fraunhofer.de>
 <200704281334.l3SDYUho043815@sr1-eaft06-01.holland.sun.com>
User-Agent: nail 11.22 3/20/05
Status: RO
Content-Length: 802

Casper.Dik@sun.com wrote:

> >If the directory is created with the POSIX file owner == the owner
> >of the directory and if the mode ia 1777, it is possible for the owner
> >to remove files creted by other users by doing:
> >
> >chmod u-t $TMPDIR
> >rm $TMPDIR/some-file
> >chmod u+t $TMPDIR
>
> Even without the chmod as the removal of a file in a sticky directory
> is allowed by both the owner of the file and the owner of the directory.

Maybe I forgot about this because /tmp/ is owned by root ;-)

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de                (uni)  
       schilling@fokus.fraunhofer.de     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily

From John.Plocher@Sun.COM Sun Apr 29 22:38:44 2007
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3U5ciEu014871
	for <psarc-ext@sac.sfbay.sun.com>; Sun, 29 Apr 2007 22:38:44 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3U5boHv020561
	for <@sunmail2sca.sfbay.sun.com:PSARC-EXT@sun.com>; Sun, 29 Apr 2007 22:37:50 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHA00201QB1HX00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Sun, 29 Apr 2007 22:37:49 -0700 (PDT)
Received: from nwk-ea-fw-1.sun.com ([10.4.134.6]) by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHA00LR4QALPK10@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Sun,
 29 Apr 2007 22:37:49 -0700 (PDT)
Received: from d1-sfbay-10.sun.com ([192.18.39.120])
	by nwk-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3U5bX8x015091	for
 <PSARC-EXT@sun.com>; Sun, 29 Apr 2007 22:37:33 -0700 (PDT)
Received: from conversion-daemon.d1-sfbay-10.sun.com by d1-sfbay-10.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JHA00C01PT6H900@d1-sfbay-10.sun.com>
 (original mail from John.Plocher@Sun.COM)
 for PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Sun,
 29 Apr 2007 22:37:33 -0700 (PDT)
Received: from [192.168.168.4] ([66.166.204.98])
 by d1-sfbay-10.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3
 2006)) with ESMTPSA id <0JHA000JAQAKNJ60@d1-sfbay-10.sun.com>; Sun,
 29 Apr 2007 22:37:32 -0700 (PDT)
Date: Sun, 29 Apr 2007 22:37:27 -0700
From: John Plocher <John.Plocher@Sun.COM>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <46329A42.EB66A59D@nrubsig.org>
Sender: John.Plocher@Sun.COM
To: Roland Mainz <roland.mainz@nrubsig.org>
Cc: James Carlson <James.D.Carlson@Sun.COM>, Casper.Dik@Sun.COM,
        Darren J Moffat <darrenm@sac.sfbay.sun.com>,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>,
        PSARC-EXT@Sun.COM
Message-id: <46358097.7030106@Sun.Com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <46329A42.EB66A59D@nrubsig.org>
User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221)
Status: RO
Content-Length: 2231

Roland Mainz wrote:
> Which extra "clutter" ? Right now a plain desktop user always creates
> multiple files in /tmp, for example:

So, it sounds like the desktop code could be cleaned up to not
drop turds everywhere - both in $TMPDIR and in $HOME.  IMHO,
whacking only TMPDIR and not fixing the other isn't really much
of a fix...

I have to ask why your users are doing their stuff in TMPDIR
and not in $HOME?  What is it about TMPDIR that they find
interesting?  The reasons that come to my mind are (but
note that I am not a TMPDIE user :-)

     o it may randomly be wiped out during a reboot
     o it is assumed to be fast access ala ramdisk
     o it isn't QUOTA'd like $HOME?

This leads me to ask why not set TMPDIR to $HOME/tmp?

Divvying up /tmp into per-user subdirs seems aimed more at
the admin than the end user, and this discussion points out
that different admins value different policies...

Josh Hurst wrote
> All desktops expose TMPDIR to the users. KDE and Enlightenment have
> bookmarks in the dialogs, Mozilla stores downloads in TMPDIR by
> default and Opera downloads files for plugins and external
> applications there. The users know about that and use TMPDIR


See above - why should /I/ care about TMPDIR - why is it interesting?
(I understand why programs find it interesting...)

I can't depend on anything (plugins, downloads, etc ) remaining there
across reboots; in most cases the apps that put things there remove
them as well; if they don't, they have a bug :-)  If I *care* about
mozilla downloads, I probably should set the browser config to
download things into $HOME/somewhere.  Otherwise all it is good for
is stuffing that PDF file while the browser invokes acrobat to display
it. Once I close the viewer window, the file /should/ be automatically
deleted.

On a single user system, it really doesn't matter which resources are
used for this stuff - $HOME, /tmp, ... - it's all mine anyways.  But
on that shared university system, /tmp is a resource-limited shared
resource and should not be used as an extension of the per-user $HOME
disk allocation.  Or, in other words, maybe the real fix here is to
fix Mozilla (etc) to default their download dirs to $HOME/Downloads :-)

   -John




From Darren.Moffat@sun.com Mon Apr 30 03:21:21 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3UALKO8024875
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 30 Apr 2007 03:21:20 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3UAKIW4020310
	for <@newsunmail1brm.central.sun.com:PSARC-EXT@sun.com>; Mon, 30 Apr 2007 11:20:24 +0100 (BST)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHB00F013DXPM00@brm-avmta-1.central.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Mon, 30 Apr 2007 04:20:21 -0600 (MDT)
Received: from gmp-ea-fw-1.sun.com ([129.156.42.6])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHB0062L3DWZ6D0@brm-avmta-1.central.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Mon,
 30 Apr 2007 04:20:21 -0600 (MDT)
Received: from d1-emea-09.sun.com ([192.18.2.119])
	by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3UAKJWg025547	for
 <PSARC-EXT@sun.com>; Mon, 30 Apr 2007 10:20:19 +0000 (GMT)
Received: from conversion-daemon.d1-emea-09.sun.com by d1-emea-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JHB009013B9KG00@d1-emea-09.sun.com>
 (original mail from Darren.Moffat@Sun.COM)
 for PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Mon,
 30 Apr 2007 11:20:19 +0100 (BST)
Received: from [129.156.173.21] by d1-emea-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JHB007FJ3DUOD10@d1-emea-09.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Mon, 30 Apr 2007 11:20:19 +0100 (BST)
Date: Mon, 30 Apr 2007 11:20:18 +0100
From: Darren J Moffat <Darren.Moffat@sun.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <17970.16885.382847.920432@gargle.gargle.HOWL>
Sender: Darren.Moffat@sun.com
To: James Carlson <James.D.Carlson@sun.com>
Cc: Casper.Dik@sun.com, John Plocher <John.Plocher@sun.com>, PSARC-EXT@sun.com
Message-id: <4635C2E2.8070407@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL>
User-Agent: Thunderbird 2.0b2 (X11/20070326)
Status: RO
Content-Length: 954

James Carlson wrote:
> Casper.Dik@Sun.COM writes:
>> Unfortunately the use of TMPDIR is inherited across "su" and
>> then, when users assume roles, TMPDIR no longer works.
> 
> That point would seem to be a show-stopper to me.  Having an RBAC role
> fail to work because $TMPDIR is now set (when it wasn't before) and
> owned by the original user would be an incompatible change and clearly
> a Bad Thing.
> 
> I've been staying out of this particular issue until now, as I could
> see both sides of it.  But it looks now like the weight of evidence is
> against the proposal: not just RBAC damage, but also unnecessary
> *extra* clutter in /tmp (due to the one-per-user directories, even if
> no temp files are used), but also the fact that admins can already set

On a system with more than one user who uses GNOME you will actually 
reduce the number of directories in /tmp if $TMPDIR is /tmp/$LOGNAME 
rather than increase them.

-- 
Darren J Moffat

From carlsonj@phorcys.east.sun.com Mon Apr 30 04:30:02 2007
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3UBU2Tt027015
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 30 Apr 2007 04:30:02 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3UBT4mS050773;
	Mon, 30 Apr 2007 05:29:06 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHB00C2B6KG7W00@nwk-avmta-1.sfbay.Sun.COM>; Mon,
 30 Apr 2007 04:29:04 -0700 (PDT)
Received: from phorcys.east.sun.com ([129.148.174.143])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHB0090F6KFI120@nwk-avmta-1.sfbay.Sun.COM>; Mon,
 30 Apr 2007 04:29:03 -0700 (PDT)
Received: from phorcys.east.sun.com (localhost [127.0.0.1])
	by phorcys.east.sun.com (8.14.1+Sun/8.14.1) with ESMTP id l3UBT2tH012645; Mon,
 30 Apr 2007 07:29:02 -0400 (EDT)
Received: (from carlsonj@localhost)
	by phorcys.east.sun.com (8.14.1+Sun/8.14.1/Submit) id l3UBT2ux012642; Mon,
 30 Apr 2007 07:29:02 -0400 (EDT)
Date: Mon, 30 Apr 2007 07:29:02 -0400
From: James Carlson <james.d.carlson@sun.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <46358097.7030106@Sun.Com>
To: John Plocher <John.Plocher@sun.com>
Cc: Roland Mainz <roland.mainz@nrubsig.org>,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>,
        PSARC-EXT@sun.com
Message-id: <17973.54014.335180.912724@gargle.gargle.HOWL>
MIME-version: 1.0
X-Mailer: VM 7.01 under Emacs 21.3.1
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <46329A42.EB66A59D@nrubsig.org>
 <46358097.7030106@Sun.Com>
Status: RO
Content-Length: 443

John Plocher writes:
> This leads me to ask why not set TMPDIR to $HOME/tmp?

I understand the impulse, but please don't do that.  $HOME is commonly
NFS-mounted, and puting $TMPDIR there will trash setuid applications.

-- 
James Carlson, Solaris Networking              <james.d.carlson@sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

From Paul.Jakma@Sun.COM Mon Apr 30 04:57:04 2007
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3UBv4tG028280
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 30 Apr 2007 04:57:04 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3UBu920022005
	for <@newsunmail1brm.central.sun.com:PSARC-EXT@sun.com>; Mon, 30 Apr 2007 04:56:09 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHB002017TKUX00@brm-avmta-1.central.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@Sun.COM); Mon, 30 Apr 2007 05:56:08 -0600 (MDT)
Received: from gmp-ea-fw-1.sun.com ([129.156.42.6])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHB00HGG7TJ0R30@brm-avmta-1.central.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@Sun.COM); Mon,
 30 Apr 2007 05:56:08 -0600 (MDT)
Received: from d1-emea-09.sun.com ([192.18.2.119])
	by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3UBu6ZT005388	for
 <PSARC-EXT@Sun.COM>; Mon, 30 Apr 2007 11:56:06 +0000 (GMT)
Received: from conversion-daemon.d1-emea-09.sun.com by d1-emea-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JHB006017OT5M00@d1-emea-09.sun.com>
 (original mail from Paul.Jakma@Sun.COM)
 for PSARC-EXT@Sun.COM (ORCPT PSARC-EXT@Sun.COM); Mon,
 30 Apr 2007 12:56:06 +0100 (BST)
Received: from melandri.lan ([62.6.163.68])
 by d1-emea-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr  3
 2006)) with ESMTPSA id <0JHB007XI7THOD10@d1-emea-09.sun.com>; Mon,
 30 Apr 2007 12:56:06 +0100 (BST)
Date: Mon, 30 Apr 2007 12:56:04 +0100 (IST)
From: Paul Jakma <Paul.Jakma@Sun.COM>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <46358097.7030106@Sun.Com>
Sender: Paul.Jakma@Sun.COM
To: John Plocher <John.Plocher@Sun.COM>
Cc: Roland Mainz <roland.mainz@nrubsig.org>,
        James Carlson <James.D.Carlson@Sun.COM>, Casper.Dik@Sun.COM,
        Darren J Moffat <darrenm@sac.sfbay.sun.com>,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>,
        PSARC-EXT@Sun.COM
Message-id: <Pine.LNX.4.64.0704301252460.7454@localhost.localdomain>
MIME-version: 1.0
Content-type: TEXT/PLAIN; format=flowed; charset=US-ASCII
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <46329A42.EB66A59D@nrubsig.org>
 <46358097.7030106@Sun.Com>
Status: RO
Content-Length: 1012

On Sun, 29 Apr 2007, John Plocher wrote:

> This leads me to ask why not set TMPDIR to $HOME/tmp?

Ouch, potentially slow. I like having GNOME use relatively fast tmpfs 
rather than NFS..

> On a single user system, it really doesn't matter which resources are 
> used for this stuff - $HOME, /tmp, ... - it's all mine anyways.  But 
> on that shared university system, /tmp is a resource-limited shared 
> resource and should not be used as an extension of the per-user $HOME 
> disk allocation.

Shared resources must be scaled appropriately.

A multi-user box can have /tmp sized according to number of users, 
single-user likewise. Fairly normal..

> Or, in other words, maybe the real fix here is to fix Mozilla (etc) to 
> default their download dirs to $HOME/Downloads :-)

/tmp/$LOGNAME/ would have my vote over anything under $HOME.

regardsm
-- 
Paul Jakma,
Solaris Networking                       Sun Microsystems, Scotland
http://opensolaris.org/os/project/quagga tel: EMEA x73150 / +44 15066 73150

From Darren.Moffat@sun.com Mon Apr 30 05:48:22 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3UCmL4J000998
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 30 Apr 2007 05:48:21 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3UCl1Ze025855
	for <@newsunmail1brm.central.sun.com:PSARC-EXT@sun.com>; Mon, 30 Apr 2007 13:47:25 +0100 (BST)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHB00801A71F400@brm-avmta-1.central.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Mon, 30 Apr 2007 06:47:25 -0600 (MDT)
Received: from gmp-ea-fw-1.sun.com ([129.156.42.6])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHB00HXMA6Z0Q60@brm-avmta-1.central.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Mon,
 30 Apr 2007 06:47:24 -0600 (MDT)
Received: from d1-emea-10.sun.com ([192.18.2.120])
	by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3UClMkW010494	for
 <PSARC-EXT@sun.com>; Mon, 30 Apr 2007 12:47:22 +0000 (GMT)
Received: from conversion-daemon.d1-emea-10.sun.com by d1-emea-10.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JHB00I01A35DF00@d1-emea-10.sun.com>
 (original mail from Darren.Moffat@Sun.COM)
 for PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Mon,
 30 Apr 2007 13:47:22 +0100 (BST)
Received: from [129.156.173.21] by d1-emea-10.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JHB0085GA6Y8G10@d1-emea-10.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Mon, 30 Apr 2007 13:47:22 +0100 (BST)
Date: Mon, 30 Apr 2007 13:47:22 +0100
From: Darren J Moffat <Darren.Moffat@sun.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <17973.54014.335180.912724@gargle.gargle.HOWL>
Sender: Darren.Moffat@sun.com
To: James Carlson <James.D.Carlson@sun.com>
Cc: John Plocher <John.Plocher@sun.com>,
        Roland Mainz <roland.mainz@nrubsig.org>,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>,
        PSARC-EXT@sun.com
Message-id: <4635E55A.3080302@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <46329A42.EB66A59D@nrubsig.org>
 <46358097.7030106@Sun.Com> <17973.54014.335180.912724@gargle.gargle.HOWL>
User-Agent: Thunderbird 2.0b2 (X11/20070326)
Status: RO
Content-Length: 532

James Carlson wrote:
> John Plocher writes:
>> This leads me to ask why not set TMPDIR to $HOME/tmp?
> 
> I understand the impulse, but please don't do that.  $HOME is commonly
> NFS-mounted, and puting $TMPDIR there will trash setuid applications.

$HOME/tmp also introduces locking issues if the same applications are 
run by the same user on multiple hosts at the same time.  Some 
applications assume that $TMPDIR is local to the host (rightly or 
wrongly isn't the issue but the fact that they do at all).

-- 
Darren J Moffat

From alan.coopersmith@sun.com Mon Apr 30 08:41:42 2007
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3UFfgXT008095
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 30 Apr 2007 08:41:42 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3UFelhF042369
	for <@newsunmail1brm.central.sun.com:PSARC-EXT@sun.com>; Mon, 30 Apr 2007 09:40:47 -0600 (MDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHB0020VI7YJW00@brm-avmta-1.central.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Mon, 30 Apr 2007 09:40:46 -0600 (MDT)
Received: from sfbaymail1sca.SFBay.Sun.COM ([129.145.154.35])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHB0001QI7WJU30@brm-avmta-1.central.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Mon,
 30 Apr 2007 09:40:44 -0600 (MDT)
Received: from [192.168.0.101]
 (vpn-129-150-18-29.SFBay.Sun.COM [129.150.18.29])	by
 sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2)
 with ESMTP id l3UFecGv008963; Mon, 30 Apr 2007 08:40:40 -0700 (PDT)
Date: Mon, 30 Apr 2007 08:39:29 -0700
From: Alan Coopersmith <alan.coopersmith@sun.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <4635C2E2.8070407@Sun.COM>
To: Darren J Moffat <Darren.Moffat@sun.com>
Cc: James Carlson <James.D.Carlson@sun.com>, Casper.Dik@sun.com,
        John Plocher <John.Plocher@sun.com>, PSARC-EXT@sun.com
Message-id: <46360DB1.7000209@sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <4635C2E2.8070407@Sun.COM>
User-Agent: Thunderbird 1.5.0.4 (X11/20060602)
Status: RO
Content-Length: 666

Darren J Moffat wrote:
> On a system with more than one user who uses GNOME you will actually 
> reduce the number of directories in /tmp if $TMPDIR is /tmp/$LOGNAME 
> rather than increase them.

Actually, you increase it, since if $TMPDIR is not set, GNOME puts
them in /var/tmp/.   (Which is the biggest cause of people setting
TMPDIR I've seen in years - if those files survive a hostname
change, such as booting your laptop and getting a different DHCP
hostname, GNOME won't start - but that's a bug, not a reason to
change the system defaults.)

-- 
	-Alan Coopersmith-           alan.coopersmith@sun.com
	 Sun Microsystems, Inc. - X Window System Engineering

From John.Plocher@Sun.COM Mon Apr 30 09:04:56 2007
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3UG4tDC009146
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 30 Apr 2007 09:04:55 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3UG409T016633
	for <@sunmail3mpk.sfbay.sun.com:PSARC-EXT@sun.com>; Mon, 30 Apr 2007 09:04:00 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHB00301JAORZ00@nwk-avmta-2.sfbay.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Mon, 30 Apr 2007 09:04:00 -0700 (PDT)
Received: from nwk-ea-fw-1.sun.com ([10.4.134.6]) by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHB00IFAJAOW4B0@nwk-avmta-2.sfbay.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Mon,
 30 Apr 2007 09:04:00 -0700 (PDT)
Received: from d1-sfbay-09.sun.com ([192.18.39.119])
	by nwk-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3UG40Vj009882	for
 <PSARC-EXT@sun.com>; Mon, 30 Apr 2007 09:04:00 -0700 (PDT)
Received: from conversion-daemon.d1-sfbay-09.sun.com by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JHB00K01JA9YP00@d1-sfbay-09.sun.com>
 (original mail from John.Plocher@Sun.COM)
 for PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Mon,
 30 Apr 2007 09:03:59 -0700 (PDT)
Received: from [129.146.58.87] by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JHB004BNJANJML0@d1-sfbay-09.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Mon, 30 Apr 2007 09:03:59 -0700 (PDT)
Date: Mon, 30 Apr 2007 09:03:58 -0700
From: John Plocher <John.Plocher@Sun.COM>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <Pine.LNX.4.64.0704301252460.7454@localhost.localdomain>
Sender: John.Plocher@Sun.COM
To: Paul Jakma <Paul.Jakma@Sun.COM>
Cc: OpenSolaris Shell discussions <shell-discuss@opensolaris.org>,
        PSARC-EXT@Sun.COM
Message-id: <4636136E.50903@Sun.Com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <46329A42.EB66A59D@nrubsig.org>
 <46358097.7030106@Sun.Com>
 <Pine.LNX.4.64.0704301252460.7454@localhost.localdomain>
User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221)
Status: RO
Content-Length: 1035

Paul Jakma wrote:
>> Or, in other words, maybe the real fix here is to fix Mozilla (etc) to 
>> default their download dirs to $HOME/Downloads :-)
> 
> /tmp/$LOGNAME/ would have my vote over anything under $HOME.


Seriously, why is
	change TMPDIR to be /tmp/$LOGNAME
better than
	Fix the web browser to download things into $HOME/Downloads
	by default (instead ot dumping things directly into $TMPDIR)

If I'm downloading something valuable, I'm going to need to copy it out of
TMPDIR anyways, and any cost of doing the initial write()s to $HOME instead
of $TMPDIR pales next to the cost of having to invoke "cp $TMPDIR/foo $HOME".
And, if I'm not going to keep it, as long as the browser cleans up after
itself, I shouldn't care what happens behind the scenes

Unless you are seriously implying that (potential) NFS access to $HOME
is the performance bottleneck in downloading and viewing a PDF file from
the web?  If so, it sounds like the admin has bigger problems to solve
than simple modifications to TMPDIR can solve.

   -John

From Nicolas.Williams@sun.com Mon Apr 30 09:11:13 2007
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3UGBDvG009478
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 30 Apr 2007 09:11:13 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3UGAE0P049082;
	Mon, 30 Apr 2007 10:10:15 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHB0092BJL2O400@nwk-avmta-1.sfbay.Sun.COM>; Mon,
 30 Apr 2007 09:10:14 -0700 (PDT)
Received: from binky.central.sun.com ([129.153.128.104])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHB004G1JKWKU50@nwk-avmta-1.sfbay.Sun.COM>; Mon,
 30 Apr 2007 09:10:09 -0700 (PDT)
Received: from binky.central.sun.com (localhost [127.0.0.1])
	by binky.central.sun.com (8.13.8+Sun/8.13.6) with ESMTP id l3UG93Pr029614;
 Mon, 30 Apr 2007 11:09:03 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.central.sun.com (8.13.8+Sun/8.13.8/Submit) id l3UG93vZ029613; Mon,
 30 Apr 2007 11:09:03 -0500 (CDT)
Date: Mon, 30 Apr 2007 11:09:03 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <4636136E.50903@Sun.Com>
To: John Plocher <John.Plocher@sun.com>
Cc: Paul Jakma <Paul.Jakma@sun.com>, PSARC-EXT@sun.com,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>
Message-id: <20070430160902.GN21027@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <46329A42.EB66A59D@nrubsig.org>
 <46358097.7030106@Sun.Com>
 <Pine.LNX.4.64.0704301252460.7454@localhost.localdomain>
 <4636136E.50903@Sun.Com>
X-Authentication-warning: binky.central.sun.com: nw141292 set sender to
 Nicolas.Williams@sun.com using -f
User-Agent: Mutt/1.5.7i
Status: RO
Content-Length: 948

On Mon, Apr 30, 2007 at 09:03:58AM -0700, John Plocher wrote:
> Paul Jakma wrote:
> >>Or, in other words, maybe the real fix here is to fix Mozilla (etc) to 
> >>default their download dirs to $HOME/Downloads :-)
> >
> >/tmp/$LOGNAME/ would have my vote over anything under $HOME.
> 
> 
> Seriously, why is
> 	change TMPDIR to be /tmp/$LOGNAME
> better than
> 	Fix the web browser to download things into $HOME/Downloads
> 	by default (instead ot dumping things directly into $TMPDIR)

Because viewing a PDF is not downloading it, but that's what the browser
does, it downloads the PDF and launches the viewer (and note: some of us
will always prefer an external PDF viewer to embedding it in the
browser).  Viewing a PDF is like viewing a web page -- you'd not want
every page you view to be saved in ~/Downloads.  Instead you want pages
cached.  So the fix may be to cache some contents just like web pages
instead of downloading it into TMPDIR.

From pickychris@googlemail.com Mon Apr 30 09:27:22 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3UGRMxr010677
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 30 Apr 2007 09:27:22 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3UGQPr7027810
	for <@sunmail3mpk.sfbay.sun.com:PSARC-EXT@sun.com>; Mon, 30 Apr 2007 09:26:27 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHB0040FKC1NO00@nwk-avmta-2.sfbay.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Mon, 30 Apr 2007 09:26:25 -0700 (PDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHB00IW0KC1VWC0@nwk-avmta-2.sfbay.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Mon,
 30 Apr 2007 09:26:25 -0700 (PDT)
Received: from relay22.sun.com
 (relay22.sun.com [192.12.251.34] (may be forged))	by brmea-mail-1.sun.com
 (8.13.6+Sun/8.12.9) with ESMTP id l3UGQOb8016717	for <PSARC-EXT@sun.com>; Mon,
 30 Apr 2007 16:26:24 +0000 (GMT)
Received: from mms22es.sun.com ([150.143.232.34] [150.143.232.34])
 by relay22.sun.com with ESMTP id BT-MMP-1560613 for PSARC-EXT@sun.com; Mon,
 30 Apr 2007 16:26:14 +0000 (Z)
Received: from mms24bas.mms.us.syntegra.com
 (relay24.mms.us.syntegra.com [192.12.251.70]) by mms22es.sun.com with ESMTP id
 BT-MMP-35720 for PSARC-EXT@sun.com; Mon, 30 Apr 2007 16:26:14 +0000 (Z)
Received: from ug-out-1314.google.com ([66.249.92.171] [66.249.92.171])
 by relay24.sun.com with ESMTP id BT-MMP-149024 for PSARC-EXT@sun.com; Mon,
 30 Apr 2007 16:26:14 +0000 (Z)
Received: by ug-out-1314.google.com with SMTP id 36so1042342ugg for
 <PSARC-EXT@sun.com>; Mon, 30 Apr 2007 09:26:13 -0700 (PDT)
Received: by 10.82.169.4 with SMTP id r4mr12421120bue.1177950373007; Mon,
 30 Apr 2007 09:26:13 -0700 (PDT)
Received: by 10.82.188.19 with HTTP; Mon, 30 Apr 2007 09:26:12 -0700 (PDT)
Date: Mon, 30 Apr 2007 18:26:12 +0200
From: Chris Pickett <pkchris@users.sourceforge.net>
Subject: Re: [shell-discuss] Re: PSARC 2007/236 Default shell environment:
 TMPDIR
In-reply-to: <4636136E.50903@Sun.Com>
Sender: pickychris@googlemail.com
To: Shells discussion <shell-discuss@opensolaris.org>
Cc: Paul Jakma <paul.jakma@sun.com>, PSARC-EXT@sun.com
Message-id: <b25a03440704300926vf41bf9j4ea0c58f24efc57c@mail.gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
Content-disposition: inline
DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;        d=googlemail.com; s=beta;
 h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth;
 b=Jauftr66odriUpIYlnx71S/z67w3wTVg/tpVK4etvWCPnHlBLucWRKxzEA8itOXkPhTeay6rCMeU0ft6frYSGAusiC7lF03UVUtF5uwA4fruNTB/NhrFeRcq3mU6TekeGgboWInyxMGghZmny8ZXGMfQ3/XT4zKKJ2lDFjzXDnw=
DomainKey-Signature: a=rsa-sha1; c=nofws;        d=googlemail.com; s=beta;
 h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth;
 b=bdxl0MHm6JTaRj4J6Wkhcib+0dyBsJy0DOZ6ishbZzLda2YlngSOwk/2/GrkZCNEpay0taYFCkymyD3aqZqFqCZ0aZSHAA48Zm51dR3XVYW2YzvjfIamvWBZaBmH5w7SqZdATsBo71yZjYzv6HnKoBau1G2kUENJpD0lfwmRhQs=
X-PMX-Version: 5.2.0.264296
X-Google-Sender-Auth: 8644e44dad1ac891
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <46329A42.EB66A59D@nrubsig.org>
 <46358097.7030106@Sun.Com>
 <Pine.LNX.4.64.0704301252460.7454@localhost.localdomain>
 <4636136E.50903@Sun.Com>
Status: RO
Content-Length: 705

On 4/30/07, John Plocher <John.Plocher@sun.com> wrote:
> Paul Jakma wrote:
> >> Or, in other words, maybe the real fix here is to fix Mozilla (etc) to
> >> default their download dirs to $HOME/Downloads :-)
> >
> > /tmp/$LOGNAME/ would have my vote over anything under $HOME.
>
>
> Seriously, why is
>         change TMPDIR to be /tmp/$LOGNAME
> better than
>         Fix the web browser to download things into $HOME/Downloads
>         by default (instead ot dumping things directly into $TMPDIR)

Do you really suggest to change every application on this planet?
Gnome, KDE, Xfce, etc.?

Chris
-- 
    ^---^
   (@)v(@)  Chris Pickett
   |    /   IT consultant
 ===m==m=== pkchris@users.sourceforge.net

From peter.tribble@gmail.com Mon Apr 30 12:22:42 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3UJMgB5019216
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 30 Apr 2007 12:22:42 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3UJLk8D014926
	for <@sunmail3mpk.sfbay.sun.com:PSARC-EXT@sun.com>; Mon, 30 Apr 2007 12:21:47 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHB00C01SGASZ00@nwk-avmta-2.sfbay.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Mon, 30 Apr 2007 12:21:46 -0700 (PDT)
Received: from sca-ea-mail-1.sun.com ([192.18.43.24])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHB006OGSGADC80@nwk-avmta-2.sfbay.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Mon,
 30 Apr 2007 12:21:46 -0700 (PDT)
Received: from relay21.sun.com
 (relay21.sun.com [192.12.251.14] (may be forged))	by sca-ea-mail-1.sun.com
 (8.13.7+Sun/8.12.9) with ESMTP id l3UJLjiF021258	for <PSARC-EXT@sun.com>; Mon,
 30 Apr 2007 19:21:46 +0000 (GMT)
Received: from mms25es.sun.com ([150.143.232.94] [150.143.232.94])
 by relay21.sun.com with ESMTP id BT-MMP-1572443 for PSARC-EXT@sun.com; Mon,
 30 Apr 2007 19:21:45 +0000 (Z)
Received: from mms23bas.mms.us.syntegra.com
 (relay23.mms.us.syntegra.com [192.12.251.50]) by mms25es.sun.com with ESMTP id
 BT-MMP-133248 for PSARC-EXT@sun.com; Mon, 30 Apr 2007 19:21:45 +0000 (Z)
Received: from py-out-1112.google.com ([64.233.166.180] [64.233.166.180])
 by relay23.sun.com with ESMTP id BT-MMP-8543132 for PSARC-EXT@sun.com; Mon,
 30 Apr 2007 19:21:45 +0000 (Z)
Received: by py-out-1112.google.com with SMTP id p76so1369596pyb for
 <PSARC-EXT@sun.com>; Mon, 30 Apr 2007 12:21:45 -0700 (PDT)
Received: by 10.65.214.19 with SMTP id r19mr12283113qbq.1177960904799; Mon,
 30 Apr 2007 12:21:44 -0700 (PDT)
Received: by 10.65.250.19 with HTTP; Mon, 30 Apr 2007 12:21:44 -0700 (PDT)
Date: Mon, 30 Apr 2007 20:21:44 +0100
From: Peter Tribble <peter.tribble@gmail.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <4635C2E2.8070407@Sun.COM>
To: Darren J Moffat <Darren.Moffat@sun.com>
Cc: James Carlson <James.D.Carlson@sun.com>,
        John Plocher <John.Plocher@sun.com>, PSARC-EXT@sun.com,
        Casper.Dik@sun.com
Message-id: <df1347730704301221h3b957f56t2ae40af4834c3216@mail.gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
Content-disposition: inline
DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;        d=gmail.com; s=beta;
 h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
 b=Ger3TjlrW+oViGfguyBXhXEdnP8CNR2Hrfu27vzAXQqHWwWdxxeuZVYeDdz+3vmBrD76VgI1YiWEncOgN4o+m5wnBAEl9DDQCM9IOMy6w8kKTUEf/odBjSZ+WMOBixOqqzjWbV4JnasVc4d28/scYX4eD0aMAxNM2+AwH95XG/c=
DomainKey-Signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=beta;
 h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
 b=ofFPj3ct0dZwMVBLuZx/rYLyDRw2dz7UXstrZwK4DYbMUM2qcKnTwSn/A/OyEPC8RsrThz6pPCIaiTu5GlGzI7bZRxxqSsbjJvBfV+1E++iKmZ+i/pYAFwHzWwNj4AQgUOgbNzHImT4ZcRr0YKhWcDNV+4yiAQiG0GZHtg+1R+E=
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <4635C2E2.8070407@Sun.COM>
Status: RO
Content-Length: 666

On 4/30/07, Darren J Moffat <Darren.Moffat@sun.com> wrote:
> On a system with more than one user who uses GNOME you will actually
> reduce the number of directories in /tmp if $TMPDIR is /tmp/$LOGNAME
> rather than increase them.

Not so; I use GNOME and it doesn't leave anything in /tmp. There's
the normal .X11-{pipe,unix} stuff, but other than that /tmp is pretty much
empty.

I currently use systems with a modest number (100 or so) of users who
don't use desktops; at a previous employer this proposal would have led
to several thousand additional (empty) directories in /tmp.

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/

From bart.smaalders@sun.com Mon Apr 30 13:54:20 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3UKsKiC022842
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 30 Apr 2007 13:54:20 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l3UKrOPR015307
	for <@sunmail2sca.sfbay.sun.com:PSARC-EXT@Sun.COM>; Mon, 30 Apr 2007 13:53:25 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHB0070TWP02900@nwk-avmta-1.sfbay.Sun.COM> for PSARC-EXT@Sun.COM
 (ORCPT PSARC-EXT@Sun.COM); Mon, 30 Apr 2007 13:53:24 -0700 (PDT)
Received: from engmail3mpk.sfbay.Sun.COM ([129.146.11.26])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHB00KEFWOWG3A0@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-EXT@Sun.COM (ORCPT PSARC-EXT@Sun.COM); Mon,
 30 Apr 2007 13:53:20 -0700 (PDT)
Received: from zion.eng.sun.com (zion.SFBay.Sun.COM [129.146.17.75])
	by engmail3mpk.sfbay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2)
 with ESMTP id l3UKrIVk018907; Mon, 30 Apr 2007 13:53:18 -0700 (PDT)
Received: from [129.146.228.109] (cyber [129.146.228.109])
	by zion.eng.sun.com (8.13.7+Sun/8.13.7) with ESMTP id l3UKrHjH029084; Mon,
 30 Apr 2007 13:53:18 -0700 (PDT)
Date: Mon, 30 Apr 2007 13:51:59 -0700
From: Bart Smaalders <bart.smaalders@sun.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <df1347730704301221h3b957f56t2ae40af4834c3216@mail.gmail.com>
To: Peter Tribble <peter.tribble@gmail.com>
Cc: Darren J Moffat <Darren.Moffat@sun.com>,
        John Plocher <John.Plocher@sun.com>, Casper.Dik@sun.com,
        James Carlson <James.D.Carlson@sun.com>, PSARC-EXT@sun.com
Message-id: <463656EF.3090504@Sun.COM>
Organization: Sun Microsystems
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <4635C2E2.8070407@Sun.COM>
 <df1347730704301221h3b957f56t2ae40af4834c3216@mail.gmail.com>
User-Agent: Thunderbird 2.0b2 (X11/20070227)
Status: RO
Content-Length: 835

Peter Tribble wrote:
> On 4/30/07, Darren J Moffat <Darren.Moffat@sun.com> wrote:
>> On a system with more than one user who uses GNOME you will actually
>> reduce the number of directories in /tmp if $TMPDIR is /tmp/$LOGNAME
>> rather than increase them.
> 
> Not so; I use GNOME and it doesn't leave anything in /tmp. There's
> the normal .X11-{pipe,unix} stuff, but other than that /tmp is pretty much
> empty.
> 
> I currently use systems with a modest number (100 or so) of users who
> don't use desktops; at a previous employer this proposal would have led
> to several thousand additional (empty) directories in /tmp.
> 

These users actually log into the machines in question, but never
create _any_ temporary files?

- Bart


-- 
Bart Smaalders			Solaris Kernel Performance
barts@cyber.eng.sun.com		http://blogs.sun.com/barts

From binarycrusader@gmail.com Mon Apr 30 19:23:28 2007
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l412NRkh006075
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 30 Apr 2007 19:23:27 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l410ANG7007682
	for <@sunmail3mpk.sfbay.sun.com:PSARC-EXT@sun.com>; Mon, 30 Apr 2007 17:10:23 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHC0041L5T94X00@nwk-avmta-2.sfbay.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Mon, 30 Apr 2007 17:10:21 -0700 (PDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHC00LLP5T89S90@nwk-avmta-2.sfbay.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Mon,
 30 Apr 2007 17:10:20 -0700 (PDT)
Received: from relay42i.sun.com ([192.5.209.72])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l410AKYm015213	for
 <PSARC-EXT@sun.com>; Tue, 01 May 2007 00:10:20 +0000 (GMT)
Received: from mms48es.sun.com ([160.41.221.231] [160.41.221.231])
 by relay42i.sun.com with ESMTP id BT-MMP-317189 for PSARC-EXT@sun.com; Tue,
 01 May 2007 00:10:20 +0000 (Z)
Received: from relay42i.sun.com ([192.5.209.72] [192.5.209.72])
 by mms48es.sun.com with ESMTP id BT-MMP-1675037 for PSARC-EXT@sun.com; Tue,
 01 May 2007 00:10:19 +0000 (Z)
Received: from hu-out-0506.google.com ([72.14.214.224] [72.14.214.224])
 by relay4i.sun.com with ESMTP id BT-MMP-2889218 for PSARC-EXT@sun.com; Tue,
 01 May 2007 00:10:19 +0000 (Z)
Received: by hu-out-0506.google.com with SMTP id 35so6946833hue for
 <PSARC-EXT@sun.com>; Mon, 30 Apr 2007 17:10:19 -0700 (PDT)
Received: by 10.78.170.6 with SMTP id s6mr2248505hue.1177978219082; Mon,
 30 Apr 2007 17:10:19 -0700 (PDT)
Received: by 10.78.21.13 with HTTP; Mon, 30 Apr 2007 17:10:18 -0700 (PDT)
Date: Mon, 30 Apr 2007 19:10:18 -0500
From: Shawn Walker <binarycrusader@gmail.com>
Subject: Re: [shell-discuss] Re: PSARC 2007/236 Default shell environment:
 TMPDIR
In-reply-to: <463656EF.3090504@Sun.COM>
To: Shells discussion <shell-discuss@opensolaris.org>
Cc: Peter Tribble <peter.tribble@gmail.com>,
        John Plocher <John.Plocher@sun.com>, Casper.Dik@sun.com,
        PSARC-EXT@sun.com, James Carlson <James.D.Carlson@sun.com>,
        Darren J Moffat <Darren.Moffat@sun.com>
Message-id: <b9c544f0704301710t74309542t1a2792fa3f2e256f@mail.gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
Content-disposition: inline
DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;        d=gmail.com; s=beta;
 h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
 b=oWAuFMdplHmj405ESJsupLXl59AUfYfgfnAm7U1oXhLXL98GnMRDZn2jPAnhUDf04HZCAZWWIkrE1v6hdCI00fnEpI7CplJjTQEl+ht12NZqtYEuvbyyd+iIIMm9j8xdVvlE9E9HWfzMMwNEhcNct0pHJ4B1pQkhdb5KScVqHnY=
DomainKey-Signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=beta;
 h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
 b=mg7lNpX2tJHJ5lD/tNIhDbzBDgOQT6jRDIWvBNi3FCd8KKJ5KmA0Fb8XfuB+MlHry0XRwIrfQdh5UaJx8RhxlTl5u9ltkNiPGpJtIKtOy2SFmCgSPfJZlnW3iTiR/JdgngQQH686ikoNH2WHR1HwerPmZg8vnOafEKQVeU3T7hE=
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <4635C2E2.8070407@Sun.COM>
 <df1347730704301221h3b957f56t2ae40af4834c3216@mail.gmail.com>
 <463656EF.3090504@Sun.COM>
Status: RO
Content-Length: 1169

On 30/04/07, Bart Smaalders <bart.smaalders@sun.com> wrote:
> Peter Tribble wrote:
> > On 4/30/07, Darren J Moffat <Darren.Moffat@sun.com> wrote:
> >> On a system with more than one user who uses GNOME you will actually
> >> reduce the number of directories in /tmp if $TMPDIR is /tmp/$LOGNAME
> >> rather than increase them.
> >
> > Not so; I use GNOME and it doesn't leave anything in /tmp. There's
> > the normal .X11-{pipe,unix} stuff, but other than that /tmp is pretty much
> > empty.
> >
> > I currently use systems with a modest number (100 or so) of users who
> > don't use desktops; at a previous employer this proposal would have led
> > to several thousand additional (empty) directories in /tmp.
> >
>
> These users actually log into the machines in question, but never
> create _any_ temporary files?

Personally, I have a hard time believing this. Almost any time I've
logged in or out of GNOME I find many little files littering /tmp or
/var/tmp from orbit, ice, sockets, etc.

-- 
"Less is only more where more is no good." --Frank Lloyd Wright

Shawn Walker, Software and Systems Analyst
binarycrusader@gmail.com - http://binarycrusader.blogspot.com/

From schilling@fokus.fraunhofer.de Tue May  1 04:04:15 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l41B4FtJ026415
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 1 May 2007 04:04:15 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l41B3FZj013014;
	Tue, 1 May 2007 04:03:16 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHD0090901FV800@brm-avmta-1.central.sun.com>; Tue,
 01 May 2007 05:03:15 -0600 (MDT)
Received: from sca-ea-mail-4.sun.com ([192.18.43.22])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHD00D6U01FU480@brm-avmta-1.central.sun.com>; Tue,
 01 May 2007 05:03:15 -0600 (MDT)
Received: from relay42i.sun.com ([192.5.209.72])
	by sca-ea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l41B1CYk029677;
 Tue, 01 May 2007 11:03:15 +0000 (GMT)
Received: from mms48es.sun.com ([160.41.221.231] [160.41.221.231])
 by relay42i.sun.com with ESMTP id BT-MMP-334544; Tue,
 01 May 2007 11:03:15 +0000 (Z)
Received: from relay44i.sun.com ([192.5.209.118] [192.5.209.118])
 by mms48es.sun.com with ESMTP id BT-MMP-223715; Tue,
 01 May 2007 11:03:14 +0000 (Z)
Received: from mailhub.fokus.fraunhofer.de ([193.174.154.14] [193.174.154.14])
 by relay4i.sun.com with ESMTP id BT-MMP-3000810; Tue,
 01 May 2007 11:03:14 +0000 (Z)
Received: from burner.fokus.fraunhofer.de (burner [10.147.65.166])
	by mailhub.fokus.fraunhofer.de (8.11.6p2/8.11.6) with ESMTP id l41B3Bf00738;
 Tue, 01 May 2007 13:03:12 +0200 (MEST)
Received: (from jes@localhost)	by burner.fokus.fraunhofer.de
 (8.12.9+Sun/8.12.9/Submit) id l41B2mSU011279; Tue,
 01 May 2007 13:02:48 +0200 (CEST)
Date: Tue, 01 May 2007 13:02:48 +0200
From: Joerg.Schilling@fokus.fraunhofer.de (Joerg Schilling)
Subject: Re: [shell-discuss] Re: PSARC 2007/236 Default shell environment:
 TMPDIR
In-reply-to: <b9c544f0704301710t74309542t1a2792fa3f2e256f@mail.gmail.com>
Sender: schilling@fokus.fraunhofer.de
To: shell-discuss@opensolaris.org
Cc: PSARC-EXT@sun.com, peter.tribble@gmail.com, John.Plocher@sun.com,
        James.D.Carlson@sun.com, Darren.Moffat@sun.com, Casper.Dik@sun.com
Message-id: <46371e58.UM+055M0cC3GqQGV%Joerg.Schilling@fokus.fraunhofer.de>
MIME-version: 1.0
Content-type: text/plain; charset=ISO8859-1
Content-transfer-encoding: 8BIT
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <4635C2E2.8070407@Sun.COM>
 <df1347730704301221h3b957f56t2ae40af4834c3216@mail.gmail.com>
 <463656EF.3090504@Sun.COM>
 <b9c544f0704301710t74309542t1a2792fa3f2e256f@mail.gmail.com>
User-Agent: nail 11.22 3/20/05
Status: RO
Content-Length: 716

"Shawn Walker" <binarycrusader@gmail.com> wrote:

> Personally, I have a hard time believing this. Almost any time I've
> logged in or out of GNOME I find many little files littering /tmp or
> /var/tmp from orbit, ice, sockets, etc.

Files in /var/tmp that are not from editors must havebeen created by 
Authors on Linux who do not know what happened in 1988 and that /tmp
now typically has more space and is faster.

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de                (uni)  
       schilling@fokus.fraunhofer.de     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily

From peter.tribble@gmail.com Tue May  1 15:24:39 2007
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l41MOdOF027696
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 1 May 2007 15:24:39 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l41MNig0046395
	for <@newsunmail1brm.central.sun.com:PSARC-EXT@sun.com>; Tue, 1 May 2007 16:23:44 -0600 (MDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHD00807VJH5A00@brm-avmta-1.central.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Tue, 01 May 2007 16:23:41 -0600 (MDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHD001KAVJHWK70@brm-avmta-1.central.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Tue,
 01 May 2007 16:23:41 -0600 (MDT)
Received: from relay2.sun.com (relay2.sun.com [150.143.103.24] (may be forged))
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l41MAZmO017235	for
 <PSARC-EXT@sun.com>; Tue, 01 May 2007 22:23:41 +0000 (GMT)
Received: from mms04es.sun.com ([150.143.104.74] [150.143.104.74])
 by relay2.sun.com with ESMTP id BT-MMP-630165 for PSARC-EXT@sun.com; Tue,
 01 May 2007 22:23:23 +0000 (Z)
Received: from relay1.sun.com (relay1.sun.com [150.143.103.14])
 by mms04es.sun.com with ESMTP id BT-MMP-134252 for PSARC-EXT@sun.com; Tue,
 01 May 2007 22:23:23 +0000 (Z)
Received: from nz-out-0506.google.com ([64.233.162.224] [64.233.162.224])
 by relay1.sun.com with ESMTP id BT-MMP-5351815 for PSARC-EXT@sun.com; Tue,
 01 May 2007 22:23:23 +0000 (Z)
Received: by nz-out-0506.google.com with SMTP id m7so2515456nzf for
 <PSARC-EXT@sun.com>; Tue, 01 May 2007 15:23:23 -0700 (PDT)
Received: by 10.65.113.17 with SMTP id q17mr2665156qbm.1178058202923; Tue,
 01 May 2007 15:23:22 -0700 (PDT)
Received: by 10.65.61.9 with HTTP; Tue, 01 May 2007 15:23:22 -0700 (PDT)
Date: Tue, 01 May 2007 23:23:22 +0100
From: Peter Tribble <peter.tribble@gmail.com>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
In-reply-to: <463656EF.3090504@Sun.COM>
To: Bart Smaalders <bart.smaalders@sun.com>
Cc: Darren J Moffat <Darren.Moffat@sun.com>,
        John Plocher <John.Plocher@sun.com>, Casper.Dik@sun.com,
        James Carlson <James.D.Carlson@sun.com>, PSARC-EXT@sun.com
Message-id: <df1347730705011523u3ec6840t25509b807e993578@mail.gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
Content-disposition: inline
DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;        d=gmail.com; s=beta;
 h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
 b=WaB0O7HEAbesIA+DBnrdirGTVKdfSGLc9t3m2jBu8ZEk4xh54YL5OarI745M3u3Vq0z9r6lbfCrpQ/04niWBaabPssghicE5J9yifpCTRj2kT83G2h7P19yTE5DCwpwRHRajUGzYTLLGro/t4eCi2jrUWRsN/HzGqYuTZnu95OI=
DomainKey-Signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=beta;
 h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
 b=pYSmqoRDpiGtlQjwG5D54UnrmkhaZIMdLSSBnfPMVymtsMG26gnKpoGBQeNOXS9EjEUcjobLivR+qKthMTZQA2tfuzm1xnh+oKKtwuTjxc6yCORwk0hnQ3GZv/iNoLDHUGK8y/6ks82Whljev1N7i89WUgkQOU5pElLfWeUHYKQ=
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <4635C2E2.8070407@Sun.COM>
 <df1347730704301221h3b957f56t2ae40af4834c3216@mail.gmail.com>
 <463656EF.3090504@Sun.COM>
Status: RO
Content-Length: 660

On 4/30/07, Bart Smaalders <bart.smaalders@sun.com> wrote:
> Peter Tribble wrote:
> > I currently use systems with a modest number (100 or so) of users who
> > don't use desktops; at a previous employer this proposal would have led
> > to several thousand additional (empty) directories in /tmp.
> >
>
> These users actually log into the machines in question, but never
> create _any_ temporary files?

Pretty well. Just logging in via ssh and running command line scripts
and applications. Even on my fairly busy servers /tmp tends to
contain 20, entries - 50 would be a lot.

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/

From roland.mainz@nrubsig.org Wed May  2 09:00:40 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l42G0ept012821
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 2 May 2007 09:00:40 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l42FxeU4028279;
	Wed, 2 May 2007 08:59:41 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHF00D2J8FHLJ00@nwk-avmta-2.sfbay.sun.com>; Wed,
 02 May 2007 08:59:41 -0700 (PDT)
Received: from sca-ea-mail-4.sun.com ([192.18.43.22])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHF007FX8FGRCA0@nwk-avmta-2.sfbay.sun.com>; Wed,
 02 May 2007 08:59:40 -0700 (PDT)
Received: from relay3.sun.com (relay3.sun.com [150.143.103.54] (may be forged))
	by sca-ea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l42EwnFN019838;
 Wed, 02 May 2007 15:59:40 +0000 (GMT)
Received: from mms03es.sun.com ([150.143.104.54] [150.143.104.54])
 by relay3.sun.com with ESMTP id BT-MMP-716914; Wed,
 02 May 2007 15:59:24 +0000 (Z)
Received: from relay3.sun.com (relay3.sun.com [150.143.103.54])
 by mms03es.sun.com with ESMTP id BT-MMP-1971315; Wed,
 02 May 2007 15:59:24 +0000 (Z)
Received: from mail-in-07.arcor-online.net ([151.189.21.47] [151.189.21.47])
 by relay3.sun.com with ESMTP id BT-MMP-5708354; Wed,
 02 May 2007 15:59:24 +0000 (Z)
Received: from mail-in-01-z2.arcor-online.net
 (mail-in-12-z2.arcor-online.net [151.189.8.29])	by mail-in-07.arcor-online.net
 (Postfix) with ESMTP id B269124BC18; Wed, 02 May 2007 17:59:23 +0200 (CEST)
Received: from mail-in-05.arcor-online.net
 (mail-in-05.arcor-online.net [151.189.21.45])
	by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id 5DB82279482; Wed,
 02 May 2007 17:59:23 +0200 (CEST)
Received: from jupiterb48.nrubsig.org
 (dslb-084-058-235-204.pools.arcor-ip.net [84.58.235.204])
	by mail-in-05.arcor-online.net (Postfix) with ESMTP id 7DD8E1CB722; Wed,
 02 May 2007 17:59:22 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])	by jupiterb48.nrubsig.org
 (8.13.8+Sun/8.13.8) with ESMTP id l42FxJQm000717; Wed,
 02 May 2007 17:59:19 +0200 (CEST)
Date: Wed, 02 May 2007 17:59:19 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
Sender: gisburn@jupiterb48.nrubsig.org
To: Peter Tribble <peter.tribble@gmail.com>
Cc: Darren J Moffat <Darren.Moffat@sun.com>,
        James Carlson <James.D.Carlson@sun.com>,
        John Plocher <John.Plocher@sun.com>, PSARC-EXT@sun.com,
        Casper.Dik@sun.com
Message-id: <4638B557.DB46497E@nrubsig.org>
MIME-version: 1.0
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <4635C2E2.8070407@Sun.COM>
 <df1347730704301221h3b957f56t2ae40af4834c3216@mail.gmail.com>
Status: RO
Content-Length: 884

Peter Tribble wrote:
> On 4/30/07, Darren J Moffat <Darren.Moffat@sun.com> wrote:
> > On a system with more than one user who uses GNOME you will actually
> > reduce the number of directories in /tmp if $TMPDIR is /tmp/$LOGNAME
> > rather than increase them.
> 
> Not so; I use GNOME and it doesn't leave anything in /tmp. There's
> the normal .X11-{pipe,unix} stuff, but other than that /tmp is pretty much
> empty.
> 
> I currently use systems with a modest number (100 or so) of users who
> don't use desktops; at a previous employer this proposal would have led
> to several thousand additional (empty) directories in /tmp.

I assume they only use shell commands and nothing with a GUI, right ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

From roland.mainz@nrubsig.org Wed May  2 09:54:20 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l42GsIJo017392
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 2 May 2007 09:54:19 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l42Gr2AM005936;
	Thu, 3 May 2007 00:53:18 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHF00E0VAWSCN00@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 02 May 2007 09:53:16 -0700 (PDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHF0040HAWRRUD0@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 02 May 2007 09:53:15 -0700 (PDT)
Received: from relay3.sun.com (relay3.sun.com [150.143.103.54] (may be forged))
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l42GUZiB028333; Wed,
 02 May 2007 16:53:14 +0000 (GMT)
Received: from mms04es.sun.com ([150.143.104.74] [150.143.104.74])
 by relay3.sun.com with ESMTP id BT-MMP-723489; Wed,
 02 May 2007 16:52:50 +0000 (Z)
Received: from relay1.sun.com (relay1.sun.com [150.143.103.14])
 by mms04es.sun.com with ESMTP id BT-MMP-964852; Wed,
 02 May 2007 16:52:50 +0000 (Z)
Received: from mail-in-04.arcor-online.net ([151.189.21.44] [151.189.21.44])
 by relay1.sun.com with ESMTP id BT-MMP-6000124; Wed,
 02 May 2007 16:52:49 +0000 (Z)
Received: from mail-in-02-z2.arcor-online.net
 (mail-in-02-z2.arcor-online.net [151.189.8.14])	by mail-in-04.arcor-online.net
 (Postfix) with ESMTP id D5B4C17FCCD; Wed, 02 May 2007 18:52:48 +0200 (CEST)
Received: from mail-in-11.arcor-online.net
 (mail-in-11.arcor-online.net [151.189.21.51])
	by mail-in-02-z2.arcor-online.net (Postfix) with ESMTP id 547B31150CB; Wed,
 02 May 2007 18:52:45 +0200 (CEST)
Received: from jupiterb48.nrubsig.org
 (dslb-084-058-235-204.pools.arcor-ip.net [84.58.235.204])
	by mail-in-11.arcor-online.net (Postfix) with ESMTP id 32005341B6B; Wed,
 02 May 2007 18:52:45 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])	by jupiterb48.nrubsig.org
 (8.13.8+Sun/8.13.8) with ESMTP id l42GqhHQ000741; Wed,
 02 May 2007 18:52:43 +0200 (CEST)
Date: Wed, 02 May 2007 18:52:43 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
Subject: Re: PSARC 2007/236 Default shell environment: TMPDIR
Sender: gisburn@jupiterb48.nrubsig.org
To: John Plocher <John.Plocher@sun.com>
Cc: Paul Jakma <Paul.Jakma@sun.com>,
        OpenSolaris Shell discussions <shell-discuss@opensolaris.org>,
        PSARC-EXT@sun.com
Message-id: <4638C1DB.9945747D@nrubsig.org>
MIME-version: 1.0
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en
X-PMX-Version: 5.2.0.264296
References: <200704262113.l3QLDU27015795@sac.sfbay.sun.com>
 <46311919.9080107@Sun.Com> <20070426221714.GA21027@Sun.COM>
 <200704270634.l3R6YM7N049056@sr1-eaft06-01.holland.sun.com>
 <17970.16885.382847.920432@gargle.gargle.HOWL> <46329A42.EB66A59D@nrubsig.org>
 <46358097.7030106@Sun.Com>
 <Pine.LNX.4.64.0704301252460.7454@localhost.localdomain>
 <4636136E.50903@Sun.Com>
Status: RO
Content-Length: 1848

John Plocher wrote:
> 
> Paul Jakma wrote:
> >> Or, in other words, maybe the real fix here is to fix Mozilla (etc) to
> >> default their download dirs to $HOME/Downloads :-)
> >
> > /tmp/$LOGNAME/ would have my vote over anything under $HOME.
> 
> Seriously, why is
>         change TMPDIR to be /tmp/$LOGNAME
> better than
>         Fix the web browser to download things into $HOME/Downloads
>         by default (instead ot dumping things directly into $TMPDIR)

I am not sure whether it is usefull to try that since this behavoiur is
too common in applications. We could try to fight but the windmills are
likely going to win (unless we fight with Leopard-2 tanks etc. ... :-) )
...

> If I'm downloading something valuable, I'm going to need to copy it out of
> TMPDIR anyways, and any cost of doing the initial write()s to $HOME instead
> of $TMPDIR pales next to the cost of having to invoke "cp $TMPDIR/foo $HOME".
> And, if I'm not going to keep it, as long as the browser cleans up after
> itself, I shouldn't care what happens behind the scenes

But that's what many users do in this case: They view something in xpdf
or acroread and if they "like" it they copy the files from it's
temporary location to a permenent in ${HOME}. That's pretty much
unavoidable...

> Unless you are seriously implying that (potential) NFS access to $HOME
> is the performance bottleneck in downloading and viewing a PDF file from
> the web?  If so, it sounds like the admin has bigger problems to solve
> than simple modifications to TMPDIR can solve.

... the part where I would be worried are name collisions when working
in the same account from multiple machines...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

From Darren.Moffat@sun.com Fri May  4 03:19:49 2007
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l44AJnmp026825
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 4 May 2007 03:19:49 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l44AInwe054795
	for <@newsunmail1brm.central.sun.com:PSARC-EXT@sun.com>; Fri, 4 May 2007 04:18:49 -0600 (MDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JHI0050OHZD5M00@brm-avmta-1.central.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Fri, 04 May 2007 04:18:49 -0600 (MDT)
Received: from gmp-ea-fw-1.sun.com ([129.156.42.6])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JHI001MQHYV9310@brm-avmta-1.central.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Fri,
 04 May 2007 04:18:32 -0600 (MDT)
Received: from d1-emea-10.sun.com ([192.18.2.120])
	by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l44AIVv6023265	for
 <PSARC-EXT@sun.com>; Fri, 04 May 2007 10:18:31 +0000 (GMT)
Received: from conversion-daemon.d1-emea-10.sun.com by d1-emea-10.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JHI00C01HV8CF00@d1-emea-10.sun.com>
 (original mail from Darren.Moffat@Sun.COM)
 for PSARC-EXT@sun.com (ORCPT PSARC-EXT@sun.com); Fri,
 04 May 2007 11:18:31 +0100 (BST)
Received: from [129.156.173.21] by d1-emea-10.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JHI009Q8HYU8700@d1-emea-10.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@sun.com); Fri, 04 May 2007 11:18:31 +0100 (BST)
Date: Fri, 04 May 2007 11:18:30 +0100
From: Darren J Moffat <Darren.Moffat@sun.com>
Subject: PSARC/2007/236  Default shell environment: TMPDIR
In-reply-to: <20070504045537.GB5001@Sun.COM>
Sender: Darren.Moffat@sun.com
To: PSARC-EXT@sun.com
Cc: shell-discuss@opensolaris.org
Message-id: <463B0876.6050303@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <46312E4C.1020702@sun.com> <4632B411.9FC4D9C0@nrubsig.org>
 <46334f71.Fspbbj2lxSDxYvlQ%Joerg.Schilling@fokus.fraunhofer.de>
 <4634E881.7020303@sun.com>
 <4639e213.HxGcPKKZCCfnNpOr%Joerg.Schilling@fokus.fraunhofer.de>
 <b9c544f0705030627v6ca7dd4i264d79ebc696ec5e@mail.gmail.com>
 <463a071f.riHD0ricfsQYHFDG%Joerg.Schilling@fokus.fraunhofer.de>
 <463A1657.5070504@Sun.Com>
 <463a44da.yugUJHFxs2nAKwvB%Joerg.Schilling@fokus.fraunhofer.de>
 <463AB26D.5040209@sun.com> <20070504045537.GB5001@Sun.COM>
User-Agent: Thunderbird 2.0b2 (X11/20070326)
Status: RO
Content-Length: 532

The timer for this case was extended by one week, the timer now expires
on Wednesday 9th May 2007.

A point or two of order:

Please keep comments specific to the proposal under review.
Please keep the feedback technical:

the following are good:
	change x causes a regression
	change x is incomplete
	change x has a security problem
	change x won't work with the foo part of the system

the following aren't relevant for architecture review:
	I prefer y over x
	thing x that is unrelated should be done first

-- 
Darren J Moffat


From Darren.Moffat@Sun.COM Mon May 14 05:32:32 2007
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l4ECWWjQ004459
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 14 May 2007 05:32:32 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l4ECVOfd061135
	for <@newsunmail1brm.central.sun.com:PSARC-EXT@sun.com>; Mon, 14 May 2007 06:31:25 -0600 (MDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JI100C136SDNX00@brm-avmta-1.central.sun.com> for PSARC-EXT@sun.com
 (ORCPT PSARC-EXT@Sun.COM); Mon, 14 May 2007 06:31:25 -0600 (MDT)
Received: from gmp-ea-fw-1.sun.com ([129.156.42.6])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JI100AWM6SCAE10@brm-avmta-1.central.sun.com> for
 PSARC-EXT@sun.com (ORCPT PSARC-EXT@Sun.COM); Mon,
 14 May 2007 06:31:25 -0600 (MDT)
Received: from d1-emea-09.sun.com ([192.18.2.119])
	by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l4ECVOF3016677	for
 <PSARC-EXT@Sun.COM>; Mon, 14 May 2007 12:31:24 +0000 (GMT)
Received: from conversion-daemon.d1-emea-09.sun.com by d1-emea-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JI100J016KHH000@d1-emea-09.sun.com>
 (original mail from Darren.Moffat@Sun.COM)
 for PSARC-EXT@Sun.COM (ORCPT PSARC-EXT@Sun.COM); Mon,
 14 May 2007 13:31:24 +0100 (BST)
Received: from [129.156.173.21] by d1-emea-09.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JI100CMR6SB3B20@d1-emea-09.sun.com> for PSARC-EXT@Sun.COM
 (ORCPT PSARC-EXT@Sun.COM); Mon, 14 May 2007 13:31:23 +0100 (BST)
Date: Mon, 14 May 2007 13:31:23 +0100
From: Darren J Moffat <Darren.Moffat@Sun.COM>
Subject: PSARC/2007/236 [derailed] Default shell environment: TMPDIR
Sender: Darren.Moffat@Sun.COM
To: PSARC-EXT@Sun.COM
Message-id: <4648569B.5060108@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
User-Agent: Thunderbird 2.0b2 (X11/20070326)
Status: RO
Content-Length: 815

This case was derailed at PSARC on Wednesday 9th May, since it was clear
from the discussion that is was not reaching consensus and is deemed
controversial to at least some members.

The recommendation is to bring a full case to review covering all four of:

2007/233 Default shell environment: machine ksh93/bash environment
2007/234 Default shell environment: Skeleton user sh/ksh/ksh93/bash
2007/235 Default shell environment: manual page subsystem
2007/236 Default shell environment: TMPDIR

There should be no further email discussion on this alias about these
cases since they are no longer fast-tracks.  The submitter and sponsor
will arrange the next steps.  The full case review should it happen will
be an open review, details of how to attend will be sent if/when it is
schedule.

-- 
Darren J Moffat




