From owner-svn-src-head@freebsd.org Mon Mar 14 17:45:40 2016 Return-Path: Delivered-To: svn-src-head@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 C099FACF8EC; Mon, 14 Mar 2016 17:45:40 +0000 (UTC) (envelope-from trasz@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 8C44E175; Mon, 14 Mar 2016 17:45:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2EHjdbK069620; Mon, 14 Mar 2016 17:45:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2EHjd2B069619; Mon, 14 Mar 2016 17:45:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201603141745.u2EHjd2B069619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 14 Mar 2016 17:45:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296866 - head/etc/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2016 17:45:40 -0000 Author: trasz Date: Mon Mar 14 17:45:39 2016 New Revision: 296866 URL: https://svnweb.freebsd.org/changeset/base/296866 Log: Fix autofs handling of filesystem labels containing plus signs and slashes. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/etc/autofs/special_media Modified: head/etc/autofs/special_media ============================================================================== --- head/etc/autofs/special_media Mon Mar 14 17:41:17 2016 (r296865) +++ head/etc/autofs/special_media Mon Mar 14 17:45:39 2016 (r296866) @@ -19,6 +19,9 @@ print_available() { _fstype="${_fstype_and_label%% *}" if [ "${_fstype}" != "${_fstype_and_label}" ]; then _label="${_fstype_and_label#* }" + # Replace plus signs and slashes with minuses; + # leading plus signs have special meaning in maps, + _label="$(echo ${_label} | sed 's,[+/],-,g')" echo "${_label}" continue fi @@ -54,6 +57,10 @@ print_one() { fi _label="${_fstype_and_label#* }" + # Replace plus signs and slashes with minuses; + # leading plus signs have special meaning in maps, + # and multi-component keys are just not supported. + _label="$(echo ${_label} | sed 's,[+/],-,g')" if [ "${_label}" != "${_key}" ]; then # Labels don't match, try another device. continue