diff options
author | 2018-09-01 18:09:14 +0000 | |
---|---|---|
committer | 2018-09-01 18:09:14 +0000 | |
commit | 21345b3faf269ccd4e3d13f9c59e6eaca91039b3 (patch) | |
tree | a142fca16cfd8988cf3da401ba64bfa3122f384d | |
parent | Fix errno for post-lock unveil calls (diff) | |
download | wireguard-openbsd-21345b3faf269ccd4e3d13f9c59e6eaca91039b3.tar.xz wireguard-openbsd-21345b3faf269ccd4e3d13f9c59e6eaca91039b3.zip |
Accidentally relayd(8) closed file descriptor 0 in the pfe child
process. If env->sc_snmp is initialized with 0, snmp_init() closes
it. Set it to -1 to prevent the close(2).
OK reyk@ benno@ millert@
-rw-r--r-- | usr.sbin/relayd/relayd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index c2e675adf67..ad6bce1c178 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.172 2018/08/06 17:31:31 benno Exp $ */ +/* $OpenBSD: relayd.c,v 1.173 2018/09/01 18:09:14 bluhm Exp $ */ /* * Copyright (c) 2007 - 2016 Reyk Floeter <reyk@openbsd.org> @@ -184,6 +184,7 @@ main(int argc, char *argv[]) TAILQ_INIT(&env->sc_hosts); TAILQ_INIT(&env->sc_sessions); env->sc_rtable = getrtable(); + env->sc_snmp = -1; /* initialize the TLS session id to a random key for all relay procs */ arc4random_buf(env->sc_conf.tls_sid, sizeof(env->sc_conf.tls_sid)); |