Add a define for the socket permissions check so it can be overridden

more easily (for Cgywin).
This commit is contained in:
nicm
2024-10-02 11:48:16 +00:00
parent ddf6af79e3
commit ce4be58eef
2 changed files with 4 additions and 1 deletions

2
tmux.c
View File

@ -226,7 +226,7 @@ make_label(const char *label, char **cause)
xasprintf(cause, "%s is not a directory", base);
goto fail;
}
if (sb.st_uid != uid || (sb.st_mode & S_IRWXO) != 0) {
if (sb.st_uid != uid || (sb.st_mode & TMUX_SOCK_PERM) != 0) {
xasprintf(cause, "directory %s has unsafe permissions", base);
goto fail;
}