diff options
author | Dave Brolley <brolley@redhat.com> | 2009-06-25 11:50:47 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-06-25 11:50:47 -0400 |
commit | 313db8e6d1e62f372d168b7368f220cb432d07d6 (patch) | |
tree | 54fdfdbc16b25dfab4e7b3b025971e4adf420e7d /tapsets.cxx | |
parent | f75b6811dee35832309e55a9e3455c40d4c13437 (diff) | |
download | systemtap-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.cxx | 3 |
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); |