summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2013-10-10 11:49:07 +0000
committernicm <nicm>2013-10-10 11:49:07 +0000
commit47a4a9992c59199bb55188c666eddce7895d884e (patch)
treec2b6af0a0f4292f8dc3f8f03b6175e6eb01267aa
parentd75dd2ab1c792ea06c2777a31cb83cb3ba4c47a7 (diff)
Allow the file descriptor received from the client to be -1.
-rw-r--r--server-client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server-client.c b/server-client.c
index 5f61f5c0..44119237 100644
--- a/server-client.c
+++ b/server-client.c
@@ -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;