summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2011-01-29 04:03:21 +1100
committerDaniel Pittman <daniel@rimspace.net>2011-01-28 14:54:24 -0800
commitc50a48edb19e80d48019b19d852665411d6222e7 (patch)
treee0c704bca7846496c94a457fff8d71982286d43b
parentbf44e72b19187dbb4bc696ba8e1b3bc872c32d46 (diff)
downloadpuppet-c50a48edb19e80d48019b19d852665411d6222e7.tar.gz
puppet-c50a48edb19e80d48019b19d852665411d6222e7.tar.xz
puppet-c50a48edb19e80d48019b19d852665411d6222e7.zip
Fixed #6061 - Allowed -1 as password min/max age
This allows setting disabling password aging on Linux and Solaris Signed-off-by: James Turnbull <james@lovedthanlost.net>
-rwxr-xr-xlib/puppet/type/user.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb
index 5de73e3dd..e7389a0d1 100755
--- a/lib/puppet/type/user.rb
+++ b/lib/puppet/type/user.rb
@@ -175,7 +175,7 @@ module Puppet
end
validate do |value|
- if value.to_s !~ /^\d+$/
+ if value.to_s !~ /^-?\d+$/
raise ArgumentError, "Password minimum age must be provided as a number"
end
end
@@ -194,7 +194,7 @@ module Puppet
end
validate do |value|
- if value.to_s !~ /^\d+$/
+ if value.to_s !~ /^-?\d+$/
raise ArgumentError, "Password maximum age must be provided as a number"
end
end