Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/roy]: src/external/bsd/openresolv/dist openresolv: Update to 3.13.2 with...
details: https://anonhg.NetBSD.org/src/rev/421ee693f29e
branches: roy
changeset: 376654:421ee693f29e
user: roy <roy%NetBSD.org@localhost>
date: Tue Jun 27 17:04:19 2023 +0000
description:
openresolv: Update to 3.13.2 with the following changes:
* Do not return error from -i when no interfaces are configured
* unbound can now add generic options to forward zones
diffstat:
external/bsd/openresolv/dist/README.md | 4 +-
external/bsd/openresolv/dist/dnsmasq.in | 8 +++---
external/bsd/openresolv/dist/libc.in | 27 +++++++++++++++++---
external/bsd/openresolv/dist/named.in | 4 +-
external/bsd/openresolv/dist/pdns_recursor.in | 4 +-
external/bsd/openresolv/dist/pdnsd.in | 10 +++---
external/bsd/openresolv/dist/resolvconf.8.in | 6 ++--
external/bsd/openresolv/dist/resolvconf.conf.5.in | 19 ++++++++++---
external/bsd/openresolv/dist/resolvconf.in | 30 ++++++++++++++++------
external/bsd/openresolv/dist/unbound.in | 10 ++++++-
10 files changed, 85 insertions(+), 37 deletions(-)
diffs (truncated from 424 to 300 lines):
diff -r ae72a3ab8628 -r 421ee693f29e external/bsd/openresolv/dist/README.md
--- a/external/bsd/openresolv/dist/README.md Fri Apr 21 16:52:28 2023 +0000
+++ b/external/bsd/openresolv/dist/README.md Tue Jun 27 17:04:19 2023 +0000
@@ -37,7 +37,7 @@ Here's some reasons:
The last point is quite important, especially when running VPN systems.
Take the following resolv.conf files which have been generated by a
-[DHCP client](../dhcpcd) and sent to resolvconf:
+[DHCP client](https://github.com/NetworkConfiguration/dhcpcd) and sent to resolvconf:
```
# resolv.conf from bge0
@@ -60,7 +60,7 @@ openresolv ships with helpers for:
* [PowerDNS Recursor](http://wiki.powerdns.com/trac)
See the
-[configuration section](https://roy.marples.name/projects/openresolv/config)
+[configuration section](https://roy.marples.name/projects/openresolv/configuration)
for more details.
If openresolv updates `/etc/resolv.conf` it can notify the following of this:
diff -r ae72a3ab8628 -r 421ee693f29e external/bsd/openresolv/dist/dnsmasq.in
--- a/external/bsd/openresolv/dist/dnsmasq.in Fri Apr 21 16:52:28 2023 +0000
+++ b/external/bsd/openresolv/dist/dnsmasq.in Tue Jun 27 17:04:19 2023 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2007-2020 Roy Marples
+# Copyright (c) 2007-2023 Roy Marples
# All rights reserved
# dnsmasq subscriber for resolvconf
@@ -105,7 +105,7 @@ for d in $DOMAINS; do
empty=true
continue
fi
- i=$(($i + 1))
+ i=$((i + 1))
while [ ${#addr} -lt 4 ]; do
addr="0${addr}"
done
@@ -118,7 +118,7 @@ for d in $DOMAINS; do
fi
done
while [ $i != 8 ]; do
- i=$(($i + 1))
+ i=$((i + 1))
front="$front byte:0 byte:0"
done
front="${front}$back"
@@ -151,7 +151,7 @@ else
fi
# Try to ensure that config dirs exist
-if type config_mkdirs >/dev/null 2>&1; then
+if command -v config_mkdirs >/dev/null 2>&1; then
config_mkdirs "$dnsmasq_conf" "$dnsmasq_resolv"
else
@SBINDIR@/resolvconf -D "$dnsmasq_conf" "$dnsmasq_resolv"
diff -r ae72a3ab8628 -r 421ee693f29e external/bsd/openresolv/dist/libc.in
--- a/external/bsd/openresolv/dist/libc.in Fri Apr 21 16:52:28 2023 +0000
+++ b/external/bsd/openresolv/dist/libc.in Tue Jun 27 17:04:19 2023 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2007-2020 Roy Marples
+# Copyright (c) 2007-2023 Roy Marples
# All rights reserved
# libc subscriber for resolvconf
@@ -94,6 +94,7 @@ elif [ -d "$SYSCONFDIR"/resolvconf ]; th
fi
fi
: ${resolv_conf:=/etc/resolv.conf}
+: ${resolv_conf_tmp:="$resolv_conf.$$.openresolv"}
: ${libc_service:=nscd}
: ${list_resolv:=@SBINDIR@/resolvconf -l}
if [ "${resolv_conf_head-x}" = x ] && [ -f "$SYSCONFDIR"/resolv.conf.head ]
@@ -107,7 +108,7 @@ fi
backup=true
signature="# Generated by resolvconf"
-
+
uniqify()
{
result=
@@ -226,8 +227,26 @@ if $backup; then
fi
fi
-# Create our resolv.conf now
-(umask 022; printf %s "$newconf" >"$resolv_conf")
+# There are pros and cons for writing directly to resolv.conf
+# instead of a temporary file and then moving it over.
+# The default is to write to resolv.conf as it has the least
+# issues and has been the long standing default behaviour.
+case "${resolv_conf_mv:-NO}" in
+[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
+ # Protect against symlink attack, ensure new file does not exist
+ rm -f "$resolv_conf_tmp"
+ # Keep original file owner, group and mode
+ [ -r "$resolv_conf" ] && cp -p "$resolv_conf" "$resolv_conf_tmp"
+ # Create our resolv.conf now
+ if (umask 022; printf %s "$newconf" >"$resolv_conf_tmp"); then
+ mv "$resolv_conf_tmp" "$resolv_conf"
+ fi
+ ;;
+*)
+ (umask 022; printf %s "$newconf" >"$resolv_conf")
+ ;;
+esac
+
if [ -n "$libc_restart" ]; then
eval $libc_restart
elif [ -n "$RESTARTCMD" ]; then
diff -r ae72a3ab8628 -r 421ee693f29e external/bsd/openresolv/dist/named.in
--- a/external/bsd/openresolv/dist/named.in Fri Apr 21 16:52:28 2023 +0000
+++ b/external/bsd/openresolv/dist/named.in Tue Jun 27 17:04:19 2023 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2007-2020 Roy Marples
+# Copyright (c) 2007-2023 Roy Marples
# All rights reserved
# named subscriber for resolvconf
@@ -79,7 +79,7 @@ for d in $DOMAINS; do
done
# Try to ensure that config dirs exist
-if type config_mkdirs >/dev/null 2>&1; then
+if command -v config_mkdirs >/dev/null 2>&1; then
config_mkdirs "$named_options" "$named_zones"
else
@SBINDIR@/resolvconf -D "$named_options" "$named_zones"
diff -r ae72a3ab8628 -r 421ee693f29e external/bsd/openresolv/dist/pdns_recursor.in
--- a/external/bsd/openresolv/dist/pdns_recursor.in Fri Apr 21 16:52:28 2023 +0000
+++ b/external/bsd/openresolv/dist/pdns_recursor.in Tue Jun 27 17:04:19 2023 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2009-2020 Roy Marples
+# Copyright (c) 2009-2023 Roy Marples
# All rights reserved
# PowerDNS Recursor subscriber for resolvconf
@@ -54,7 +54,7 @@ for d in $DOMAINS; do
done
# Try to ensure that config dirs exist
-if type config_mkdirs >/dev/null 2>&1; then
+if command -v config_mkdirs >/dev/null 2>&1; then
config_mkdirs "$pdnsd_zones"
else
@SBINDIR@/resolvconf -D "$pdnsd_zones"
diff -r ae72a3ab8628 -r 421ee693f29e external/bsd/openresolv/dist/pdnsd.in
--- a/external/bsd/openresolv/dist/pdnsd.in Fri Apr 21 16:52:28 2023 +0000
+++ b/external/bsd/openresolv/dist/pdnsd.in Tue Jun 27 17:04:19 2023 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2010-2020 Roy Marples
+# Copyright (c) 2010-2023 Roy Marples
# All rights reserved
# pdnsd subscriber for resolvconf
@@ -46,7 +46,7 @@ remove_markers()
in_marker=0
shift; shift
- if type sed >/dev/null 2>&1; then
+ if command -v sed >/dev/null 2>&1; then
sed "/^$m1/,/^$m2/d" $@
else
for x do
@@ -66,9 +66,9 @@ remove_markers()
change_file()
{
if [ -e "$1" ]; then
- if type cmp >/dev/null 2>&1; then
+ if command -v cmp >/dev/null 2>&1; then
cmp -s "$1" "$2"
- elif type diff >/dev/null 2>&1; then
+ elif command -v diff >/dev/null 2>&1; then
diff -q "$1" "$2" >/dev/null
else
# Hopefully we're only working on small text files ...
@@ -88,7 +88,7 @@ newresolv="# Generated by resolvconf$NL"
changed=false
# Try to ensure that config dirs exist
-if type config_mkdirs >/dev/null 2>&1; then
+if command -v config_mkdirs >/dev/null 2>&1; then
config_mkdirs "$pdnsd_resolv" "$pdnsd_conf"
else
@SBINDIR@/resolvconf -D "$pdnsd_resolv" "$pdnsd_conf"
diff -r ae72a3ab8628 -r 421ee693f29e external/bsd/openresolv/dist/resolvconf.8.in
--- a/external/bsd/openresolv/dist/resolvconf.8.in Fri Apr 21 16:52:28 2023 +0000
+++ b/external/bsd/openresolv/dist/resolvconf.8.in Tue Jun 27 17:04:19 2023 +0000
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2007-2020 Roy Marples
+.\" Copyright (c) 2007-2023 Roy Marples
.\" All rights reserved
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -189,7 +189,7 @@ Echo the resolvconf version to
.El
.Pp
.Nm
-also has some commands designed to be used by it's subscribers and
+also has some commands designed to be used by its subscribers and
system startup:-
.Bl -tag -width pattern_opt
.It Fl I
@@ -229,7 +229,7 @@ in the correct order.
.Nm
first processes interfaces from the
.Sy interface_order
-list, then interfaces without a metic and that match the
+list, then interfaces without a metric and that match the
.Sy dynamic_order
list, then interfaces with a metric in order and finally the rest in
the operating systems lexical order.
diff -r ae72a3ab8628 -r 421ee693f29e external/bsd/openresolv/dist/resolvconf.conf.5.in
--- a/external/bsd/openresolv/dist/resolvconf.conf.5.in Fri Apr 21 16:52:28 2023 +0000
+++ b/external/bsd/openresolv/dist/resolvconf.conf.5.in Tue Jun 27 17:04:19 2023 +0000
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2009-2020 Roy Marples
+.\" Copyright (c) 2009-2023 Roy Marples
.\" All rights reserved
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 1, 2020
+.Dd May 23, 2023
.Dt RESOLVCONF.CONF 5
.Os
.Sh NAME
@@ -134,7 +134,7 @@ search foo.org dead.beef
nameserver 1.2.3.4
nameserver 2.3.4.5
.Ed
-and this configuaration:
+and this configuration:
.Bd -compact -literal -offset indent
replace="search/foo*/bar.com"
replace="$replace nameserver/1.2.3.4/5.6.7.8"
@@ -210,6 +210,12 @@ Prepend name servers to the dynamically
Append search domains to the dynamically generated list.
.It Sy prepend_search
Prepend search domains to the dynamically generated list.
+.It Sy resolv_conf_mv
+Defaults to NO.
+Defines if
+.Pa /etc/resolv.conf
+is updated by writing to a temporary file and then moving it
+vs writing directly to it.
.El
.Sh SUBSCRIBER OPTIONS
openresolv ships with subscribers for the name servers
@@ -222,7 +228,7 @@ and
Each subscriber can create configuration files which should be included in
the subscribers main configuration file.
.Pp
-To disable a subscriber, simply set it's name to NO.
+To disable a subscriber, simply set its name to NO.
For example, to disable the libc subscriber you would set:
.Bd -compact -literal -offset indent
libc=NO
@@ -322,6 +328,9 @@ forward-zones-file=/etc/pdns/recursor-zo
This file tells unbound about specific and global name servers.
.It Sy unbound_insecure
When set to YES, unbound marks the domains as insecure, thus ignoring DNSSEC.
+.It Sy unbound_forward_zone_options
+Options appended to each forward zone.
+Each option should be separated by an embedded new line.
.Pp
Example resolvconf.conf for unbound:
.Bd -compact -literal -offset indent
@@ -385,4 +394,4 @@ Each distribution is a special snowflake
differently, namely the named service script.
.Pp
Please report them to
-.Lk http://roy.marples.name/projects/openresolv
+.Lk https://roy.marples.name/projects/openresolv
diff -r ae72a3ab8628 -r 421ee693f29e external/bsd/openresolv/dist/resolvconf.in
--- a/external/bsd/openresolv/dist/resolvconf.in Fri Apr 21 16:52:28 2023 +0000
+++ b/external/bsd/openresolv/dist/resolvconf.in Tue Jun 27 17:04:19 2023 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2007-2020 Roy Marples
+# Copyright (c) 2007-2023 Roy Marples
# All rights reserved
# Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
RESOLVCONF="$0"
-OPENRESOLV_VERSION="3.12.0"
+OPENRESOLV_VERSION="3.13.2"
Home |
Main Index |
Thread Index |
Old Index