Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Install default ssh_known_hosts file with public keys for Pr...



details:   https://anonhg.NetBSD.org/src/rev/a1ea20102af1
branches:  trunk
changeset: 557517:a1ea20102af1
user:      tls <tls%NetBSD.org@localhost>
date:      Sun Jan 11 04:21:18 2004 +0000

description:
Install default ssh_known_hosts file with public keys for Project servers.
Hopefully I didn't make too much of a hash of the postinstall support for
this; it currently installs the file if there's none in the destination,
and elsewise notes if the CVS version differs (or is missing) but doesn't
try to fix that.

diffstat:

 distrib/sets/lists/etc/mi |   3 ++-
 etc/Makefile              |   8 +++++++-
 etc/postinstall           |  36 +++++++++++++++++++++++++++++++++++-
 etc/ssh_known_hosts       |  18 ------------------
 4 files changed, 44 insertions(+), 21 deletions(-)

diffs (120 lines):

diff -r e7765a5b7d38 -r a1ea20102af1 distrib/sets/lists/etc/mi
--- a/distrib/sets/lists/etc/mi Sun Jan 11 03:24:39 2004 +0000
+++ b/distrib/sets/lists/etc/mi Sun Jan 11 04:21:18 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.133 2004/01/04 23:55:11 lukem Exp $
+# $NetBSD: mi,v 1.134 2004/01/11 04:21:19 tls Exp $
 ./.cshrc                               etc-util-etc
 ./.profile                             etc-util-etc
 ./dev/MAKEDEV                          etc-sys-etc
@@ -225,6 +225,7 @@
 ./etc/spwd.db                          etc-sys-etc
 ./etc/ssh/ssh_config                   etc-secsh-etc   crypto
 ./etc/ssh/sshd_config                  etc-secsh-etc   crypto
+./etc/ssh/ssh_known_hosts              etc-secsh-etc   crypto
 ./etc/sysctl.conf                      etc-sys-etc
 ./etc/syslog.conf                      etc-sys-etc
 ./etc/ttys                             etc-sys-etc
diff -r e7765a5b7d38 -r a1ea20102af1 etc/Makefile
--- a/etc/Makefile      Sun Jan 11 03:24:39 2004 +0000
+++ b/etc/Makefile      Sun Jan 11 04:21:18 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.273 2004/01/08 02:37:16 lukem Exp $
+#      $NetBSD: Makefile,v 1.274 2004/01/11 04:21:18 tls Exp $
 #      from: @(#)Makefile      8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -124,6 +124,8 @@
 
 NAMEDB=        127 root.cache named.conf localhost loopback.v6
 
+SSH=   ssh_known_hosts
+
 .if ${TARGET_ENDIANNESS} == "1234"
 PWD_MKDB_ENDIAN=       -L
 .elif ${TARGET_ENDIANNESS} == "4321"
@@ -246,6 +248,10 @@
        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
            namedb/${file} ${DESTDIR}/etc/namedb
 .endfor
+.for file in ${SSH}
+       ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
+           ssh/${file} ${DESTDIR}/etc/ssh
+.endfor
        (cd ${.CURDIR}/powerd; ${MAKE} install)
        (cd ${.CURDIR}/rc.d; ${MAKE} install)
        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
diff -r e7765a5b7d38 -r a1ea20102af1 etc/postinstall
--- a/etc/postinstall   Sun Jan 11 03:24:39 2004 +0000
+++ b/etc/postinstall   Sun Jan 11 04:21:18 2004 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.67 2004/01/06 13:16:53 lukem Exp $
+# $NetBSD: postinstall,v 1.68 2004/01/11 04:21:18 tls Exp $
 #
 # Copyright (c) 2002-2004 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -581,6 +581,40 @@
 }
 
 #
+#
+#
+additem ssh_known_hosts "ssh known_hosts file update"
+do_ssh_known_hosts()
+{
+       failed=0
+
+       if [ ! -e "${DEST_DIR}/etc/ssh/ssh_known_hosts" ]; then
+               if [ "${op}" = "check" ]; then 
+                       msg ${DEST_DIR}/etc/ssh/ssh_known_hosts is missing
+                       failed=1 
+               else
+                       if ! cp "${SRC_DIR}/etc/ssh/ssh_known_hosts" \
+                           "${DEST_DIR}/etc/ssh/ssh_known_hosts"; then
+                               failed=1
+                       fi
+               fi
+       else
+               src_vers=`awk '/\\$NetBSD/ {print $4}' \
+                   "${SRC_DIR}/etc/ssh/ssh_known_hosts"`
+               dst_vers=`awk '/\\$NetBSD/ {print $4}' \
+                   "${DEST_DIR}/etc/ssh/ssh_known_hosts"`
+               if [ "${src_vers}" != "${dst_vers}" ]; then
+                       msg ${DEST_DIR}/etc/ssh/ssh_known_hosts version: \
+                           ${dest_vers}
+                       msg ${SRC_DIR}/etc/ssh/ssh_known_hosts version: \
+                           ${src_vers}
+                       failed=1
+               fi
+       fi
+       return  ${failed}
+}
+
+#
 #      wscons
 #
 additem wscons "wscons configuration file update"
diff -r e7765a5b7d38 -r a1ea20102af1 etc/ssh_known_hosts
--- a/etc/ssh_known_hosts       Sun Jan 11 03:24:39 2004 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-#      $NetBSD: ssh_known_hosts,v 1.1 2004/01/11 03:20:41 tls Exp $
-#
-anoncvs.isc.netbsd.org ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAIEApe8BU365o9uFxIRqVCk12favdP/1KSz6u5O+hqk7cpECVdA9FcejIeMtgKeFyC6VOnr91TYPqJLG3WMaQU/6lHXd4MzxUX9JfJ6Sjb3F8t1C1+tkuaKlu6l9kwzH60w+nvE070DS1zCBTrHT5/GWm1QYmodpr9jOegUTwDp292E=
-
-anoncvs.netbsd.org 1024 33 
124527836847225907702134616704062642655823674633646867489991942489052722003567896405835432181052901730304969527126160762854542328265293874791858398238222787853274712973179184350617008506840396224723739301126809289775083202762136105883911120059428253653584248682397589937086051061126544879545951581690785060623
-anoncvs.netbsd.org ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAIEA3QiBl8leG9fqIJpKeNov0PKq5YryFFiroMWOPUv4hDFn8R0jC07YVaR/OSBrr37CTmGX5AFceXPzoFnLlwCqWR7rXg4NR75FTlTp9CG9EBAEtU8mee27KDrUFBTZdfVl2+aRYoAI5fTXA+0vpIO68Cq843vRWUZCcwinS4cNLUU=
-
-cvs.netbsd.org,cvs4.netbsd.org,cvs.isc.netbsd.org,204.152.185.213 ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAIEApXyMaFs6AKXUm2xVJdKm5nlSYnF/C9E0TJ5r83tEuSycddikFdd3oaxedjVJutrKjkCAJSisGnKuYFyiv63QIw/5ltVCS0jYlz8e5ssWDEnMgg3ffYVcrI0e7qrbk4lVJ9qsKSUmk9u00DqXuCRzE0R2B3YBXpvvxCJTcUze11E=
-
-ftp.netbsd.org,ftp4.netbsd.org,ftp.isc.netbsd.org ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAIEApDHT2kauEY8RhFXgB5/QIlg3vbdLWvXSfofAvZQ6Ks5y3xKXYiMqKG/WEm5kkycpFMI4QBCA/wzi1/IiTFA2f2ZosxZlTVOhGPoyB6oEQPPHmLEjS3vzkc2Dwo59qF+6VGkRH+Yd2Q03gbxXKqEY7ck2GFsSpIzdA0fm3jwmb+E=
-
-mail.netbsd.org,mail.isc.netbsd.org,homeworld.netbsd.org ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAIEAt8UJLhW8iou8Ack7V5XrzfCgzOkdK75+xDZePMBPg+CYDLnHbP1+KQaSrvfnvDzCvgOUXHOkGji1jbrtzDYwv7Itw0hRUo7TxR99c3bTomb9U0vWV5k4FDIyz4xJXWBJMVkKseAWAXgnc5FSdB6V/e21TAISJBl9dolhqOGVsxM=
-
-releng.netbsd.org,zathras.netbsd.org,zathras.isc.netbsd.org ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAIEA2vFjAoSx7i8OTUZR1HaqiojWmGiTngCXBFeFsxehwCEEDPW61SJ/V98AnE1uN0U7mV/bOAd1rAzuuOWufxPa9pRJW8hTXRw/dBF7intgD1RGSaTvh5Vgzv3vzta8T9EFxDnOROvBfsZWq2FYryHz7/dh77nsCRZ9HwG2vfE0k2k=
-
-tgm.netbsd.org,tgm.isc.netbsd.org,204.152.185.217 ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAIEA4JwCPyF1K2lOi+mHPqGaN96i9fbWFE0h7L4XdZU5Gil+EngL5X74h21AEg0NbeIihkM8vAdiGdAXtZ0AUCKC1OLPIOktJYmx+Ykm2jXB+to7tbGUIwy+tOUM0JNuo+ZJ+LFbGxu/M1hATWdw0ftKIr8YJ0FptE4el4DNRcp3EME=
-
-www.netbsd.org,www4.netbsd.org,www.isc.netbsd.org ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAIEAyBrlCbbZ2lQxWt7c9Ru0byoOktalLWKJ4t0kzWp6C2oVa+Ll1c1TO2FJb34DCZqULfSHaMmKgq647d75npk9GeXXLk8QwcX6kNl7QFnHo7GUHnHtiZAjTMbYmYOaNLi1PjwyQH+9yeRQYsGW7xejTsyK0yuRKROdCl/QU9gkB3s=



Home | Main Index | Thread Index | Old Index