tmux: only consider ACCESSPERMS for setting mode on socket_path.

it explicitly removes any S_ISUID|S_ISGID|S_ISTXT bits, instead of letting
pledge(2) silenciously remove them.

ok nicm@ beck@ deraadt@
pull/473/merge
semarie 2016-07-07 09:24:09 +00:00
parent 325cbe90d9
commit fc118e13a9
1 changed files with 1 additions and 1 deletions

View File

@ -258,7 +258,7 @@ server_update_socket(void)
if (stat(socket_path, &sb) != 0)
return;
mode = sb.st_mode;
mode = sb.st_mode & ACCESSPERMS;
if (n != 0) {
if (mode & S_IRUSR)
mode |= S_IXUSR;