OpenSSH: Correctly set xauth's path (2/2)
authorFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 23 Nov 2014 11:41:12 +0000 (12:41 +0100)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 23 Nov 2014 11:44:43 +0000 (12:44 +0100)
X11BASE is used internally by dports and setting it globally
can be dangerous.
Only define this variable in the OpenSSH makefiles.

secure/usr.bin/ssh/Makefile
secure/usr.sbin/sshd/Makefile
share/mk/sys.mk

index c02ac10..c4094e2 100644 (file)
@@ -1,6 +1,4 @@
 # $FreeBSD: src/secure/usr.bin/ssh/Makefile,v 1.4.2.8 2003/02/03 17:31:12 des Exp $
-# $DragonFly: src/secure/usr.bin/ssh/Makefile,v 1.9 2008/09/28 03:19:46 pavalos Exp $
-#
 
 PROG=  ssh
 LINKS= ${BINDIR}/ssh ${BINDIR}/slogin
@@ -12,9 +10,8 @@ SRCS= ssh.c readconf.c clientloop.c sshtty.c \
        sshconnect.c sshconnect1.c sshconnect2.c mux.c \
        roaming_common.c roaming_client.c
 
-.if defined(X11BASE)
+X11BASE?=      /usr/local
 CFLAGS+= -DXAUTH_PATH=\"${X11BASE}/bin/xauth\"
-.endif
 
 .include "../../Makefile.ssh.common"
 .include <bsd.prog.mk>
index 4521afa..fc8c238 100644 (file)
@@ -1,6 +1,4 @@
 # $FreeBSD: src/secure/usr.sbin/sshd/Makefile,v 1.5.2.9 2003/02/03 17:31:12 des Exp $
-# $DragonFly: src/secure/usr.sbin/sshd/Makefile,v 1.15 2008/09/28 03:19:46 pavalos Exp $
-#
 
 PROG=  sshd
 SRCS=  sshd.c auth-rhosts.c auth-passwd.c auth-rsa.c auth-rh-rsa.c \
@@ -35,9 +33,8 @@ CFLAGS+=-DUSE_PAM -DHAVE_SECURITY_PAM_APPL_H \
 LDADD+=        -lopie
 DPADD+=        ${LIBOPIE}
 
-.if defined(X11BASE)
+X11BASE?=      /usr/local
 CFLAGS+= -DXAUTH_PATH=\"${X11BASE}/bin/xauth\"
-.endif
 
 LDADD+=        -lcrypt -lwrap ${MINUSLPAM}
 DPADD+=        ${LIBCRYPT} ${LIBWRAP} ${LIBPAM}
index acd867b..dd434ec 100644 (file)
@@ -26,8 +26,6 @@ unix          ?=      We run FreeBSD, not UNIX.
 
 .LIBS:         .a
 
-X11BASE                ?=      /usr/local
-
 AR             ?=      ar
 NXAR           ?=      ${NXENV} ${AR}
 .if defined(%POSIX)