summaryrefslogtreecommitdiffstats
path: root/lib/puppet/provider
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-05-12 18:26:43 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit37a55306aa08e2004103e9a4a2a94bba18ffa61d (patch)
tree0e8fd85505a8bfa17b08611ce160211420339cfa /lib/puppet/provider
parentac7efc8f0284d6b35f5428da06ba371cf94998ec (diff)
downloadpuppet-37a55306aa08e2004103e9a4a2a94bba18ffa61d.tar.gz
puppet-37a55306aa08e2004103e9a4a2a94bba18ffa61d.tar.xz
puppet-37a55306aa08e2004103e9a4a2a94bba18ffa61d.zip
Feature #2935 Modes: root? predicate
Use a predicate method to check if we're running as root, rather than comparing the effective user id Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
Diffstat (limited to 'lib/puppet/provider')
-rw-r--r--lib/puppet/provider/nameservice/directoryservice.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/provider/nameservice/directoryservice.rb b/lib/puppet/provider/nameservice/directoryservice.rb
index 9a860b71e..2d4fc24c0 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) and Process.uid == 0
+ if @resource_type.validproperties.include?(:password) and Puppet.features.root?
attribute_hash[:password] = self.get_password(attribute_hash[:guid])
end
return attribute_hash