From owner-svn-src-all@freebsd.org Sun Feb 28 20:13:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BE35AB6947; Sun, 28 Feb 2016 20:13:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4551C13DC; Sun, 28 Feb 2016 20:13:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1SKDQ8E051624; Sun, 28 Feb 2016 20:13:26 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1SKDQTp051621; Sun, 28 Feb 2016 20:13:26 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201602282013.u1SKDQTp051621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 28 Feb 2016 20:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r296164 - vendor/openresolv/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2016 20:13:27 -0000 Author: pfg Date: Sun Feb 28 20:13:25 2016 New Revision: 296164 URL: https://svnweb.freebsd.org/changeset/base/296164 Log: Import openresolv 3.7.3 Obtained from: http://roy.marples.name/projects/openresolv Modified: vendor/openresolv/dist/Makefile vendor/openresolv/dist/resolvconf.conf.5.in vendor/openresolv/dist/resolvconf.in Modified: vendor/openresolv/dist/Makefile ============================================================================== --- vendor/openresolv/dist/Makefile Sun Feb 28 19:39:00 2016 (r296163) +++ vendor/openresolv/dist/Makefile Sun Feb 28 20:13:25 2016 (r296164) @@ -1,5 +1,5 @@ PKG= openresolv -VERSION= 3.7.1 +VERSION= 3.7.3 # Nasty hack so that make clean works without configure being run _CONFIG_MK!= test -e config.mk && echo config.mk || echo config-null.mk Modified: vendor/openresolv/dist/resolvconf.conf.5.in ============================================================================== --- vendor/openresolv/dist/resolvconf.conf.5.in Sun Feb 28 19:39:00 2016 (r296163) +++ vendor/openresolv/dist/resolvconf.conf.5.in Sun Feb 28 20:13:25 2016 (r296164) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009-2015 Roy Marples +.\" Copyright (c) 2009-2016 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 May 14, 2015 +.Dd February 21, 2016 .Dt RESOLVCONF.CONF 5 .Os .Sh NAME @@ -42,8 +42,11 @@ must contain valid shell commands. Listed below are the standard .Nm variables that may be set. -If the values contain white space for special shell characters, +If the values contain whitespace, wildcards or other special shell characters, ensure they are quoted and escaped correctly. +See the +.Sy replace +variable for an example on quoting. .Pp After updating this file, you may wish to run .Nm resolvconf -u Modified: vendor/openresolv/dist/resolvconf.in ============================================================================== --- vendor/openresolv/dist/resolvconf.in Sun Feb 28 19:39:00 2016 (r296163) +++ vendor/openresolv/dist/resolvconf.in Sun Feb 28 20:13:25 2016 (r296164) @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2015 Roy Marples +# Copyright (c) 2007-2016 Roy Marples # All rights reserved # Redistribution and use in source and binary forms, with or without @@ -55,6 +55,7 @@ METRICDIR="$VARDIR/metrics" PRIVATEDIR="$VARDIR/private" EXCLUSIVEDIR="$VARDIR/exclusive" LOCKDIR="$VARDIR/lock" +_PWD="$PWD" warn() { @@ -119,6 +120,21 @@ echo_resolv() IFS="$OIFS" } +# Strip any trailing dot from each name as a FQDN does not belong +# in resolv.conf(5) +# If you think otherwise, capture a DNS trace and you'll see libc +# will strip it regardless. +# This also solves setting up duplicate zones in our subscribers. +strip_trailing_dots() +{ + local n= + + for n; do + printf "%s" "${n%.}" + done + printf "\n" +} + # Parse resolv.conf's and make variables # for domain name servers, search name servers and global nameservers parse_resolv() @@ -162,14 +178,14 @@ parse_resolv() $islocal || ns="$ns${line#* } " ;; "domain "*) + search="$(strip_trailing_dots ${line#* })" if [ -z "$domain" ]; then - domain="${line#* }" + domain="$search" echo "DOMAIN=\"$domain\"" fi - search="${line#* }" ;; "search "*) - search="${line#* }" + search="$(strip_trailing_dots ${line#* })" ;; *) [ -n "$line" ] && continue @@ -752,6 +768,10 @@ eval "$(make_vars)" export RESOLVCONF DOMAINS SEARCH NAMESERVERS LOCALNAMESERVERS : ${list_resolv:=list_resolv -l} retval=0 + +# Run scripts in the same directory resolvconf is run from +# in case any scripts accidently dump files in the wrong place. +cd "$_PWD" for script in "$LIBEXECDIR"/*; do if [ -f "$script" ]; then eval script_enabled="\$${script##*/}"