summaryrefslogtreecommitdiffstats
path: root/tapset-been.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2010-02-15 13:56:20 -0500
committerDave Brolley <brolley@redhat.com>2010-02-15 13:56:20 -0500
commit27dc09b13650456b7b3efd45c07690083e526b6d (patch)
treefee2a7ea25f8e8d5f51a0bb5012c07743b170476 /tapset-been.cxx
parent189559623dcda793b1ae9ade54299f5c7a775b76 (diff)
downloadsystemtap-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-been.cxx')
-rw-r--r--tapset-been.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/tapset-been.cxx b/tapset-been.cxx
index d7d74c33..ac97ebca 100644
--- a/tapset-been.cxx
+++ b/tapset-been.cxx
@@ -1,5 +1,5 @@
// tapset for begin/end/error/never
-// Copyright (C) 2005-2009 Red Hat Inc.
+// Copyright (C) 2005-2010 Red Hat Inc.
// Copyright (C) 2005-2007 Intel Corporation.
// Copyright (C) 2008 James.Bottomley@HansenPartnership.com
//
@@ -92,10 +92,6 @@ struct be_builder: public derived_probe_builder
finished_results.push_back
(new be_derived_probe(base, location, type, priority));
}
-
- // No action required. These probes are allowed for unprivileged users.
- virtual void check_unprivileged (const systemtap_session & sess,
- const literal_map_t & parameters) {}
};
@@ -214,10 +210,6 @@ struct never_builder: public derived_probe_builder
{
finished_results.push_back(new never_derived_probe(base, location));
}
-
- // No action required. This probe is allowed for unprivileged users.
- virtual void check_unprivileged (const systemtap_session & sess,
- const literal_map_t & parameters) {}
};
@@ -232,21 +224,28 @@ register_tapset_been(systemtap_session& s)
match_node* root = s.pattern_root;
root->bind(TOK_BEGIN)
+ ->bind_unprivileged()
->bind(new be_builder(BEGIN));
root->bind_num(TOK_BEGIN)
+ ->bind_unprivileged()
->bind(new be_builder(BEGIN));
root->bind(TOK_END)
+ ->bind_unprivileged()
->bind(new be_builder(END));
root->bind_num(TOK_END)
+ ->bind_unprivileged()
->bind(new be_builder(END));
root->bind(TOK_ERROR)
+ ->bind_unprivileged()
->bind(new be_builder(ERROR));
root->bind_num(TOK_ERROR)
+ ->bind_unprivileged()
->bind(new be_builder(ERROR));
root->bind(TOK_NEVER)
+ ->bind_unprivileged()
->bind(new never_builder());
}