On 4/25/07, Darren J Moffat <Darren.Moffat at sun.com> wrote:
> I'm sponsoring this open case for Roland Mainz it is number 4 in a
> series of 4 addressing the default shell environment.
>
> 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.

I am opposed to this change, for the following reasons:

1. It adds significant clutter to /tmp, ensuring that all systems
will have a cluttered /tmp

2. It adds additional login processing, adding some load to
the system and slowing down logins.

3. There is no guarantee that TMPDIR will exist at any time -
it could be deleted after login causing applications to fail.

4. As TMPDIR is only set upon a certain set of conditions,
it's possible that the value of TMPDIR will not be consistent
between systems, or even between sessions on the same
system, leading to erratic behaviour.

5. Having run large multiuser systems, this proposal is unlikely
to help - most of the clutter in /tmp was due to manual actions
by users rather than applications using TMPDIR.

Based on my experience, if the aim is to reduce clutter in /tmp
then this proposal will not do so. And if there is a problem with
applications leaving debris in $TMPDIR, then those applications
should be fixed.

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

Reply via email to