From 5df3046617230a0a96da4dbc61fd401114998949 Mon Sep 17 00:00:00 2001 From: kn Date: Fri, 16 Jul 2021 13:59:10 +0000 Subject: [PATCH] Remove unneeded call to tls_init(3) As per the manual and lib/libtls/tls.c revision 1.79 from 2018 "Automatically handle library initialisation for libtls." initialisation is handled automatically by other tls_*(3) functions. Remove the tls_init() call to not give the impression of it being needed. Feedback tb OK Tests mestre --- usr.sbin/ntpd/constraint.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/usr.sbin/ntpd/constraint.c b/usr.sbin/ntpd/constraint.c index 397e3b8bb7c..a716d81e8e3 100644 --- a/usr.sbin/ntpd/constraint.c +++ b/usr.sbin/ntpd/constraint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: constraint.c,v 1.51 2021/03/18 11:17:04 bluhm Exp $ */ +/* $OpenBSD: constraint.c,v 1.52 2021/07/16 13:59:10 kn Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -353,9 +353,7 @@ priv_constraint_child(const char *pw_dir, uid_t pw_uid, gid_t pw_gid) if (setpriority(PRIO_PROCESS, 0, 0) == -1) log_warn("could not set priority"); - /* Init TLS and load CA certs before chroot() */ - if (tls_init() == -1) - fatalx("tls_init"); + /* load CA certs before chroot() */ if ((conf->ca = tls_load_file(tls_default_ca_cert_file(), &conf->ca_len, NULL)) == NULL) fatalx("failed to load constraint ca"); -- 2.20.1