summaryrefslogtreecommitdiffstats
path: root/tapsets.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 /tapsets.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 'tapsets.cxx')
-rw-r--r--tapsets.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 3017e203..0a07e7a8 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -2662,6 +2662,9 @@ 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);