From 98e7fbb2acee0238381feea5d583fc439aae08e2 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 23 Jan 2017 10:09:43 +0000 Subject: Open /dev/ptm before pledge() and save it to be used for PTMGET later (this means inlining forkpty()). ok deraadt --- client.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'client.c') diff --git a/client.c b/client.c index 1307b0f7..90b1371c 100644 --- a/client.c +++ b/client.c @@ -303,6 +303,8 @@ client_main(struct event_base *base, int argc, char **argv, int flags, fatal("pledge failed"); /* Free stuff that is not used in the client. */ + if (ptm_fd != -1) + close(ptm_fd); options_free(global_options); options_free(global_s_options); options_free(global_w_options); -- cgit