mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 21:56:57 +00:00
Pass current directory as a string rather than a file descriptor because
pledge doesn't let us pass directory file descriptors.
This commit is contained in:
@ -1166,9 +1166,10 @@ server_client_msg_identify(struct client *c, struct imsg *imsg)
|
||||
c->ttyname = xstrdup(data);
|
||||
break;
|
||||
case MSG_IDENTIFY_CWD:
|
||||
if (datalen != 0)
|
||||
fatalx("bad MSG_IDENTIFY_CWD size");
|
||||
c->cwd = imsg->fd;
|
||||
if (datalen == 0 || data[datalen - 1] != '\0')
|
||||
fatalx("bad MSG_IDENTIFY_CWD string");
|
||||
if ((c->cwd = open(data, O_RDONLY)) == -1)
|
||||
c->cwd = open("/", O_RDONLY);
|
||||
break;
|
||||
case MSG_IDENTIFY_STDIN:
|
||||
if (datalen != 0)
|
||||
|
Reference in New Issue
Block a user