diff options
Diffstat (limited to 'usr.sbin/snmpd/snmpe.c')
-rw-r--r-- | usr.sbin/snmpd/snmpe.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/snmpd/snmpe.c b/usr.sbin/snmpd/snmpe.c index 19c0f009941..3fa22de026f 100644 --- a/usr.sbin/snmpd/snmpe.c +++ b/usr.sbin/snmpd/snmpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpe.c,v 1.82 2022/01/19 11:00:56 martijn Exp $ */ +/* $OpenBSD: snmpe.c,v 1.83 2022/08/23 08:56:21 martijn Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org> @@ -33,6 +33,7 @@ #include <errno.h> #include <event.h> #include <fcntl.h> +#include <locale.h> #include <string.h> #include <unistd.h> #include <pwd.h> @@ -74,6 +75,9 @@ snmpe(struct privsep *ps, struct privsep_proc *p) struct oid *oid; #endif + if ((setlocale(LC_CTYPE, "en_US.UTF-8")) == NULL) + fatal("setlocale(LC_CTYPE, \"en_US.UTF-8\")"); + #ifdef DEBUG for (oid = NULL; (oid = smi_foreach(oid, 0)) != NULL;) { smi_oid2string(&oid->o_id, buf, sizeof(buf), 0); @@ -81,6 +85,8 @@ snmpe(struct privsep *ps, struct privsep_proc *p) } #endif + appl(); + /* bind SNMP UDP/TCP sockets */ TAILQ_FOREACH(h, &env->sc_addresses, entry) if ((h->fd = snmpe_bind(h)) == -1) |