[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5
Jesse Wolfe
jes5199 at gmail.com
Tue May 10 07:59:58 UTC 2011
The following commit has been merged in the experimental branch:
commit 5c2457952660e3e531e085757fd85c382676a96e
Author: Jesse Wolfe <jes5199 at gmail.com>
Date: Thu Nov 4 17:32:11 2010 -0700
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.
diff --git a/lib/puppet/util/monkey_patches.rb b/lib/puppet/util/monkey_patches.rb
index 6b5af83..bdce5ec 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
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list