summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-06-25 15:38:03 -0700
committerJesse Wolfe <jes5199@gmail.com>2010-06-25 18:14:58 -0700
commite817ad1d1ac26c5299f373ec5d7e997f644baec7 (patch)
tree16ce6ad2c4d5c0edcbaff510464d28bfd3cb1582 /lib/puppet
parente5478d4ff0510e637ecec69f8b2fc7ef844ba5c0 (diff)
Fix tests broken by level-violation fix
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/provider/user/useradd.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/puppet/provider/user/useradd.rb b/lib/puppet/provider/user/useradd.rb
index 15b3b1379..fc5eabcbc 100644
--- a/lib/puppet/provider/user/useradd.rb
+++ b/lib/puppet/provider/user/useradd.rb
@@ -60,11 +60,12 @@ Puppet::Type.type(:user).provide :useradd, :parent => Puppet::Provider::NameServ
# Retrieve the password using the Shadow Password library
def password
- if ent = Shadow::Passwd.getspnam(@resource.name)
- return ent.sp_pwdp
- else
- return :absent
+ if Puppet.features.libshadow?
+ if ent = Shadow::Passwd.getspnam(@resource.name)
+ return ent.sp_pwdp
+ end
end
+ return :absent
end
end