diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-29 00:53:29 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-29 00:53:29 +0000 |
| commit | b7560d54ebf1b8908e4961c6667cb9c8ec1e00dc (patch) | |
| tree | d6a3598c4868fea1b8f0fea5c4057e480ac010dd /lib/puppet | |
| parent | 3aff4a0e9debfe22bd2a4b024b89410f481d09f7 (diff) | |
| download | puppet-b7560d54ebf1b8908e4961c6667cb9c8ec1e00dc.tar.gz puppet-b7560d54ebf1b8908e4961c6667cb9c8ec1e00dc.tar.xz puppet-b7560d54ebf1b8908e4961c6667cb9c8ec1e00dc.zip | |
A couple small bug-fixes
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2110 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/type/pfile.rb | 1 | ||||
| -rw-r--r-- | lib/puppet/type/resources.rb | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index 7035cf2dd..03453d3fc 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -232,6 +232,7 @@ module Puppet end def self.[](path) + return nil unless path super(path.gsub(/\/+/, '/').sub(/\/$/, '')) end diff --git a/lib/puppet/type/resources.rb b/lib/puppet/type/resources.rb index c1888092f..3f9681826 100644 --- a/lib/puppet/type/resources.rb +++ b/lib/puppet/type/resources.rb @@ -126,7 +126,7 @@ Puppet::Type.newtype(:resources) do resource[:check] = :uid resource.retrieve - if %w{root nobody bin noaccess daemon sys}.include?(resource[:name]) + if system_users().include?(resource[:name]) return false end @@ -136,6 +136,10 @@ Puppet::Type.newtype(:resources) do return true end end + + def system_users + %w{root nobody bin noaccess daemon sys} + end end # $Id$ |
