voxpupuli / puppet-autofs

Puppet Module for autofs https://forge.puppet.com/puppet/autofs
Apache License 2.0
7 stars 32 forks source link

Quote and escape special chars in mapping fs #206

Closed smortex closed 11 months ago

smortex commented 11 months ago

Multiple filesystems can be provided for a mapping by separating them with spaces. Some implementations of autofs do support spaces in path if proper quoting is in place.

When managing a filesystems with spaces in its path, the end-user of the module was responsible for the correct quoting because the module interface only accept a single string for the "raw" value.

Change the data type of the parameter to accept either a String (single filesystem) or an Array[String] (multiple filesystems) and transfer the responsibility of escaping to the module.

This is a breaking change that may affect some users:

  1. Users of mapping with multiple filesystems will need to split their fs parameter to provide an array of filesystems;
  2. Users of mappings with quoted special chars will have to remove the quoting to avoid double-quoting.