diff options
author | 2013-10-10 11:49:07 +0000 | |
---|---|---|
committer | 2013-10-10 11:49:07 +0000 | |
commit | afc41d85409b44e5534ffb5b295d3ba7b68889d8 (patch) | |
tree | 4a70ddb4c5d4bed5062cfc9eecb89152fcb8c674 /usr.bin/tmux/server-client.c | |
parent | Add formats for window flags. (diff) | |
download | wireguard-openbsd-afc41d85409b44e5534ffb5b295d3ba7b68889d8.tar.xz wireguard-openbsd-afc41d85409b44e5534ffb5b295d3ba7b68889d8.zip |
Allow the file descriptor received from the client to be -1.
Diffstat (limited to 'usr.bin/tmux/server-client.c')
-rw-r--r-- | usr.bin/tmux/server-client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index e168dc120fc..b70a785e4a6 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.103 2013/06/23 13:10:46 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.104 2013/10/10 11:49:07 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -825,8 +825,6 @@ server_client_msg_dispatch(struct client *c) case MSG_IDENTIFY: if (datalen != sizeof identifydata) fatalx("bad MSG_IDENTIFY size"); - if (imsg.fd == -1) - fatalx("MSG_IDENTIFY missing fd"); memcpy(&identifydata, imsg.data, sizeof identifydata); server_client_msg_identify(c, &identifydata, imsg.fd); @@ -972,6 +970,8 @@ server_client_msg_identify( return; } + if (fd == -1) + return; if (!isatty(fd)) { close(fd); return; |