From 776ea2a17de7834ecdaded9fcaabc48446d2f29d Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Thu, 28 Oct 2010 20:10:59 +1100 Subject: Fixed #5137 - Removed no longer required TOC references --- lib/puppet/util/reference.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/puppet/util') diff --git a/lib/puppet/util/reference.rb b/lib/puppet/util/reference.rb index 99458aa57..ab201cde4 100644 --- a/lib/puppet/util/reference.rb +++ b/lib/puppet/util/reference.rb @@ -32,7 +32,6 @@ class Puppet::Util::Reference section = reference(name) or raise "Could not find section #{name}" depth = section.depth if section.depth < depth end - text = "* TOC text.\n{:toc}\n\n" end def self.pdf(text) @@ -141,7 +140,6 @@ class Puppet::Util::Reference # First the header text = h(@title, 1) text += "\n\n**This page is autogenerated; any changes will get overwritten** *(last generated on #{Time.now.to_s})*\n\n" - text += "* TOC Text.\n{:toc}\n\n" if withcontents text += @header -- cgit From 5c2457952660e3e531e085757fd85c382676a96e Mon Sep 17 00:00:00 2001 From: Jesse Wolfe Date: Thu, 4 Nov 2010 17:32:11 -0700 Subject: maint: prevent fork bombs by disabling ActiveSupport's Kernel.daemonize ActiveSupport provides a "daemonize" method on all objects that causes the ruby process to fork to the background. This is extremely surprising and dangerous, and some of our spec tests could trigger this accidentally. This patch adds a "daemonize" method to Object which shadows the ActiveSupport version, preventing it from ever being called. --- lib/puppet/util/monkey_patches.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/puppet/util') diff --git a/lib/puppet/util/monkey_patches.rb b/lib/puppet/util/monkey_patches.rb index 6b5af8350..bdce5ec1d 100644 --- a/lib/puppet/util/monkey_patches.rb +++ b/lib/puppet/util/monkey_patches.rb @@ -48,3 +48,11 @@ if RUBY_VERSION == '1.8.7' end end +class Object + # ActiveSupport 2.3.x mixes in a dangerous method + # that can cause rspec to fork bomb + # and other strange things like that. + def daemonize + raise NotImplementedError, "Kernel.daemonize is too dangerous, please don't try to use it." + end +end -- cgit