mirror of
https://github.com/tmux/tmux.git
synced 2024-11-01 07:08:49 +00:00
Add a define for the socket permissions check so it can be overridden
more easily (for Cgywin).
This commit is contained in:
parent
ddf6af79e3
commit
ce4be58eef
2
tmux.c
2
tmux.c
@ -226,7 +226,7 @@ make_label(const char *label, char **cause)
|
|||||||
xasprintf(cause, "%s is not a directory", base);
|
xasprintf(cause, "%s is not a directory", base);
|
||||||
goto fail;
|
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);
|
xasprintf(cause, "directory %s has unsafe permissions", base);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
3
tmux.h
3
tmux.h
@ -78,6 +78,9 @@ struct winlink;
|
|||||||
#ifndef TMUX_SOCK
|
#ifndef TMUX_SOCK
|
||||||
#define TMUX_SOCK "$TMUX_TMPDIR:" _PATH_TMP
|
#define TMUX_SOCK "$TMUX_TMPDIR:" _PATH_TMP
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef TMUX_SOCK_PERM
|
||||||
|
#define TMUX_SOCK_PERM (7 /* o+rwx */)
|
||||||
|
#endif
|
||||||
#ifndef TMUX_TERM
|
#ifndef TMUX_TERM
|
||||||
#define TMUX_TERM "screen"
|
#define TMUX_TERM "screen"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user