From nobody Thu Jul 20 21:58:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R6RQ84Mgcz4nqLM; Thu, 20 Jul 2023 21:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R6RQ83szbz43H7; Thu, 20 Jul 2023 21:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689890288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y+I/wMKRknuxZWEWzReSG9BHJjeF4eMM3teT5wHKmP8=; b=osYo8EQ+ALOsTLFqVacbrg2VwQCw/gjhhJOCOpvysitsPLJNdEGaiepMW1cKvaC7mY+cIn eO+keszbskqMuOorKa6io2+ZMZcb83aY3y0+C9IDLbGJxBxeVZoD85MNQbtFg8XLywlF7g DEkP5jYAm4iMKfylFVZElYYtXuO1gfLXNVtGZoZKupALykr6bGMdfCeH4o3efid5Tj0i/+ 3VvR2s5dz7VMDddzSqlzgKzHiN/aoyF3cvTtGqLfdD9ve30rfEA93S6/mxgVNod+YJgTfo ZPPQp2NeNkxl61eSpAK6h/IAeLI7Pefne0to3saWKg3oyHiJLvsM7DvhJXdiQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689890288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y+I/wMKRknuxZWEWzReSG9BHJjeF4eMM3teT5wHKmP8=; b=U5bPd/3hak7hwvk3cBQwaUeU40Vc50r3ylgqQlUIoBsiBskDQTjKSwOQs9dLUOFlH2x8rr 5g6Jp3wLHIrlynBrx0WIDm91H2mYCJCndv94TYB3BeqCRR7NyMyh04G+m0zlPEGYTeQSiy EPZaLwmMhnSXMRJsvK5K6uDYHTLOJCEmeuVuxaJ9ymqhhRuHEY7OG3CdFC6L3IVGoTlGke mWvaf4pLHXn1814arCcrKmhI66+Khhs088qUqO2Zrh6QBAnWS6gq/PEeTVwzOs2RgtENSI u/NpNjEqlwbfoManlUcEFkYC1AqE4gcyVJ2ce4l+EFZJTFlMeGg2syzolNbrEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689890288; a=rsa-sha256; cv=none; b=Nu2ZkyzsYM9lj7oIwdMSTARFRXhXJhkLU/QkG0U0IPwJKEouwRMepC6Imf2ZoWsLYyNSEy ipoJAuNKyoQHbki2pX4XytQnTDEUqYPrGETft41ZAS9ZD0SPWNMM8y3Qjm11AZiQQcqHfv peyIut35dCVfubtS0XCGzsGF6SeuQYr23OHrRMdO/R+c7OGj+jwR+0jAKOEVEkw3DjIljd GA4gg/eYYSap0xd1ius4UXyiXciWTmlqzpgOW3OyVNousKLheoRgosfSu118sAAaMmkkdc tzNgvPfymyek8+DYa9e/7IS9sEQdGs9qFiW6KmVbgyf8lgnPRFqKJ9V6HmeGWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R6RQ82s9MznSt; Thu, 20 Jul 2023 21:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36KLw8nm052182; Thu, 20 Jul 2023 21:58:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36KLw8ba052181; Thu, 20 Jul 2023 21:58:08 GMT (envelope-from git) Date: Thu, 20 Jul 2023 21:58:08 GMT Message-Id: <202307202158.36KLw8ba052181@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 90f10db8a996 - main - sshd: remove unneeded initialization of libwrap logging severities List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90f10db8a99659d1baea7b2609d9256c331f61ae Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=90f10db8a99659d1baea7b2609d9256c331f61ae commit 90f10db8a99659d1baea7b2609d9256c331f61ae Author: Gleb Smirnoff AuthorDate: 2023-07-20 21:56:20 +0000 Commit: Gleb Smirnoff CommitDate: 2023-07-20 21:56:20 +0000 sshd: remove unneeded initialization of libwrap logging severities This part of ca573c9a177 proved to be unnecessary. As the removed comment says, we set them merely for logging syntax errors, as we log refusals ourselves. However, inside the libwrap the parser logs any syntax errors with tcpd_warn() which has hardcoded LOG_WARNING inside. Reviewed by: philip, emaste Differential revision: https://reviews.freebsd.org/D40068 --- crypto/openssh/sshd.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index 620a7efe7797..ce8db54a2b72 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -142,8 +142,6 @@ #ifdef LIBWRAP #include #include -extern int allow_severity; -extern int deny_severity; #endif /* LIBWRAP */ /* Re-exec fds */ @@ -1303,7 +1301,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s) * exactly. sshguard, and supposedly lots * of custom made scripts rely on it. */ - syslog(deny_severity, + syslog(LOG_WARNING, "refused connect from %s (%s)", eval_client(&req), eval_hostaddr(req.client)); @@ -2112,14 +2110,6 @@ main(int ac, char **av) /* Reinitialize the log (because of the fork above). */ log_init(__progname, options.log_level, options.log_facility, log_stderr); -#ifdef LIBWRAP - /* - * We log refusals ourselves. However, libwrap will report - * syntax errors in hosts.allow via syslog(3). - */ - allow_severity = options.log_facility|LOG_INFO; - deny_severity = options.log_facility|LOG_WARNING; -#endif /* Avoid killing the process in high-pressure swapping environments. */ if (!inetd_flag && madvise(NULL, 0, MADV_PROTECT) != 0) debug("madvise(): %.200s", strerror(errno));