From c50a48edb19e80d48019b19d852665411d6222e7 Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Sat, 29 Jan 2011 04:03:21 +1100 Subject: Fixed #6061 - Allowed -1 as password min/max age This allows setting disabling password aging on Linux and Solaris Signed-off-by: James Turnbull --- lib/puppet/type/user.rb | 4 ++-- 1 file 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 -- cgit