[PATCH] The check of !S_ISDIR(sb.st_mode) in second time is wrong since it's already known to be false at that point.

2015-01-18 Thread Dmitri Paduchikh
--- tmux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tmux.c b/tmux.c index 5a1988e..832be8a 100644 --- a/tmux.c +++ b/tmux.c @@ -149,8 +149,7 @@ makesocketpath(const char *label) errno = ENOTDIR; return (NULL); } - if (sb.st

Re: [PATCH] The check of !S_ISDIR(sb.st_mode) in second time is wrong since it's already known to be false at that point.

2015-01-18 Thread Dmitri Paduchikh
Hello, I am afraid that my first message wasn't clear. Not from first look at least. Sorry about that. Let me elaborate, I think it is probably a security bug. makesocketpath() checks !S_ISDIR(sb.st_mode); when true it returns with error. But then it checks !S_ISDIR(sb.st_mode) in second time and