Module Name: src
Committed By: martin
Date: Mon Mar 11 17:37:43 UTC 2024
Modified Files:
src/etc [netbsd-9]: named.conf
src/external/mpl/bind/dist/lib/isc/netmgr [netbsd-9]: netmgr-int.h
src/usr.sbin/postinstall [netbsd-9]: postinstall.in
Log Message:
Pull up following revision(s) (requested by christos in ticket #1813):
etc/named.conf: revision 1.11
usr.sbin/postinstall/postinstall.in: revision 1.59
external/mpl/bind/dist/lib/isc/netmgr/netmgr-int.h: revision 1.11
Make sure that the extra field is maximally aligned since it is used for
other struct storage.
- fix named.conf (remove dnssec-enable option)
- use proper local variables instead of adding _ or other prefixes.
- centralize rm use
- use grep -q instead of > /dev/null
- reduce constant duplication
remove obsolete option "dnssec-enable"
To generate a diff of this commit:
cvs rdiff -u -r1.7.32.1 -r1.7.32.2 src/etc/named.conf
cvs rdiff -u -r1.10.2.2 -r1.10.2.3 \
src/external/mpl/bind/dist/lib/isc/netmgr/netmgr-int.h
cvs rdiff -u -r1.5.2.5 -r1.5.2.6 src/usr.sbin/postinstall/postinstall.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/named.conf
diff -u src/etc/named.conf:1.7.32.1 src/etc/named.conf:1.7.32.2
--- src/etc/named.conf:1.7.32.1 Fri Mar 27 08:43:42 2020
+++ src/etc/named.conf Mon Mar 11 17:37:42 2024
@@ -1,4 +1,4 @@
-# $NetBSD: named.conf,v 1.7.32.1 2020/03/27 08:43:42 sborrill Exp $
+# $NetBSD: named.conf,v 1.7.32.2 2024/03/11 17:37:42 martin Exp $
# boot file for secondary name server
# Note that there should be one primary entry for each SOA record.
@@ -10,7 +10,6 @@
options {
directory "/etc/namedb";
- dnssec-enable yes;
dnssec-validation auto;
managed-keys-directory "keys";
bindkeys-file "bind.keys";
Index: src/external/mpl/bind/dist/lib/isc/netmgr/netmgr-int.h
diff -u src/external/mpl/bind/dist/lib/isc/netmgr/netmgr-int.h:1.10.2.2 src/external/mpl/bind/dist/lib/isc/netmgr/netmgr-int.h:1.10.2.3
--- src/external/mpl/bind/dist/lib/isc/netmgr/netmgr-int.h:1.10.2.2 Thu Feb 29 12:35:14 2024
+++ src/external/mpl/bind/dist/lib/isc/netmgr/netmgr-int.h Mon Mar 11 17:37:43 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: netmgr-int.h,v 1.10.2.2 2024/02/29 12:35:14 martin Exp $ */
+/* $NetBSD: netmgr-int.h,v 1.10.2.3 2024/03/11 17:37:43 martin Exp $ */
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -276,7 +276,7 @@ struct isc_nmhandle {
LINK(isc_nmhandle_t) active_link;
#endif
void *opaque;
- char extra[];
+ max_align_t extra[];
};
typedef enum isc__netievent_type {
Index: src/usr.sbin/postinstall/postinstall.in
diff -u src/usr.sbin/postinstall/postinstall.in:1.5.2.5 src/usr.sbin/postinstall/postinstall.in:1.5.2.6
--- src/usr.sbin/postinstall/postinstall.in:1.5.2.5 Tue Jul 7 20:02:27 2020
+++ src/usr.sbin/postinstall/postinstall.in Mon Mar 11 17:37:42 2024
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: postinstall.in,v 1.5.2.5 2020/07/07 20:02:27 martin Exp $
+# $NetBSD: postinstall.in,v 1.5.2.6 2024/03/11 17:37:42 martin Exp $
#
# Copyright (c) 2002-2015 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -1299,15 +1299,47 @@ do_mtree()
#
# named
#
+handle_named_conf()
+{
+ local op="$1"
+ local option="dnssec-enable"
+ local failed=0
+ local conf
+
+ shift
+
+ for conf; do
+ local c=$(readlink -f "${conf}")
+ if ! ${GREP} -qs "${option}" "${c}"
+ then
+ continue
+ fi
+
+ if [ "${op}" = "fix" ]; then
+ ${SED} -e "/${option}/d" "${c}" > "${c}.new"
+ failed=$(( ${failed} + $? ))
+ mv "${c}.new" "${c}"
+ failed=$(( ${failed} + $? ))
+ msg "Removed obsolete '${option}' in ${c}"
+ else
+ msg "'${option}' option in ${c} should be removed"
+ failed=$(( ${failed} + 1 ))
+ fi
+ done
+
+ return ${failed}
+}
+
additem named "named configuration update"
do_named()
{
+ local oldconf="${DEST_DIR}/etc/namedb/named.conf"
+ local conf="${DEST_DIR}/etc/named.conf"
[ -n "$1" ] || err 3 "USAGE: do_named fix|check"
- op="$1"
+ local op="$1"
- move_file "${op}" \
- "${DEST_DIR}/etc/namedb/named.conf" \
- "${DEST_DIR}/etc/named.conf"
+ move_file "${op}" "${oldconf}" "${conf}"
+ handle_named_conf "${op}" "${oldconf}" "${conf}"
compare_dir "${op}" "${SRC_DIR}/etc/namedb" "${DEST_DIR}/etc/namedb" \
644 \