diff options
Diffstat (limited to 'tapset-utrace.cxx')
-rw-r--r-- | tapset-utrace.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tapset-utrace.cxx b/tapset-utrace.cxx index 819a2d87..a8500493 100644 --- a/tapset-utrace.cxx +++ b/tapset-utrace.cxx @@ -62,6 +62,7 @@ struct utrace_derived_probe: public derived_probe void join_group (systemtap_session& s); void emit_unprivileged_assertion (translator_output*); + void print_dupe_stamp(ostream& o); }; @@ -210,6 +211,20 @@ utrace_derived_probe::emit_unprivileged_assertion (translator_output* o) emit_process_owner_assertion (o); } +void +utrace_derived_probe::print_dupe_stamp(ostream& o) +{ + // Process end probes are allowed for unprivileged users, even if the process + // does not belong to them. They are required to check is_myproc() from within + // their probe script before doing anything "dangerous". + // Other process probes are allowed for unprivileged users, but only in the + // context of processes which they own. + if (flags == UDPF_END) + print_dupe_stamp_unprivileged (o); + else + print_dupe_stamp_unprivileged_process_owner (o); +} + void utrace_var_expanding_visitor::visit_target_symbol_cached (target_symbol* e) |