Bug#654861: coreutils: sort creates temporary files in /var/tmp instead of /tmp thus violating the FHS

January 06th, 2012 - 06:40 am ET by Attila Kinali | Report spam
Package: coreutils
Version: 8.5-1
Severity: important

Hi,

For some reason, sort generates temporary files in /var/tmp instead of /tmp.
As /var/tmp is not cleaned regularly or on boot, this means that any left
over files (eg due to crashes) will be left in /var/tmp forever.
Also sort cannot use the data on subsequent invocations, which makes the
persistence of the data meaningless.

This bug is market as important because this violates the FHS. This would
require a severity of serious, but IMHO the impact of this bug is too
low to justify such a high severity.


Attila Kinali

Debian Release: 6.0.3
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.39.2 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages coreutils depends on:
ii libacl1 2.2.49-4 Access control list shared library
ii libattr1 1:2.4.44-2 Extended attribute shared library
ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib
ii libselinux1 2.0.96-1 SELinux runtime shared libraries

coreutils recommends no packages.

coreutils suggests no packages.




To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 2 repliesReplies Make a reply

Replies

#1 Jim Meyering
January 06th, 2012 - 09:40 am ET | Report spam
For some reason, sort generates temporary files in /var/tmp instead of /tmp.
As /var/tmp is not cleaned regularly or on boot, this means that any left
over files (eg due to crashes) will be left in /var/tmp forever.
Also sort cannot use the data on subsequent invocations, which makes the
persistence of the data meaningless.

This bug is market as important because this violates the FHS. This would
require a severity of serious, but IMHO the impact of this bug is too
low to justify such a high severity.



Thanks for the report, but I think this must be due to your environment.
Sort honors the $TMPDIR environment variable, and if it is set to /var/tmp,
then that would explain what you're seeing.

However, if you can run sort like this

env TMPDIR=/tmp sort ...

and show that it still writes to files in /var/tmp, please do let us know.



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics