←back to thread

Against /Tmp

(dotat.at)
140 points todsacerdoti | 1 comments | | HN request time: 0s | source
Show context
aidenn0 ◴[] No.41914876[source]
> It’s a bad idea because it’s shared global mutable state that crosses security boundaries.

I think there is a use for such a thing (I take advantage of these features somewhat regularly), but having it also be the default $TMPDIR is definitely a bad idea.

replies(1): >>41915064 #
zbentley ◴[] No.41915064[source]
I think this is an instance where, to crib a phrase from the golang world, "share memory by communicating" (i.e. programs that need to support this kind of intervention should provide some form of API) is more appropriate than "communicate by sharing memory" (mucking about with programs' runtime state in tmpfs).

I replied to your similar comment upthread as well.

replies(1): >>41915228 #
1. aidenn0 ◴[] No.41915228[source]
Once shells have easy-to-use support for sending and receiving data between two sessions running as two users, then maybe we can get rid of shared filesystem directories.

I think /tmp is a poor solution even if we are going to use the filesystem for this (some sort of per-user spool makes far more sense), but its value is in its ubiquity.