The comment field in an sshd_config_match
block is auto-generated and may end up containing regex meta-characters in the resource name field, which fail to match correctly and cause repeated "corrective" updates.
This patch ensures that the resource name is escaped before it's passed into the RE that matches for ^#{resource[:name]}:\s*/i
.
This code previously used an explicitly defined list of labels that were
treated as arrays and not simple values. This broke the sshd_config
provider for users with a version of the sshd lens from augeas 1.9.0 or
newer. To avoid breaking support for older users, and to be
forward-compatible with new versions of augeas that are aware of
additional array values, this change determines if a label is an array
or simple value by testing what the underlying augeas provider returns
Addresses #64
modulesync 5.1.0