]> sourceware.org Git - systemtap.git/blob - privilege.h
Only run .plt tests on x86.
[systemtap.git] / privilege.h
1 #ifndef PRIVILEGE_H
2 #define PRIVILEGE_H
3
4 typedef enum privilege_t {
5 // NOTE:
6 // - Values must be a power of 2 between 0x1 and 0x80000000 inclusive, since they will be used
7 // to form a bit set.
8 // - These values cannot change in the future because they will be encoded into the generated
9 // modules in order to identify their required privilege level now and in the future.
10 pr_none = 0x00000000, // No privileges
11 pr_unknown = 0x00000001, // Unknown privileges
12 pr_stapusr = 0x00000002, // Member of stapusr
13 pr_stapsys = 0x00000004, // Member of stapsys
14 pr_stapdev = 0x00000008, // Member of stapdev
15
16 // These are used for iterating
17 pr_begin = pr_stapusr,
18 pr_end = pr_unknown,
19
20 // Predefined sets
21 pr_highest = pr_stapdev,
22 pr_highest_signed = pr_stapsys,
23 pr_all = pr_stapusr | pr_stapsys | pr_stapdev
24 } privilege_t;
25
26 // Name of the section in the module used to store privilege information.
27 #define STAP_PRIVILEGE_SECTION ".stap_privilege"
28
29 // Privilege management.
30 #if defined(c_plusplus) || defined(__cplusplus)
31 extern "C" {
32 #endif
33 privilege_t pr_next (privilege_t p);
34 const char *pr_name (privilege_t p);
35 int pr_contains (privilege_t actual, privilege_t required);
36 privilege_t get_privilege_credentials (void);
37 #if defined(c_plusplus) || defined(__cplusplus)
38 }
39 #endif
40
41 #endif // PRIVILEGE_H
This page took 0.035096 seconds and 5 git commands to generate.