From nobody Thu Feb 20 23:33:57 2025 X-Original-To: dev-commits-src-main@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 4YzV2Z34Jpz5pZp9; Thu, 20 Feb 2025 23:33:58 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YzV2Z1BzHz3pZJ; Thu, 20 Feb 2025 23:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740094438; 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=/fTD40IkR5Vh6isW6WoV9646tsCa0fowargno2qepg8=; b=EMEeICAR+QC4bLz06n8I2ox8Bt6cyXK4PF5T8A9y7ai/kGPMQZ/JeRWuu7B1fK52fg2yDV M1Hie/vF7FbpZ8f6TcgGl5lrUk8vETJIPXDsxfYTM/rAx5PKxrMYwGAyaArwLk23KIYwEg POAQEhcxlUSmvRhprN7TsGoVq/cP391iWVydmL4T9KWQC41Mo7/dBdnt7psDbfV4nl8UZz RrmvjO+7DQZkJ092N3mlyGy2DaR2S45wy4Bpus6JuUvQlojvJcmIYR0w9W5oFm6vroQocl IEOQw7xDyOsG+kDeLP0H/VU2W2aDV46F7rgWjfuzl7Y36sFbxh5VQcW1mrAC3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740094438; a=rsa-sha256; cv=none; b=v58wwwhYoIxdSuM1ppbnBC0fAFy5lQ8BhmLMukOvv2SpAYyKG+83AdjkXNIbI5nTk8HTn4 f5gctZ0t9BAwrsbRk2sn7ePNNOQ7Y11AMmDXTirsZi8NXg8YJFQEspAdKQYxpLsElHbRIo oDMr4JFQ5G8q5/XevJnuKZQmzincWFFQLPEm9agD0AW4ByzydS84cv5C+l3ocAXjH5180z 4dfTRQ+hKjXraqu6zvRDJkBlp09WiCR63ydc3/U0JmfsM3wwBNRXsGVzuxHrcioLz+q1+T WKF4zlYjtLIY/eJYASkVI0DtpNqphCl+aE7mZ0lgDUJDcdxd5OCrEIOYBQbOgA== 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=1740094438; 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=/fTD40IkR5Vh6isW6WoV9646tsCa0fowargno2qepg8=; b=Li/N7NDUXz9V+3js+SpiFjgIwO3npD94Ec6VFOsySPBQAn7FdlRY7FZU9/ulcq1T7Zmvuv cU0+M//5htXPXcOMzgQYTxMJGlt/GaqrIWvdKghcRyxitnnJpOh9XouHPy9yn52AOA5Kf1 PbDKhfwIrwgB6lOVPiTrwDI4fD0Q23+vupD2SeUxkyJGgSsP3Gj+9vvL4wfO+TqrERHkSS zsUb6SzuhZwYqP9VZZmJDUhDs0ndMBH0pNtymKYBAPWPk+QdGadidE6twlVOI1bQQS5VjW IpKC2mjiCiVF6TKwKqrOLJpB+30/cqzVT+CVPA+NFJ17hsG1MqV2IjSdbWdwuw== 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 4YzV2Z0lqSz1C6S; Thu, 20 Feb 2025 23:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51KNXvWL005056; Thu, 20 Feb 2025 23:33:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51KNXvgN005053; Thu, 20 Feb 2025 23:33:57 GMT (envelope-from git) Date: Thu, 20 Feb 2025 23:33:57 GMT Message-Id: <202502202333.51KNXvgN005053@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: d71e7e57fc14 - main - ssh: Consolidate HAVE_LDNS / LIBWRAP in ssh.mk List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: d71e7e57fc1472e3ea6d31c44e187c2819d2c71e Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d71e7e57fc1472e3ea6d31c44e187c2819d2c71e commit d71e7e57fc1472e3ea6d31c44e187c2819d2c71e Author: Ed Maste AuthorDate: 2022-04-12 13:18:20 +0000 Commit: Ed Maste CommitDate: 2025-02-20 23:33:46 +0000 ssh: Consolidate HAVE_LDNS / LIBWRAP in ssh.mk Commit 9d63429fa163 ("ssh: move common Makefile boilerplate to a new ssh.mk") introduced ssh.mk for common OpenSSH paths and flags, as part of enabling FIDO/U2F. Move duplicated MK_LDNS and MK_TCP_WRAPPERS handling there. Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31896 --- secure/lib/libssh/Makefile | 2 +- secure/libexec/sftp-server/Makefile | 6 ------ secure/libexec/ssh-keysign/Makefile | 10 +--------- secure/libexec/ssh-pkcs11-helper/Makefile | 10 +--------- secure/libexec/sshd-session/Makefile | 6 ------ secure/ssh.mk | 8 ++++++++ secure/usr.bin/scp/Makefile | 6 ------ secure/usr.bin/sftp/Makefile | 6 ------ secure/usr.bin/ssh-add/Makefile | 6 ------ secure/usr.bin/ssh-agent/Makefile | 10 +--------- secure/usr.bin/ssh-keygen/Makefile | 8 +------- secure/usr.bin/ssh-keyscan/Makefile | 6 ------ secure/usr.bin/ssh/Makefile | 4 ---- secure/usr.sbin/sshd/Makefile | 1 - 14 files changed, 13 insertions(+), 76 deletions(-) diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile index 43fa46149dfa..d5292be88a4b 100644 --- a/secure/lib/libssh/Makefile +++ b/secure/lib/libssh/Makefile @@ -45,7 +45,7 @@ SRCS+= bcrypt_pbkdf.c blowfish.c bsd-misc.c bsd-signal.c explicit_bzero.c \ SRCS+= getrrsetbyname.c .else LDNSDIR= ${SRCTOP}/contrib/ldns -CFLAGS+= -DHAVE_LDNS=1 -I${LDNSDIR} +CFLAGS+= -I${LDNSDIR} SRCS+= getrrsetbyname-ldns.c LIBADD+= ldns .endif diff --git a/secure/libexec/sftp-server/Makefile b/secure/libexec/sftp-server/Makefile index 40d86926d1bb..29f7a8df9fdd 100644 --- a/secure/libexec/sftp-server/Makefile +++ b/secure/libexec/sftp-server/Makefile @@ -7,12 +7,6 @@ MAN= sftp-server.8 LIBADD= ssh -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include .PATH: ${SSHDIR} diff --git a/secure/libexec/ssh-keysign/Makefile b/secure/libexec/ssh-keysign/Makefile index 6027b164a35f..e66ed527affd 100644 --- a/secure/libexec/ssh-keysign/Makefile +++ b/secure/libexec/ssh-keysign/Makefile @@ -6,15 +6,7 @@ SRCS= ssh-keysign.c readconf.c uidswap.c MAN= ssh-keysign.8 BINMODE=4555 -LIBADD= ssh - -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - -LIBADD+= crypto +LIBADD= crypto ssh .include diff --git a/secure/libexec/ssh-pkcs11-helper/Makefile b/secure/libexec/ssh-pkcs11-helper/Makefile index 4bc3a814ab8e..84374fdca43b 100644 --- a/secure/libexec/ssh-pkcs11-helper/Makefile +++ b/secure/libexec/ssh-pkcs11-helper/Makefile @@ -5,15 +5,7 @@ PROG= ssh-pkcs11-helper SRCS= ssh-pkcs11.c ssh-pkcs11-helper.c MAN= ssh-pkcs11-helper.8 -LIBADD= ssh - -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - -LIBADD+= crypto +LIBADD= crypto ssh .include diff --git a/secure/libexec/sshd-session/Makefile b/secure/libexec/sshd-session/Makefile index bce96112f65a..81e481559189 100644 --- a/secure/libexec/sshd-session/Makefile +++ b/secure/libexec/sshd-session/Makefile @@ -26,12 +26,6 @@ MAN= # pam should always happen before ssh here for static linking LIBADD= pam ssh util -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .if ${MK_AUDIT} != "no" CFLAGS+= -DUSE_BSM_AUDIT=1 -DHAVE_GETAUDIT_ADDR=1 LIBADD+= bsm diff --git a/secure/ssh.mk b/secure/ssh.mk index bd88e43aa0a3..8411fb11fb16 100644 --- a/secure/ssh.mk +++ b/secure/ssh.mk @@ -12,6 +12,14 @@ CFLAGS+= -include krb5_config.h CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE:U/usr/local}/bin/xauth\" +.if ${MK_LDNS} != "no" +CFLAGS+= -DHAVE_LDNS=1 +.endif + +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP=1 +.endif + .if ${MK_USB} != "no" # Built-in security key support CFLAGS+= -include sk_config.h diff --git a/secure/usr.bin/scp/Makefile b/secure/usr.bin/scp/Makefile index dbc896286dd3..2ecea0ef52da 100644 --- a/secure/usr.bin/scp/Makefile +++ b/secure/usr.bin/scp/Makefile @@ -7,12 +7,6 @@ PACKAGE= ssh LIBADD= ssh -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include .PATH: ${SSHDIR} diff --git a/secure/usr.bin/sftp/Makefile b/secure/usr.bin/sftp/Makefile index 841c89b71c67..f903f5e611d5 100644 --- a/secure/usr.bin/sftp/Makefile +++ b/secure/usr.bin/sftp/Makefile @@ -8,12 +8,6 @@ PACKAGE= ssh LIBADD= ssh edit -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include .PATH: ${SSHDIR} diff --git a/secure/usr.bin/ssh-add/Makefile b/secure/usr.bin/ssh-add/Makefile index ec709c721089..8df3789534af 100644 --- a/secure/usr.bin/ssh-add/Makefile +++ b/secure/usr.bin/ssh-add/Makefile @@ -7,12 +7,6 @@ PACKAGE= ssh LIBADD= ssh -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include .PATH: ${SSHDIR} diff --git a/secure/usr.bin/ssh-agent/Makefile b/secure/usr.bin/ssh-agent/Makefile index bc5985a7325e..06abc627fcd5 100644 --- a/secure/usr.bin/ssh-agent/Makefile +++ b/secure/usr.bin/ssh-agent/Makefile @@ -5,20 +5,12 @@ PROG= ssh-agent SRCS= ssh-agent.c ssh-pkcs11-client.c PACKAGE= ssh -LIBADD= ssh - -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif +LIBADD= crypto ssh .if defined(LOCALBASE) CFLAGS+= -DDEFAULT_PKCS11_WHITELIST='"/usr/lib*/*,${LOCALBASE}/lib*/*"' .endif -LIBADD+= crypto - .include .PATH: ${SSHDIR} diff --git a/secure/usr.bin/ssh-keygen/Makefile b/secure/usr.bin/ssh-keygen/Makefile index 149dc6936659..89e61e68ee55 100644 --- a/secure/usr.bin/ssh-keygen/Makefile +++ b/secure/usr.bin/ssh-keygen/Makefile @@ -6,13 +6,7 @@ PROG= ssh-keygen SRCS= ssh-keygen.c sshsig.c ssh-sk-client.c PACKAGE= ssh -LIBADD= ssh - -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -.endif - -LIBADD+= crypto +LIBADD= crypto ssh .include diff --git a/secure/usr.bin/ssh-keyscan/Makefile b/secure/usr.bin/ssh-keyscan/Makefile index b842841f765f..baa7f54b048d 100644 --- a/secure/usr.bin/ssh-keyscan/Makefile +++ b/secure/usr.bin/ssh-keyscan/Makefile @@ -7,12 +7,6 @@ PACKAGE= ssh LIBADD= ssh -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include .PATH: ${SSHDIR} diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile index aba1bce9c9a1..df85f47d5975 100644 --- a/secure/usr.bin/ssh/Makefile +++ b/secure/usr.bin/ssh/Makefile @@ -17,10 +17,6 @@ SRCS+= gss-genr.c LIBADD= ssh -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -.endif - .if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no" LIBADD+= gssapi .endif diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile index d3b228bbbeb4..23a053f27ae7 100644 --- a/secure/usr.sbin/sshd/Makefile +++ b/secure/usr.sbin/sshd/Makefile @@ -21,7 +21,6 @@ LIBADD+= gssapi_krb5 gssapi krb5 .endif .if ${MK_TCP_WRAPPERS} != "no" -CFLAGS+= -DLIBWRAP=1 LIBADD+= wrap .endif