From 32b6bd0b29c2b53c3fd0604f1979d8e93b980e31 Mon Sep 17 00:00:00 2001
From: Sascha Wildner <saw@online.de>
Date: Sun, 6 Nov 2016 21:16:50 +0100
Subject: [PATCH] WIP adjust some after secure/ removal.

---
 crypto/openssh/README.DRAGONFLY | 24 ++++++++++++------------
 etc/Makefile                    |  6 +++---
 lib/libcrypt/Makefile           |  8 +-------
 share/man/man7/hier.7           |  5 +----
 usr.bin/openssl/Makefile.etc    | 12 ++----------
 usr.bin/whereis/pathnames.h     |  5 +----
 6 files changed, 20 insertions(+), 40 deletions(-)

diff --git a/crypto/openssh/README.DRAGONFLY b/crypto/openssh/README.DRAGONFLY
index d36eb1e..8211034 100644
--- a/crypto/openssh/README.DRAGONFLY
+++ b/crypto/openssh/README.DRAGONFLY
@@ -7,19 +7,19 @@ Upgrading notes:
 ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-sandbox=rlimit \
 	--with-pam --with-libedit --with-ssl-engine
 
-Update config.h in secure/lib/libssh.
+Update config.h in lib/libssh.
 Update version in sshd_config, sshd_config.5, version.h.
 
 Used in:
+lib/libssh/
 lib/pam_module/pam_ssh/
-secure/lib/libssh/
-secure/libexec/sftp-server/
-secure/libexec/ssh-keysign/
-secure/usr.bin/scp/
-secure/usr.bin/sftp/
-secure/usr.bin/ssh/
-secure/usr.bin/ssh-add/
-secure/usr.bin/ssh-agent/
-secure/usr.bin/ssh-keygen/
-secure/usr.bin/ssh-keyscan/
-secure/usr.sbin/sshd/
+libexec/sftp-server/
+libexec/ssh-keysign/
+usr.bin/scp/
+usr.bin/sftp/
+usr.bin/ssh-add/
+usr.bin/ssh-agent/
+usr.bin/ssh-keygen/
+usr.bin/ssh-keyscan/
+usr.bin/ssh/
+usr.sbin/sshd/
diff --git a/etc/Makefile b/etc/Makefile
index 5db9e43..85db6ae 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -41,9 +41,9 @@ BIN1+=	${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config
 
 .if !defined(NO_CRYPT)
 DIRS+=	lib/libssh \
-	secure/usr.bin/ssh \
-	secure/usr.sbin/sshd \
-	secure/usr.bin/openssl
+	usr.bin/openssl \
+	usr.bin/ssh \
+	usr.sbin/sshd
 .endif
 
 # Files that should be installed read-only-executable (555) root:wheel
diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile
index cf6147a..fee143a 100644
--- a/lib/libcrypt/Makefile
+++ b/lib/libcrypt/Makefile
@@ -1,6 +1,5 @@
 #
 # $FreeBSD: src/lib/libcrypt/Makefile,v 1.24.2.4 2001/07/16 03:28:26 peter Exp $
-# $DragonFly: src/lib/libcrypt/Makefile,v 1.8 2008/10/28 17:23:45 swildner Exp $
 #
 
 SHLIB_MAJOR=	4
@@ -10,6 +9,7 @@ SHLIBDIR?=	/lib
 .PATH:		${.CURDIR}/../libmd
 SRCS=		crypt.c crypt-md5.c \
 		crypt-sha256.c crypt-sha512.c \
+		crypt-des.c crypt-blowfish.c blowfish.c \
 		deprecated-crypt-sha256.c deprecated-crypt-sha512.c \
 		md5c.c misc.c
 WARNS?=		2
@@ -20,13 +20,7 @@ MLINKS=		crypt.3 crypt_get_format.3 crypt.3 crypt_set_format.3
 CFLAGS+=	-I${.CURDIR}/../libmd -I${.CURDIR}/../libutil
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
 CFLAGS+=	-D_CTYPE_H_DISABLE_MACROS_ 
-# Pull in the crypt-des.c source, assuming it is present.
-.if exists(${.CURDIR}/../../secure/lib/libcrypt/crypt-des.c) && \
-    !defined(NO_CRYPT)
-.PATH:		${.CURDIR}/../../secure/lib/libcrypt
-SRCS+=		crypt-des.c crypt-blowfish.c blowfish.c
 CFLAGS+=	-I${.CURDIR} -DHAS_DES -DHAS_BLOWFISH
-.endif
 # And the auth_getval() code and support.
 .PATH:		${.CURDIR}/../libutil
 SRCS+=		auth.c property.c
diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7
index 4bc8eb8..8de5448 100644
--- a/share/man/man7/hier.7
+++ b/share/man/man7/hier.7
@@ -28,7 +28,7 @@
 .\"	@(#)hier.7	8.1 (Berkeley) 6/5/93
 .\" $FreeBSD: src/share/man/man7/hier.7,v 1.29.2.17 2003/01/13 21:43:50 ceri Exp $
 .\"
-.Dd May 15, 2016
+.Dd November 6, 2016
 .Dt HIER 7
 .Os
 .Sh NAME
@@ -534,9 +534,6 @@ release
 .It Pa sbin/
 source code for files in
 .Pa /sbin
-.It Pa secure/
-build directory for files in
-.Pa /usr/src/crypto
 .It Pa share/
 source for files in
 .Pa /usr/share
diff --git a/usr.bin/openssl/Makefile.etc b/usr.bin/openssl/Makefile.etc
index be15426..fa47212 100644
--- a/usr.bin/openssl/Makefile.etc
+++ b/usr.bin/openssl/Makefile.etc
@@ -1,17 +1,9 @@
-# $DragonFly: src/secure/usr.bin/openssl/Makefile.etc,v 1.1 2005/07/07 12:18:30 corecode Exp $
-#
-
 FILES=		openssl.cnf
 FILESDIR=	/etc/ssl
 FILESOWN=	${BINOWN}
 FILESGRP=	${BINGRP}
 FILESMODE=	644
 
-SCRIPTS=	CA.pl CA.sh
-SCRIPTSNAME_CA.pl=	CA.pl
-SCRIPTSNAME_CA.sh=	CA.sh
-SCRIPTSDIR=	/etc/ssl
-
-.include "../../lib/libcrypto/Makefile.inc"
-.PATH: ${LCRYPTO_SRC}/apps
+.include "../../lib/librecrypto/Makefile.inc"
+.PATH: ${LCRYPTO_SRC}/apps/openssl
 .include <bsd.prog.mk>
diff --git a/usr.bin/whereis/pathnames.h b/usr.bin/whereis/pathnames.h
index 51b95f0..6520a22 100644
--- a/usr.bin/whereis/pathnames.h
+++ b/usr.bin/whereis/pathnames.h
@@ -36,10 +36,7 @@
 "/usr/src/gnu/bin:/usr/src/gnu/usr.bin:"		\
 "/usr/src/gnu/sbin:/usr/src/gnu/usr.sbin:"		\
 "/usr/src/gnu/libexec:/usr/src/contrib:"		\
-"/usr/src/secure/bin:/usr/src/secure/usr.bin:"		\
-"/usr/src/secure/sbin:/usr/src/secure/usr.sbin:"	\
-"/usr/src/secure/libexec:/usr/src/crypto:"		\
-"/usr/src/games"
+"/usr/src/crypto:/usr/src/games"
 
 /* Each subdirectory of PATH_DPORTS will be appended to PATH_SOURCES. */
 #define PATH_DPORTS "/usr/dports"
-- 
2.9.2

