[icinga-checkins] icinga.org: icinga2/master: 'Sandboxed' property isn' t properly propagated to child frames

git at icinga.org git at icinga.org
Fri Jul 29 14:12:20 CEST 2016


Module: icinga2
Branch: master
Commit: 546bdbcf6acaffc3ab8d94274f291393d621b596
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=546bdbcf6acaffc3ab8d94274f291393d621b596

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Fri Jul 29 14:11:52 2016 +0200

'Sandboxed' property isn't properly propagated to child frames

refs #12247

---

 lib/base/scriptframe.cpp |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/base/scriptframe.cpp b/lib/base/scriptframe.cpp
index c9aec38..3526c08 100644
--- a/lib/base/scriptframe.cpp
+++ b/lib/base/scriptframe.cpp
@@ -28,6 +28,11 @@ boost::thread_specific_ptr<std::stack<ScriptFrame *> > ScriptFrame::m_ScriptFram
 ScriptFrame::ScriptFrame(void)
 	: Locals(new Dictionary()), Self(ScriptGlobal::GetGlobals()), Sandboxed(false), Depth(0)
 {
+	std::stack<ScriptFrame *> *frames = m_ScriptFrames.get();
+
+	if (frames && !frames->empty())
+		Sandboxed = frames->top()->Sandboxed;
+
 	PushFrame(this);
 }
 



More information about the icinga-checkins mailing list