Open /dev/ptm before pledge() and save it to be used for PTMGET later

(this means inlining forkpty()).

ok deraadt
This commit is contained in:
nicm
2017-01-23 10:09:43 +00:00
parent 4ede35c48c
commit 98e7fbb2ac
6 changed files with 79 additions and 1 deletions

View File

@ -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);