summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-09-03 16:13:30 -0400
committerDave Brolley <brolley@redhat.com>2009-09-03 16:13:30 -0400
commit5e8a3b7b558273fa06525f642fdf2d678dde85eb (patch)
tree9c38b52b46692ac7e906deb33f2a81d062704a6f /tapsets.cxx
parentceca17997ef0a5310cf887d451651acec73b41da (diff)
downloadsystemtap-steved-5e8a3b7b558273fa06525f642fdf2d678dde85eb.tar.gz
systemtap-steved-5e8a3b7b558273fa06525f642fdf2d678dde85eb.tar.xz
systemtap-steved-5e8a3b7b558273fa06525f642fdf2d678dde85eb.zip
Allow process begin/end probes for unprivileged users.
2009-09-03 Dave Brolley <brolley@redhat.com> * tapsets.cxx (visit_cast_op): Don't disallow unprivileged users. Annotate synthesized function with /* unprivileged */. * tapset-utrace.cxx (register_tapset_utrace): Call allow_unprivileged for process begin and end probes. * translate.cxx (translate_pass): Generate '#define STP_PRIVILEGED 1' unless --unprivileged was specified. * runtime/transport/transport.c: Don't define _stp_unprivileged_user. * runtime/task_finder.c (__stp_utrace_attach_match_filename): Check that _stp_uid equals the task euid when STP_PRIVILEGED is not defined. (stap_start_task_finder): Likewise. * runtime/staprun/staprun.c (insert_stap_module): Don't generate module option _stp_unprivileged_user.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index fccb73c8..6a52050c 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -2510,9 +2510,6 @@ void dwarf_cast_expanding_visitor::filter_special_modules(string& module)
void dwarf_cast_expanding_visitor::visit_cast_op (cast_op* e)
{
- if (s.unprivileged)
- throw semantic_error("typecasting may not be used when --unprivileged is specified", e->tok);
-
bool lvalue = is_active_lvalue(e);
if (lvalue && !s.guru_mode)
throw semantic_error("write to typecast value not permitted", e->tok);
@@ -2618,6 +2615,8 @@ void dwarf_cast_expanding_visitor::visit_cast_op (cast_op* e)
else
ec->code += "/* pure */";
+ ec->code += "/* unprivileged */";
+
s.functions[fdecl->name] = fdecl;
// Synthesize a functioncall.