Fix comparison of tty name.

pull/2209/head
Nicholas Marriott 2020-05-10 16:57:33 +01:00
parent d01e7aac89
commit 0070313e28
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ server_client_open(struct client *c, char **cause)
if (c->flags & CLIENT_CONTROL)
return (0);
if (strcmp(c->ttyname, ttynam) ||
if (strcmp(c->ttyname, ttynam) == 0||
((isatty(STDIN_FILENO) &&
(ttynam = ttyname(STDIN_FILENO)) != NULL &&
strcmp(c->ttyname, ttynam) == 0) ||