diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-06-25 15:38:03 -0700 |
|---|---|---|
| committer | Jesse Wolfe <jes5199@gmail.com> | 2010-06-25 18:14:58 -0700 |
| commit | e817ad1d1ac26c5299f373ec5d7e997f644baec7 (patch) | |
| tree | 16ce6ad2c4d5c0edcbaff510464d28bfd3cb1582 /lib/puppet | |
| parent | e5478d4ff0510e637ecec69f8b2fc7ef844ba5c0 (diff) | |
Fix tests broken by level-violation fix
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/provider/user/useradd.rb | 9 |
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 |
