I had a steam client crash yesterday which caused a dump to be written. I had TMPDIR set to an alternate (and only accessible by my user) location, but this was ignored in favour of just writing in /tmp/dumps.
That caused my root partition to fill up, which I only noticed when a game failed to launch today. Took me a while to spot the issue, given I was looking all over / for where I could free up space. If my TMPDIR had been respected then the files would have been written to a different partition and not caused this issue.
That /tmp shouldn't be hard-coded, just a fallback if TMPDIR is not set.
This should apply to any need for a temporary file, be that in the core of the steam client, or in a helper script. Proper use of mktemp(1) or similar in any scripts would take care of this. For core code using the C API then mkdtemp(3) and mkstemp(3) (or a variant) should be utilised.
I had a steam client crash yesterday which caused a dump to be written. I had
TMPDIRset to an alternate (and only accessible by my user) location, but this was ignored in favour of just writing in/tmp/dumps.That caused my root partition to fill up, which I only noticed when a game failed to launch today. Took me a while to spot the issue, given I was looking all over
/for where I could free up space. If myTMPDIRhad been respected then the files would have been written to a different partition and not caused this issue.That
/tmpshouldn't be hard-coded, just a fallback ifTMPDIRis not set.This should apply to any need for a temporary file, be that in the core of the steam client, or in a helper script. Proper use of
mktemp(1)or similar in any scripts would take care of this. For core code using the C API thenmkdtemp(3)andmkstemp(3)(or a variant) should be utilised.