3 ms·
echo ... > "/tmp/all-users.sexp" No, this is not a secure way to create temporary files. Please use mktemp(1).
by jwilk 10y ago
echo ... > "/tmp/all-users.sexp"
No, this is not a secure way to create temporary files.
Please use mktemp(1).
- darkerside 10y agoHonest question: what security principles does this violate?
- Karunamon 10y ago/tmp generally has more open permissions than the rest of the file system, and if you're using a known file name, you're open to that file being abused by an attacker. I know of no good reason to not use mktemp.