From cc2d3104360ce86a69ec3ea0e8ff08d5597e44fa Mon Sep 17 00:00:00 2001 From: Garrett Honeycutt Date: Mon, 20 Nov 2017 09:44:17 -0500 Subject: [PATCH] (GH-251) Fix regex for sshd_config_maxstartups --- README.md | 6 ++++-- manifests/init.pp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0f6589fa..9d8fc049 100644 --- a/README.md +++ b/README.md @@ -557,9 +557,11 @@ Array of users for the AllowUsers setting in sshd_config. - *Default*: undef -sshd_config_maxstartups +sshd_config_maxstartups (string) ----------------------- -Specifies the maximum number of concurrent unauthenticated connections to the SSH daemon. +Specifies the maximum number of concurrent unauthenticated connections +to the SSH daemon. Must be a stringified integer or a string with three +integers separated by colons, such as '10:30:100'. - *Default*: undef diff --git a/manifests/init.pp b/manifests/init.pp index eb1deeb8..a9cd4c89 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -632,7 +632,7 @@ } if $sshd_config_maxstartups != undef { - validate_re($sshd_config_maxstartups,'^(\d+)+(\d+?:\d+?:\d+)?$', + validate_re($sshd_config_maxstartups,'^((\d+)|(\d+?:\d+?:\d+)?)$', "ssh::sshd_config_maxstartups may be either an integer or three integers separated with colons, such as 10:30:100. Detected value is <${sshd_config_maxstartups}>.") }