[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

Luke Kanies luke at puppetlabs.com
Wed Jul 14 10:32:29 UTC 2010


The following commit has been merged in the upstream branch:
commit 9ee4c2dc06aee189994e3e06910e52bced4c6854
Author: Luke Kanies <luke at puppetlabs.com>
Date:   Mon Apr 12 15:10:01 2010 -0700

    Only trying to retrieve passwords on OS X when root
    
    We were otherwise failing whenever we tried to read
    a user.
    
    Signed-off-by: Luke Kanies <luke at puppetlabs.com>

diff --git a/lib/puppet/provider/nameservice/directoryservice.rb b/lib/puppet/provider/nameservice/directoryservice.rb
index 50c87fe..9a860b7 100644
--- a/lib/puppet/provider/nameservice/directoryservice.rb
+++ b/lib/puppet/provider/nameservice/directoryservice.rb
@@ -215,7 +215,7 @@ class DirectoryService < Puppet::Provider::NameService
         # stored in the user record. It is stored at a path that involves the
         # UUID of the user record for non-Mobile local acccounts.
         # Mobile Accounts are out of scope for this provider for now
-        if @resource_type.validproperties.include?(:password)
+        if @resource_type.validproperties.include?(:password) and Process.uid == 0 
             attribute_hash[:password] = self.get_password(attribute_hash[:guid])
         end
         return attribute_hash
@@ -324,7 +324,7 @@ class DirectoryService < Puppet::Provider::NameService
         password_hash_file = "#{@@password_hash_dir}/#{guid}"
         if File.exists?(password_hash_file) and File.file?(password_hash_file)
             if not File.readable?(password_hash_file)
-                fail("Could not read password hash file at #{password_hash_file} for #{@resource[:name]}")
+                fail("Could not read password hash file at #{password_hash_file}")
             end
             f = File.new(password_hash_file)
             password_hash = f.read

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list