]> git.saurik.com Git - apple/securityd.git/blob - src/securityd.d
securityd-40120.tar.gz
[apple/securityd.git] / src / securityd.d
1 /*
2 * DTrace provider for securityd
3 */
4
5
6 /*
7 * Work around 5194316
8 */
9 #define uint32_t unsigned
10
11
12 /*
13 * Types
14 */
15 typedef const void *DTHandle;
16 typedef uint32_t DTPort;
17 typedef uint32_t DTGuest;
18
19
20 /*
21 * The main static provider for securityd
22 */
23 provider securityd {
24 /*
25 * Overall operational events
26 */
27 probe installmode(); // configuring for system installation scenario
28 probe initialized(const char *bootstrapName);
29
30
31 /*
32 * Keychain activity (DbCommon status change)
33 */
34 probe keychain__create(DTHandle common, const char *name, DTHandle db);
35 probe keychain__make(DTHandle common, const char *name, DTHandle db);
36 probe keychain__join(DTHandle common, const char *name, DTHandle db);
37 probe keychain__unlock(DTHandle id, const char *name);
38 probe keychain__lock(DTHandle id, const char *name);
39 probe keychain__release(DTHandle id, const char *name);
40
41 /*
42 * Client management
43 */
44 probe client__new(DTHandle id, int pid, DTHandle session, const char *path, DTPort taskport, int uid, int gid, bool flipped);
45 probe client__release(DTHandle id, int pid);
46 probe client__connection__new(DTHandle id, DTPort port, DTHandle client);
47 probe client__connection__release(DTHandle id);
48
49 probe client__change_session(DTHandle id, DTHandle session);
50
51 probe request__entry(const char *name, DTHandle connection, DTHandle process);
52 probe request__return(uint32_t osstatus);
53
54 /*
55 * Session management
56 */
57 probe session__create(DTHandle id, uint32_t attributes, DTPort port);
58 probe session__setattr(DTHandle id, uint32_t attributes);
59 probe session__destroy(DTHandle id);
60
61 /*
62 * Port-related events (internal interest only)
63 */
64 probe ports__dead__connection(DTPort port);
65 probe ports__dead__process(DTPort port);
66 probe ports__dead__session(DTPort port);
67 probe ports__dead__orphan(DTPort port);
68
69 /*
70 * Power management and tracking
71 */
72 probe power__sleep();
73 probe power__wake();
74 probe power__on();
75
76 /*
77 * Code Signing related
78 */
79 probe host__register(DTHandle proc, DTPort port);
80 probe host__proxy(DTHandle proc, DTPort port);
81 probe host__unregister(DTHandle proc);
82 probe guest__create(DTHandle proc, DTGuest host, DTGuest guest, uint32_t status, uint32_t flags, const char *path);
83 probe guest__cdhash(DTHandle proc, DTGuest guest, const void *hash, uint32_t length);
84 probe guest__destroy(DTHandle proc, DTGuest guest);
85 probe guest__change(DTHandle proc, DTGuest guest, uint32_t status);
86
87 /*
88 * Child management
89 */
90 probe child__dying(int pid);
91 probe child__checkin(int pid, DTPort servicePort);
92 probe child__stillborn(int pid);
93 probe child__ready(int pid);
94
95 /*
96 * Authorization
97 */
98 /* creation */
99 probe auth__create(DTHandle session, void *authref);
100 /* rule evaluation types */
101 probe auth__allow(DTHandle authref, const char *rule);
102 probe auth__deny(DTHandle authref, const char *rule);
103 probe auth__user(DTHandle authref, const char *rule);
104 probe auth__rules(DTHandle authref, const char *rule);
105 probe auth__kofn(DTHandle authref, const char *rule);
106 probe auth__mechrule(DTHandle authref, const char *rule);
107 probe auth__mech(DTHandle authref, const char *mechanism);
108 /* evaluation intermediate results */
109 probe auth__user__allowroot(DTHandle authref);
110 probe auth__user__allowsessionowner(DTHandle authref);
111 /* evaluation final result */
112 probe auth__evalright(DTHandle authref, const char *right, int32_t status);
113
114 /*
115 * Miscellaneous activity
116 */
117 probe shutdown__begin();
118 probe shutdown__count(int processesLeft, int dirtyCountLeft);
119 probe shutdown__now();
120
121 probe entropy__collect();
122 probe entropy__seed(const void *data, uint32_t count);
123 probe entropy__save(const char *path);
124
125 probe signal__received(int signal);
126 probe signal__handled(int signal);
127 };