forked from ungleich-public/cdist
Merge branch 'fix/type/__sshd_config/error-on-invalid' into 'master'
sshd config: Produce error if invalid config is generated, fix processing of AuthenticationMethods and AuthorizedKeysFile, document explorer bug See merge request ungleich-public/cdist!968
This commit is contained in:
commit
878a65a8b7
3 changed files with 7 additions and 2 deletions
|
@ -89,7 +89,7 @@ function strdelim(s) { return strdelim_internal(s, 1) }
|
|||
function strdelimw(s) { return strdelim_internal(s, 0) }
|
||||
|
||||
function singleton_option(opt) {
|
||||
return tolower(opt) !~ /^(acceptenv|allowgroups|allowusers|authenticationmethods|authorizedkeysfile|denygroups|denyusers|hostcertificate|hostkey|listenaddress|logverbose|permitlisten|permitopen|port|setenv|subsystem)$/
|
||||
return tolower(opt) !~ /^(acceptenv|allowgroups|allowusers|denygroups|denyusers|hostcertificate|hostkey|listenaddress|logverbose|permitlisten|permitopen|port|setenv|subsystem)$/
|
||||
}
|
||||
|
||||
function print_update() {
|
||||
|
|
|
@ -91,7 +91,8 @@ awk $(drop_awk_comments "${__type:?}/files/update_sshd_config.awk") \\
|
|||
|
||||
cmp -s $(quote "${sshd_config_file}") $(quote "${sshd_config_file}.tmp") || {
|
||||
sshd -t -f $(quote "${sshd_config_file}.tmp") \\
|
||||
&& cat $(quote "${sshd_config_file}.tmp") >$(quote "${sshd_config_file}")
|
||||
&& cat $(quote "${sshd_config_file}.tmp") >$(quote "${sshd_config_file}") \\
|
||||
|| exit # stop if sshd_config file check fails
|
||||
}
|
||||
rm -f $(quote "${sshd_config_file}.tmp")
|
||||
EOF
|
||||
|
|
|
@ -79,6 +79,10 @@ BUGS
|
|||
- ``Include`` directives are ignored.
|
||||
- Config options are not added/removed to/from the config file if their value is
|
||||
the default value.
|
||||
- | The explorer will incorrectly report ``absent`` if OpenSSH internally
|
||||
transforms one value to another (e.g. ``permitrootlogin prohibit-password``
|
||||
is transformed to ``permitrootlogin without-password``).
|
||||
| Workaround: Use the value that OpenSSH uses internally.
|
||||
|
||||
|
||||
AUTHORS
|
||||
|
|
Loading…
Reference in a new issue