[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.7-1-98-gf19c0e5
James Turnbull
james at lovedthanlost.net
Wed Apr 8 21:48:03 UTC 2009
The following commit has been merged in the master branch:
commit db05c00af042cce1f09640071706efbc82742a01
Author: Luke Kanies <luke at madstop.com>
Date: Tue Feb 10 14:25:22 2009 -0600
Fixing #1920 - user passwords no longer allow ':'
I wanted to include a snide remark in the error, but...
Now you just get an exception when creating the user if
the password includes this character.
Signed-off-by: Luke Kanies <luke at madstop.com>
diff --git a/CHANGELOG b/CHANGELOG
index 55915c2..438d97e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,8 +1,16 @@
-0.25.x
+0.24.8
+ Added README.rst file
+
+ Enhancements to Stored Configuration performance
+
+ Added Reductive Labs build library to tasks directory
+
Fixed #1852 - Correct behaviour when no SELinux bindings
Updated Red Hat spec file 0.24.7
+ Fixed #1920 - Shadow password corruption
+
0.24.7
Fixed #1804 - Added VDev and MultiVDev properties to the ZPool type
diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb
index 9e32c89..e6b16a9 100755
--- a/lib/puppet/type/user.rb
+++ b/lib/puppet/type/user.rb
@@ -142,6 +142,10 @@ module Puppet
newproperty(:password, :required_features => :manages_passwords) do
desc "The user's password, in whatever encrypted format the local machine requires. Be sure to enclose any value that includes a dollar sign ($) in single quotes (\')."
+ validate do |value|
+ raise ArgumentError, "Passwords cannot include ':'" if value.include?(":")
+ end
+
def change_to_s(currentvalue, newvalue)
if currentvalue == :absent
return "created password"
diff --git a/spec/unit/type/user.rb b/spec/unit/type/user.rb
index de04371..0b1f5f9 100755
--- a/spec/unit/type/user.rb
+++ b/spec/unit/type/user.rb
@@ -40,6 +40,10 @@ describe user do
it "should have a valid provider" do
user.create(:name => "foo").provider.class.ancestors.should be_include(Puppet::Provider)
end
+
+ it "should fail if a ':' is included in the password" do
+ lambda { user.create(:name => "foo", :password => 'some:thing') }.should raise_error(Puppet::Error)
+ end
end
properties = [:ensure, :uid, :gid, :home, :comment, :shell, :password, :groups, :roles, :auths, :profiles, :project, :keys]
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list