[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.6-1-356-g5718585

James Turnbull james at lovedthanlost.net
Fri Jan 23 14:21:36 UTC 2009


The following commit has been merged in the master branch:
commit 6d7b5ef81d671ad27b4bbcfb5e0065f76209ee7d
Author: Martin Englund <martin at englund.nu>
Date:   Wed Nov 5 11:35:09 2008 +0100

    Fixes #1672 - unsafe crontab handling in Solaris
    Signed-off-by: Martin Englund <martin at englund.nu>

diff --git a/lib/puppet/util/filetype.rb b/lib/puppet/util/filetype.rb
index 7e799b6..60cbc77 100755
--- a/lib/puppet/util/filetype.rb
+++ b/lib/puppet/util/filetype.rb
@@ -213,10 +213,10 @@ class Puppet::Util::FileType
             begin
                 output = Puppet::Util.execute(%w{crontab -l}, :uid => @path)
                 return "" if output.include?("can't open your crontab")
+                raise Puppet::Error, "User %s not authorized to use cron" % @path if output.include?("you are not authorized to use cron")
                 return output
-            rescue
-                # If there's a failure, treat it like an empty file.
-                return ""
+            rescue => detail
+                raise Puppet::Error, "Could not read crontab for %s: %s" % [@path, detail] 
             end
         end
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list