summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-06-25 11:50:47 -0400
committerDave Brolley <brolley@redhat.com>2009-06-25 11:50:47 -0400
commit313db8e6d1e62f372d168b7368f220cb432d07d6 (patch)
tree54fdfdbc16b25dfab4e7b3b025971e4adf420e7d /translate.cxx
parentf75b6811dee35832309e55a9e3455c40d4c13437 (diff)
downloadsystemtap-steved-313db8e6d1e62f372d168b7368f220cb432d07d6.tar.gz
systemtap-steved-313db8e6d1e62f372d168b7368f220cb432d07d6.tar.xz
systemtap-steved-313db8e6d1e62f372d168b7368f220cb432d07d6.zip
Disallow embedded C in tapset functions ifor unprivileged users unless tagged by /* unprivileged */.
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/translate.cxx b/translate.cxx
index 5336dc66..172c1287 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -57,7 +57,8 @@ struct c_unparser: public unparser, public visitor
c_unparser (systemtap_session* ss):
session (ss), o (ss->op), current_probe(0), current_function (0),
- tmpvar_counter (0), label_counter (0) {}
+ tmpvar_counter (0), label_counter (0),
+ vcv_needs_global_locks (*ss) {}
~c_unparser () {}
void emit_map_type_instantiations ();
@@ -1600,7 +1601,7 @@ c_unparser::emit_probe (derived_probe* v)
v->emit_probe_local_init(o);
// emit all read/write locks for global variables
- varuse_collecting_visitor vut;
+ varuse_collecting_visitor vut(*session);
if (v->needs_global_locks ())
{
v->body->visit (& vut);