From: reyk Date: Thu, 21 May 2015 14:24:43 +0000 (+0000) Subject: No need to call tzset() and log_init() in the forked constraint X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4ab0fb89a7cfc56d905e2b90e7f1aeee81aaefbf;p=openbsd No need to call tzset() and log_init() in the forked constraint handler. It is run in a chroot, so tzset() wouldn't even succeed to open the zone file. Found with tame. OK deraadt@ --- diff --git a/usr.sbin/ntpd/constraint.c b/usr.sbin/ntpd/constraint.c index 25a4fa70801..2e48cf7f610 100644 --- a/usr.sbin/ntpd/constraint.c +++ b/usr.sbin/ntpd/constraint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: constraint.c,v 1.10 2015/05/18 14:19:23 reyk Exp $ */ +/* $OpenBSD: constraint.c,v 1.11 2015/05/21 14:24:43 reyk Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -195,9 +195,6 @@ constraint_query(struct constraint *cstr) close(pipes[1]); return (-1); case 0: - tzset(); - log_init(conf->debug); - setproctitle("constraint from %s", hname); /* Child process */