It was reported [1] that mktexlsr script uses /tmp in an insecure way. Part of original report: ... This is how mktexlsr uses temporary files (with boring parts snipped):
treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.tmp" ... while test $# -gt 0; do # ... (umask 077 if echo "$1" >>"$treefile"; then :; else echo "$progname: $treefile: could not append to arg file, goodbye." >&2 exit 1 fi # ... done
This is insecure because the filename is predictable and, more importantly, the program doesn't fail atomically if the file already exists. ...
Suggested patch is attached.
[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775139