diff options
author | Dave Brolley <brolley@redhat.com> | 2010-02-15 13:56:20 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2010-02-15 13:56:20 -0500 |
commit | 27dc09b13650456b7b3efd45c07690083e526b6d (patch) | |
tree | fee2a7ea25f8e8d5f51a0bb5012c07743b170476 /tapset-utrace.cxx | |
parent | 189559623dcda793b1ae9ade54299f5c7a775b76 (diff) | |
download | systemtap-steved-27dc09b13650456b7b3efd45c07690083e526b6d.tar.gz systemtap-steved-27dc09b13650456b7b3efd45c07690083e526b6d.tar.xz systemtap-steved-27dc09b13650456b7b3efd45c07690083e526b6d.zip |
Rework identification of probes allowed for unprivileged users.
- Bind unprivileged permission at probe registration time.
- Remove check_unprivileged filter from derived_probe_builder
and its children.
- Add test suites for unprivilegedok and unprivilegedko.
Diffstat (limited to 'tapset-utrace.cxx')
-rw-r--r-- | tapset-utrace.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tapset-utrace.cxx b/tapset-utrace.cxx index fc2fbc1d..73f52c4d 100644 --- a/tapset-utrace.cxx +++ b/tapset-utrace.cxx @@ -654,10 +654,6 @@ struct utrace_builder: public derived_probe_builder has_path, path, pid, flags)); } - - // No action required. These probes are allowed for unprivileged users. - virtual void check_unprivileged (const systemtap_session & sess, - const literal_map_t & parameters) {} }; @@ -1062,16 +1058,22 @@ register_tapset_utrace(systemtap_session& s) for (unsigned i = 0; i < roots.size(); ++i) { roots[i]->bind(TOK_BEGIN) + ->bind_unprivileged() ->bind(builder); roots[i]->bind(TOK_END) + ->bind_unprivileged() ->bind(builder); roots[i]->bind(TOK_THREAD)->bind(TOK_BEGIN) + ->bind_unprivileged() ->bind(builder); roots[i]->bind(TOK_THREAD)->bind(TOK_END) + ->bind_unprivileged() ->bind(builder); roots[i]->bind(TOK_SYSCALL) + ->bind_unprivileged() ->bind(builder); roots[i]->bind(TOK_SYSCALL)->bind(TOK_RETURN) + ->bind_unprivileged() ->bind(builder); } } |