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 _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"