From nobody Mon Dec 18 17:36:16 2023 X-Original-To: dev-commits-src-branches@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 4Sv6SK18Wyz54n9T; Mon, 18 Dec 2023 17:36:17 +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 4Sv6SK0S8Wz4HX2; Mon, 18 Dec 2023 17:36:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702920977; 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=g063P+8yay5WekGeslbyCm5iZuu6jx2t44+X4HcMyXA=; b=VXIs8EQuniylHpnHJbHVaBo2mx2xJpmLDUfhKWMsd1PNJJVfiST/kRJzdAZaaU1HfoF0un nSXQokgjMzAsJcNrylxIdq7SNQfqPllVoMoVIa+jNeIcekEbE+zmB/s9ygdpq9jE5VkfgI 5K52QrEwrrTgAZiPd/9LH5mtJMeWlOP0cLrb623nEQbR6hjjElkQdRwJRAnXDqjqUAgTP1 pB4TDENxSMOk+sYayus3Jf77PwqHyGJoA1w5UTRPOfFty55xCUu8M0Xb9VRJL2+bFD9u8s rrKsh9+GL0f7FjvtcsW0ift4TVVFAsD0vR3oWFVm5TRk7mks1vO/aajlHC9euw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702920977; a=rsa-sha256; cv=none; b=Ax1ob5tJPk7EdzGzTG48QPNGhwY5NrdM7NCiuIVRs5t5xt+BjKIS4i3FziKZBOGuph/E/M msiPDp4hEIKaBbLSxi/aB/p7bnnGfz2o7zinBtLGxG8eIL8tpo8bIu5vxiU8xwnd5OKIyX zsgsSoS5NUbg+W4AvIQ1tx33KsF/nbM7yfcur6d2k0MATZ1v25vckEw75gkCg0krGu8X31 N1UJsY1BlSyKBKd6k1tgri4T9otx3iJ8LEsnNXX9huqx4ezV2Ck2FaCgDF2V/fS4ZX/h3S tBv165zZ2914vZOUXrBzljEzNVeSCK3yia0pgP/SQkQSL0czAjebWr5E118HPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702920977; 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=g063P+8yay5WekGeslbyCm5iZuu6jx2t44+X4HcMyXA=; b=wVN3QDGdd8XgPGFQvuuEBfbqnUzC+DAMhUcHFCDqKyGjj8Wwele7wTTyEGRsSxayt4XFXt Zv2b70EwWy7rv/3XrrlfwIWAl4qBeAeBz6U1aonGLYzGWcsjJEsbD5wO6hLWCMQZcRAv3a Idf1tnQelky0E0PlNWQYhJi1tnatZK6+eVTnLx2xa01CgYxDc4q/3MmT4w3RJvNP9LZ4o4 WhomBivp1CT7lxLeMFkGFgveEcUHMlrtvoshiQYaQ1NbEgvlI8ouPbqUcPv9ubvHEZNdye V8BVGYQFeeW3R6aWbrmp3LAnTbIPP+X7r0sGNhOv5lm4LIKLCiQ+dD5bJmr6gA== 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 4Sv6SJ6d70zVhD; Mon, 18 Dec 2023 17:36:16 +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 3BIHaGb7021743; Mon, 18 Dec 2023 17:36:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BIHaGMD021740; Mon, 18 Dec 2023 17:36:16 GMT (envelope-from git) Date: Mon, 18 Dec 2023 17:36:16 GMT Message-Id: <202312181736.3BIHaGMD021740@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 052f6ec95bf5 - stable/13 - sshd: remove unneeded initialization of libwrap logging severities List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 052f6ec95bf5e29985b456a7d0287ffef3e01192 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=052f6ec95bf5e29985b456a7d0287ffef3e01192 commit 052f6ec95bf5e29985b456a7d0287ffef3e01192 Author: Gleb Smirnoff AuthorDate: 2023-07-20 21:56:20 +0000 Commit: Ed Maste CommitDate: 2023-12-18 17:34:47 +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 (cherry picked from commit 90f10db8a99659d1baea7b2609d9256c331f61ae) --- 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));