mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
When the server socket is given by the user with -S, create it with
umask 177 instead of 117 because it may not be in a safe directory like the default directory in /tmp. The user can chmod it more open after it is created if they want.
This commit is contained in:
13
tmux.c
13
tmux.c
@ -379,12 +379,15 @@ main(int argc, char **argv)
|
||||
path[strcspn(path, ",")] = '\0';
|
||||
}
|
||||
}
|
||||
if (path == NULL && (path = make_label(label, &cause)) == NULL) {
|
||||
if (cause != NULL) {
|
||||
fprintf(stderr, "%s\n", cause);
|
||||
free(cause);
|
||||
if (path == NULL) {
|
||||
if ((path = make_label(label, &cause)) == NULL) {
|
||||
if (cause != NULL) {
|
||||
fprintf(stderr, "%s\n", cause);
|
||||
free(cause);
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
exit(1);
|
||||
flags |= CLIENT_DEFAULTSOCKET;
|
||||
}
|
||||
socket_path = path;
|
||||
free(label);
|
||||
|
Reference in New Issue
Block a user