summaryrefslogtreecommitdiffstats
path: root/tapset-itrace.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tapset-itrace.cxx')
-rw-r--r--tapset-itrace.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/tapset-itrace.cxx b/tapset-itrace.cxx
index 9fc59d42..512a70b0 100644
--- a/tapset-itrace.cxx
+++ b/tapset-itrace.cxx
@@ -44,6 +44,8 @@ struct itrace_derived_probe: public derived_probe
bool hp, string &pn, int64_t pd, int ss
);
void join_group (systemtap_session& s);
+
+ void emit_unprivileged_assertion (translator_output*);
};
@@ -79,6 +81,15 @@ itrace_derived_probe::itrace_derived_probe (systemtap_session &s,
void
+itrace_derived_probe::emit_unprivileged_assertion (translator_output* o)
+{
+ // These probes are allowed for unprivileged users, but only in the
+ // context of processes which they own.
+ emit_process_owner_assertion (o);
+}
+
+
+void
itrace_derived_probe::join_group (systemtap_session& s)
{
if (! s.itrace_derived_probes)
@@ -121,6 +132,10 @@ struct itrace_builder: public derived_probe_builder
single_step
));
}
+
+ // No action required. These probes are allowed for unprivileged users.
+ virtual void check_unprivileged (const systemtap_session & sess,
+ const literal_map_t & parameters) {}
};
@@ -300,16 +315,12 @@ register_tapset_itrace(systemtap_session& s)
derived_probe_builder *builder = new itrace_builder();
root->bind_str(TOK_PROCESS)->bind(TOK_INSN)
- ->allow_unprivileged()
->bind(builder);
root->bind_num(TOK_PROCESS)->bind(TOK_INSN)
- ->allow_unprivileged()
->bind(builder);
root->bind_str(TOK_PROCESS)->bind(TOK_INSN)->bind(TOK_BLOCK)
- ->allow_unprivileged()
->bind(builder);
root->bind_num(TOK_PROCESS)->bind(TOK_INSN)->bind(TOK_BLOCK)
- ->allow_unprivileged()
->bind(builder);
}