3 ms·
Controlling the location of the temporary directory does not cause a security problem as long as the attacker cannot predict the name of the directory. Also, r
by JoshTriplett 12y ago
Controlling the location of the temporary directory does not cause a security problem as long as the attacker cannot predict the name of the directory.
Also, regarding FUSE: that's one of many reasons that FUSE mounts by default don't allow other users (including root) to access them.
- e28eta 12y agoCan I also override $RANDOM to be a static value? PID seems very guessable/brute-forcible.
- JoshTriplett 12y ago$RANDOM isn't actually in POSIX, and /bin/sh might not implement it at all: /tmp$ cat test.sh #!/bin/sh echo $RANDOM $RANDOM $RANDOM /tmp$ ./test.sh /tmp$ In a shell that implements it, though, such as bash, you can't override it via the environment. However, it's quite difficult to write privileged shell code if you don't trust the environment, notably $PATH. Too many shell features depend on variables, and shells don't automatically sanitize those.