diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-02-06 19:05:56 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-02-06 19:07:43 +0000 |
commit | 833fe5bdee449b04afe8844774be66374e1baf9c (patch) | |
tree | 11b21f479421b08f67776c832543becaa0b12fb8 /tmux.c | |
parent | 93c3fb78a3593afd23e85352213236131dd5958f (diff) | |
parent | 313f2263f8bb3336893527f65789f820ba7eaf0f (diff) | |
download | rtmux-833fe5bdee449b04afe8844774be66374e1baf9c.tar.gz rtmux-833fe5bdee449b04afe8844774be66374e1baf9c.tar.bz2 rtmux-833fe5bdee449b04afe8844774be66374e1baf9c.zip |
Merge branch 'obsd-master'
Conflicts:
cmd-pipe-pane.c
Diffstat (limited to 'tmux.c')
-rw-r--r-- | tmux.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -134,7 +134,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 @@ -149,8 +149,7 @@ makesocketpath(const char *label) errno = ENOTDIR; return (NULL); } - if (sb.st_uid != uid || (!S_ISDIR(sb.st_mode) && - sb.st_mode & (S_IRWXG|S_IRWXO)) != 0) { + if (sb.st_uid != uid || (sb.st_mode & S_IRWXO) != 0) { errno = EACCES; return (NULL); } |