summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tmux.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-01-19 09:58:34 +0000
committernicm <nicm@openbsd.org>2015-01-19 09:58:34 +0000
commitcb12d36b265eefa1961f25e796aed9c7d1134cca (patch)
treed256e7c2ec737aea89b6584f7d31fb9059e3b561 /usr.bin/tmux/tmux.c
parentOnly care about other permissions, allow group to be set. (diff)
downloadwireguard-openbsd-cb12d36b265eefa1961f25e796aed9c7d1134cca.tar.xz
wireguard-openbsd-cb12d36b265eefa1961f25e796aed9c7d1134cca.zip
Make a tmux-%u directory under TMUX_TMPDIR, like TMPDIR.
Diffstat (limited to 'usr.bin/tmux/tmux.c')
-rw-r--r--usr.bin/tmux/tmux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c
index 013f11a99e0..91a8c704b43 100644
--- a/usr.bin/tmux/tmux.c
+++ b/usr.bin/tmux/tmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.134 2015/01/19 09:57:33 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.135 2015/01/19 09:58:34 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -131,7 +131,7 @@ makesocketpath(const char *label)
uid = getuid();
if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0')
- xsnprintf(base, sizeof base, "%s/", s);
+ 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