mc uses predictable temp directory path
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mc (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Binary package hint: mc
The Midnight Commander VirtualFS will expand temporary files (EG: files in rar, zip, etc) to a temporary directory for operations like view, edit, copy, etc.
HOWEVER, while my TMP and TEMP are set to a subdir of my home directory, MC's virtual FS will expand things to a directory named /tmp/mc-$username -- IGNORING these settings! This causes quite a bit of trouble when things like /tmp are not writable, and when the /tmp directory has less space than required for copying the file (which is a precondition the VirutalFS does *not* test!).
Given the predictable naming and "silent failure" mode of the VirtualFS when it copies a file too large and fills /tmp, this appears to be a security bug as well since it could be used to DoS tmp.
Changed in mc (Ubuntu): | |
status: | New → Confirmed |
Thanks for the report! Reading the source, it seems the environment you want for the temp dir is TMPDIR rather than TMP or TEMP.
However, there does still appear to be a directory creation race condition for the temp directory, so I'll leave this bug open and change the title slightly.