1
0
mirror of https://github.com/tmux/tmux.git synced 2025-04-22 04:18:47 +00:00

Let's see if anyone screams about not being able to specify $TMPDIR

for their tmux sockets.

(Over the years, I have seen $TMPDIR set up worse than /tmp many times,
and don't know how this practice infected other parts of the system.
Nothing uses tmpdir(3), nor a huge-temporary-file program like sort.)
ok nicm
This commit is contained in:
deraadt 2015-10-25 07:48:16 +00:00
parent 2e2b8a95bd
commit 3034a71488

2
tmux.c
View File

@ -128,8 +128,6 @@ makesocketpath(const char *label)
uid = getuid(); uid = getuid();
if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0') if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0')
xsnprintf(base, sizeof base, "%s/tmux-%u", s, uid); xsnprintf(base, sizeof base, "%s/tmux-%u", s, uid);
else if ((s = getenv("TMPDIR")) != NULL && *s != '\0')
xsnprintf(base, sizeof base, "%s/tmux-%u", s, uid);
else else
xsnprintf(base, sizeof base, "%s/tmux-%u", _PATH_TMP, uid); xsnprintf(base, sizeof base, "%s/tmux-%u", _PATH_TMP, uid);