endpoint_security 0.1.0-universal-darwin

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +44 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +114 -0
  5. data/Rakefile +170 -0
  6. data/codegen/ast.rb +67 -0
  7. data/codegen/emit_c.rb +68 -0
  8. data/codegen/emit_ruby.rb +128 -0
  9. data/codegen/ir.rb +193 -0
  10. data/codegen/overlay/availability.yml +158 -0
  11. data/codegen/overlay/version_map.yml +92 -0
  12. data/codegen/run.rb +80 -0
  13. data/codegen/snapshots/26.5.json +5828 -0
  14. data/examples/eslogger_clone.rb +5 -0
  15. data/examples/execblock.rb +16 -0
  16. data/examples/filemon.rb +10 -0
  17. data/examples/procmon.rb +13 -0
  18. data/ext/endpoint_security/client.c +795 -0
  19. data/ext/endpoint_security/client.h +88 -0
  20. data/ext/endpoint_security/endpoint_security.c +17 -0
  21. data/ext/endpoint_security/extconf.rb +37 -0
  22. data/ext/endpoint_security/field.c +719 -0
  23. data/ext/endpoint_security/field.h +42 -0
  24. data/ext/endpoint_security/generated/es_schema.c +1233 -0
  25. data/ext/endpoint_security/message.c +426 -0
  26. data/ext/endpoint_security/message.h +13 -0
  27. data/ext/endpoint_security/mute.c +291 -0
  28. data/ext/endpoint_security/mute.h +8 -0
  29. data/ext/endpoint_security/queue.c +124 -0
  30. data/ext/endpoint_security/queue.h +46 -0
  31. data/ext/endpoint_security/watchdog.c +243 -0
  32. data/lib/endpoint_security/availability.rb +30 -0
  33. data/lib/endpoint_security/client.rb +280 -0
  34. data/lib/endpoint_security/diagnostics.rb +26 -0
  35. data/lib/endpoint_security/doctor.rb +35 -0
  36. data/lib/endpoint_security/errors.rb +42 -0
  37. data/lib/endpoint_security/generated/availability.rb +169 -0
  38. data/lib/endpoint_security/generated/enums.rb +409 -0
  39. data/lib/endpoint_security/generated/event_types.rb +520 -0
  40. data/lib/endpoint_security/message.rb +29 -0
  41. data/lib/endpoint_security/object_model.rb +170 -0
  42. data/lib/endpoint_security/recorder.rb +26 -0
  43. data/lib/endpoint_security/version.rb +6 -0
  44. data/lib/endpoint_security.rb +38 -0
  45. data/support/entitlements.plist +8 -0
  46. data/support/esmock/esmock.c +482 -0
  47. data/support/esmock/esmock.h +21 -0
  48. data/support/sign_ruby.sh +13 -0
  49. metadata +90 -0
@@ -0,0 +1,169 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by codegen/run.rb. Do not edit.
4
+
5
+ module EndpointSecurity
6
+ # Runtime support metadata for SDK events.
7
+ module Availability
8
+ # Minimum macOS version keyed by event symbol.
9
+ EVENT_MIN_OS = {
10
+ auth_exec: "10.15",
11
+ auth_open: "10.15",
12
+ auth_kextload: "10.15",
13
+ auth_mmap: "10.15",
14
+ auth_mprotect: "10.15",
15
+ auth_mount: "10.15",
16
+ auth_rename: "10.15",
17
+ auth_signal: "10.15",
18
+ auth_unlink: "10.15",
19
+ notify_exec: "10.15",
20
+ notify_open: "10.15",
21
+ notify_fork: "10.15",
22
+ notify_close: "10.15",
23
+ notify_create: "10.15",
24
+ notify_exchangedata: "10.15",
25
+ notify_exit: "10.15",
26
+ notify_get_task: "10.15",
27
+ notify_kextload: "10.15",
28
+ notify_kextunload: "10.15",
29
+ notify_link: "10.15",
30
+ notify_mmap: "10.15",
31
+ notify_mprotect: "10.15",
32
+ notify_mount: "10.15",
33
+ notify_unmount: "10.15",
34
+ notify_iokit_open: "10.15",
35
+ notify_rename: "10.15",
36
+ notify_setattrlist: "10.15",
37
+ notify_setextattr: "10.15",
38
+ notify_setflags: "10.15",
39
+ notify_setmode: "10.15",
40
+ notify_setowner: "10.15",
41
+ notify_signal: "10.15",
42
+ notify_unlink: "10.15",
43
+ notify_write: "10.15",
44
+ auth_file_provider_materialize: "10.15",
45
+ notify_file_provider_materialize: "10.15",
46
+ auth_file_provider_update: "10.15",
47
+ notify_file_provider_update: "10.15",
48
+ auth_readlink: "10.15",
49
+ notify_readlink: "10.15",
50
+ auth_truncate: "10.15",
51
+ notify_truncate: "10.15",
52
+ auth_link: "10.15",
53
+ notify_lookup: "10.15",
54
+ auth_create: "10.15",
55
+ auth_setattrlist: "10.15",
56
+ auth_setextattr: "10.15",
57
+ auth_setflags: "10.15",
58
+ auth_setmode: "10.15",
59
+ auth_setowner: "10.15",
60
+ auth_chdir: "10.15.1",
61
+ notify_chdir: "10.15.1",
62
+ auth_getattrlist: "10.15.1",
63
+ notify_getattrlist: "10.15.1",
64
+ notify_stat: "10.15.1",
65
+ notify_access: "10.15.1",
66
+ auth_chroot: "10.15.1",
67
+ notify_chroot: "10.15.1",
68
+ auth_utimes: "10.15.1",
69
+ notify_utimes: "10.15.1",
70
+ auth_clone: "10.15.1",
71
+ notify_clone: "10.15.1",
72
+ notify_fcntl: "10.15.1",
73
+ auth_getextattr: "10.15.1",
74
+ notify_getextattr: "10.15.1",
75
+ auth_listextattr: "10.15.1",
76
+ notify_listextattr: "10.15.1",
77
+ auth_readdir: "10.15.1",
78
+ notify_readdir: "10.15.1",
79
+ auth_deleteextattr: "10.15.1",
80
+ notify_deleteextattr: "10.15.1",
81
+ auth_fsgetpath: "10.15.1",
82
+ notify_fsgetpath: "10.15.1",
83
+ notify_dup: "10.15.1",
84
+ auth_settime: "10.15.1",
85
+ notify_settime: "10.15.1",
86
+ notify_uipc_bind: "10.15.1",
87
+ auth_uipc_bind: "10.15.1",
88
+ notify_uipc_connect: "10.15.1",
89
+ auth_uipc_connect: "10.15.1",
90
+ auth_exchangedata: "10.15.1",
91
+ auth_setacl: "10.15.1",
92
+ notify_setacl: "10.15.1",
93
+ notify_pty_grant: "10.15.4",
94
+ notify_pty_close: "10.15.4",
95
+ auth_proc_check: "10.15.4",
96
+ notify_proc_check: "10.15.4",
97
+ auth_get_task: "10.15.4",
98
+ auth_searchfs: "11.0",
99
+ notify_searchfs: "11.0",
100
+ auth_fcntl: "11.0",
101
+ auth_iokit_open: "11.0",
102
+ auth_proc_suspend_resume: "11.0",
103
+ notify_proc_suspend_resume: "11.0",
104
+ notify_cs_invalidated: "11.0",
105
+ notify_get_task_name: "11.0",
106
+ notify_trace: "11.0",
107
+ notify_remote_thread_create: "11.0",
108
+ auth_remount: "11.0",
109
+ notify_remount: "11.0",
110
+ auth_get_task_read: "11.3",
111
+ notify_get_task_read: "11.3",
112
+ notify_get_task_inspect: "11.3",
113
+ notify_setuid: "12.0",
114
+ notify_setgid: "12.0",
115
+ notify_seteuid: "12.0",
116
+ notify_setegid: "12.0",
117
+ notify_setreuid: "12.0",
118
+ notify_setregid: "12.0",
119
+ auth_copyfile: "12.0",
120
+ notify_copyfile: "12.0",
121
+ notify_authentication: "13.0",
122
+ notify_xp_malware_detected: "13.0",
123
+ notify_xp_malware_remediated: "13.0",
124
+ notify_lw_session_login: "13.0",
125
+ notify_lw_session_logout: "13.0",
126
+ notify_lw_session_lock: "13.0",
127
+ notify_lw_session_unlock: "13.0",
128
+ notify_screensharing_attach: "13.0",
129
+ notify_screensharing_detach: "13.0",
130
+ notify_openssh_login: "13.0",
131
+ notify_openssh_logout: "13.0",
132
+ notify_login_login: "13.0",
133
+ notify_login_logout: "13.0",
134
+ notify_btm_launch_item_add: "13.0",
135
+ notify_btm_launch_item_remove: "13.0",
136
+ notify_profile_add: "14.0",
137
+ notify_profile_remove: "14.0",
138
+ notify_su: "14.0",
139
+ notify_authorization_petition: "14.0",
140
+ notify_authorization_judgement: "14.0",
141
+ notify_sudo: "14.0",
142
+ notify_od_group_add: "14.0",
143
+ notify_od_group_remove: "14.0",
144
+ notify_od_group_set: "14.0",
145
+ notify_od_modify_password: "14.0",
146
+ notify_od_disable_user: "14.0",
147
+ notify_od_enable_user: "14.0",
148
+ notify_od_attribute_value_add: "14.0",
149
+ notify_od_attribute_value_remove: "14.0",
150
+ notify_od_attribute_set: "14.0",
151
+ notify_od_create_user: "14.0",
152
+ notify_od_create_group: "14.0",
153
+ notify_od_delete_user: "14.0",
154
+ notify_od_delete_group: "14.0",
155
+ notify_xpc_connect: "14.0",
156
+ notify_gatekeeper_user_override: "15.0",
157
+ notify_tcc_modify: "15.4",
158
+ reserved_0: "26.3",
159
+ reserved_1: "26.3",
160
+ reserved_2: "26.3",
161
+ reserved_3: "26.4.0",
162
+ reserved_4: "26.4.0",
163
+ reserved_5: "26.4.0",
164
+ reserved_6: "26.4.0",
165
+ reserved_7: "26.5",
166
+ reserved_8: "26.5"
167
+ }.freeze
168
+ end
169
+ end
@@ -0,0 +1,409 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by codegen/run.rb. Do not edit.
4
+
5
+ module EndpointSecurity
6
+ # Symbol conversion for SDK enumeration fields.
7
+ module Enum
8
+ # Numeric-to-symbol tables keyed by SDK typedef name.
9
+ TABLES = {
10
+ "es_action_type_t" => {
11
+ 0 => :auth,
12
+ 1 => :notify
13
+ }.freeze,
14
+ "es_set_or_clear_t" => {
15
+ 0 => :set,
16
+ 1 => :clear
17
+ }.freeze,
18
+ "es_proc_check_type_t" => {
19
+ 1 => :listpids,
20
+ 2 => :pidinfo,
21
+ 3 => :pidfdinfo,
22
+ 4 => :kernmsgbuf,
23
+ 5 => :setcontrol,
24
+ 6 => :pidfileportinfo,
25
+ 7 => :terminate,
26
+ 8 => :dirtycontrol,
27
+ 9 => :pidrusage,
28
+ 14 => :udata_info
29
+ }.freeze,
30
+ "es_xpc_domain_type_t" => {
31
+ 1 => :system,
32
+ 2 => :user,
33
+ 3 => :user_login,
34
+ 4 => :session,
35
+ 5 => :pid,
36
+ 6 => :manager,
37
+ 7 => :port,
38
+ 8 => :gui
39
+ }.freeze,
40
+ "es_authentication_type_t" => {
41
+ 0 => :od,
42
+ 1 => :touchid,
43
+ 2 => :token,
44
+ 3 => :auto_unlock,
45
+ 4 => :last
46
+ }.freeze,
47
+ "es_sudo_plugin_type_t" => {
48
+ 0 => :unknown,
49
+ 1 => :front_end,
50
+ 2 => :policy,
51
+ 3 => :io,
52
+ 4 => :audit,
53
+ 5 => :approval
54
+ }.freeze,
55
+ "es_event_type_t" => {
56
+ 0 => :auth_exec,
57
+ 1 => :auth_open,
58
+ 2 => :auth_kextload,
59
+ 3 => :auth_mmap,
60
+ 4 => :auth_mprotect,
61
+ 5 => :auth_mount,
62
+ 6 => :auth_rename,
63
+ 7 => :auth_signal,
64
+ 8 => :auth_unlink,
65
+ 9 => :notify_exec,
66
+ 10 => :notify_open,
67
+ 11 => :notify_fork,
68
+ 12 => :notify_close,
69
+ 13 => :notify_create,
70
+ 14 => :notify_exchangedata,
71
+ 15 => :notify_exit,
72
+ 16 => :notify_get_task,
73
+ 17 => :notify_kextload,
74
+ 18 => :notify_kextunload,
75
+ 19 => :notify_link,
76
+ 20 => :notify_mmap,
77
+ 21 => :notify_mprotect,
78
+ 22 => :notify_mount,
79
+ 23 => :notify_unmount,
80
+ 24 => :notify_iokit_open,
81
+ 25 => :notify_rename,
82
+ 26 => :notify_setattrlist,
83
+ 27 => :notify_setextattr,
84
+ 28 => :notify_setflags,
85
+ 29 => :notify_setmode,
86
+ 30 => :notify_setowner,
87
+ 31 => :notify_signal,
88
+ 32 => :notify_unlink,
89
+ 33 => :notify_write,
90
+ 34 => :auth_file_provider_materialize,
91
+ 35 => :notify_file_provider_materialize,
92
+ 36 => :auth_file_provider_update,
93
+ 37 => :notify_file_provider_update,
94
+ 38 => :auth_readlink,
95
+ 39 => :notify_readlink,
96
+ 40 => :auth_truncate,
97
+ 41 => :notify_truncate,
98
+ 42 => :auth_link,
99
+ 43 => :notify_lookup,
100
+ 44 => :auth_create,
101
+ 45 => :auth_setattrlist,
102
+ 46 => :auth_setextattr,
103
+ 47 => :auth_setflags,
104
+ 48 => :auth_setmode,
105
+ 49 => :auth_setowner,
106
+ 50 => :auth_chdir,
107
+ 51 => :notify_chdir,
108
+ 52 => :auth_getattrlist,
109
+ 53 => :notify_getattrlist,
110
+ 54 => :notify_stat,
111
+ 55 => :notify_access,
112
+ 56 => :auth_chroot,
113
+ 57 => :notify_chroot,
114
+ 58 => :auth_utimes,
115
+ 59 => :notify_utimes,
116
+ 60 => :auth_clone,
117
+ 61 => :notify_clone,
118
+ 62 => :notify_fcntl,
119
+ 63 => :auth_getextattr,
120
+ 64 => :notify_getextattr,
121
+ 65 => :auth_listextattr,
122
+ 66 => :notify_listextattr,
123
+ 67 => :auth_readdir,
124
+ 68 => :notify_readdir,
125
+ 69 => :auth_deleteextattr,
126
+ 70 => :notify_deleteextattr,
127
+ 71 => :auth_fsgetpath,
128
+ 72 => :notify_fsgetpath,
129
+ 73 => :notify_dup,
130
+ 74 => :auth_settime,
131
+ 75 => :notify_settime,
132
+ 76 => :notify_uipc_bind,
133
+ 77 => :auth_uipc_bind,
134
+ 78 => :notify_uipc_connect,
135
+ 79 => :auth_uipc_connect,
136
+ 80 => :auth_exchangedata,
137
+ 81 => :auth_setacl,
138
+ 82 => :notify_setacl,
139
+ 83 => :notify_pty_grant,
140
+ 84 => :notify_pty_close,
141
+ 85 => :auth_proc_check,
142
+ 86 => :notify_proc_check,
143
+ 87 => :auth_get_task,
144
+ 88 => :auth_searchfs,
145
+ 89 => :notify_searchfs,
146
+ 90 => :auth_fcntl,
147
+ 91 => :auth_iokit_open,
148
+ 92 => :auth_proc_suspend_resume,
149
+ 93 => :notify_proc_suspend_resume,
150
+ 94 => :notify_cs_invalidated,
151
+ 95 => :notify_get_task_name,
152
+ 96 => :notify_trace,
153
+ 97 => :notify_remote_thread_create,
154
+ 98 => :auth_remount,
155
+ 99 => :notify_remount,
156
+ 100 => :auth_get_task_read,
157
+ 101 => :notify_get_task_read,
158
+ 102 => :notify_get_task_inspect,
159
+ 103 => :notify_setuid,
160
+ 104 => :notify_setgid,
161
+ 105 => :notify_seteuid,
162
+ 106 => :notify_setegid,
163
+ 107 => :notify_setreuid,
164
+ 108 => :notify_setregid,
165
+ 109 => :auth_copyfile,
166
+ 110 => :notify_copyfile,
167
+ 111 => :notify_authentication,
168
+ 112 => :notify_xp_malware_detected,
169
+ 113 => :notify_xp_malware_remediated,
170
+ 114 => :notify_lw_session_login,
171
+ 115 => :notify_lw_session_logout,
172
+ 116 => :notify_lw_session_lock,
173
+ 117 => :notify_lw_session_unlock,
174
+ 118 => :notify_screensharing_attach,
175
+ 119 => :notify_screensharing_detach,
176
+ 120 => :notify_openssh_login,
177
+ 121 => :notify_openssh_logout,
178
+ 122 => :notify_login_login,
179
+ 123 => :notify_login_logout,
180
+ 124 => :notify_btm_launch_item_add,
181
+ 125 => :notify_btm_launch_item_remove,
182
+ 126 => :notify_profile_add,
183
+ 127 => :notify_profile_remove,
184
+ 128 => :notify_su,
185
+ 129 => :notify_authorization_petition,
186
+ 130 => :notify_authorization_judgement,
187
+ 131 => :notify_sudo,
188
+ 132 => :notify_od_group_add,
189
+ 133 => :notify_od_group_remove,
190
+ 134 => :notify_od_group_set,
191
+ 135 => :notify_od_modify_password,
192
+ 136 => :notify_od_disable_user,
193
+ 137 => :notify_od_enable_user,
194
+ 138 => :notify_od_attribute_value_add,
195
+ 139 => :notify_od_attribute_value_remove,
196
+ 140 => :notify_od_attribute_set,
197
+ 141 => :notify_od_create_user,
198
+ 142 => :notify_od_create_group,
199
+ 143 => :notify_od_delete_user,
200
+ 144 => :notify_od_delete_group,
201
+ 145 => :notify_xpc_connect,
202
+ 146 => :notify_gatekeeper_user_override,
203
+ 147 => :notify_tcc_modify,
204
+ 148 => :reserved_0,
205
+ 149 => :reserved_1,
206
+ 150 => :reserved_2,
207
+ 151 => :reserved_3,
208
+ 152 => :reserved_4,
209
+ 153 => :reserved_5,
210
+ 154 => :reserved_6,
211
+ 155 => :reserved_7,
212
+ 156 => :reserved_8,
213
+ 157 => :last
214
+ }.freeze,
215
+ "es_auth_result_t" => {
216
+ 0 => :allow,
217
+ 1 => :deny
218
+ }.freeze,
219
+ "es_result_type_t" => {
220
+ 0 => :auth,
221
+ 1 => :flags
222
+ }.freeze,
223
+ "es_return_t" => {
224
+ 0 => :success,
225
+ 1 => :error
226
+ }.freeze,
227
+ "es_respond_result_t" => {
228
+ 0 => :success,
229
+ 1 => :err_invalid_argument,
230
+ 2 => :err_internal,
231
+ 3 => :not_found,
232
+ 4 => :err_duplicate_response,
233
+ 5 => :err_event_type
234
+ }.freeze,
235
+ "es_new_client_result_t" => {
236
+ 0 => :success,
237
+ 1 => :err_invalid_argument,
238
+ 2 => :err_internal,
239
+ 3 => :err_not_entitled,
240
+ 4 => :err_not_permitted,
241
+ 5 => :err_not_privileged,
242
+ 6 => :err_too_many_clients
243
+ }.freeze,
244
+ "es_clear_cache_result_t" => {
245
+ 0 => :success,
246
+ 1 => :err_internal,
247
+ 2 => :err_throttle
248
+ }.freeze,
249
+ "es_mute_path_type_t" => {
250
+ 0 => :prefix,
251
+ 1 => :literal,
252
+ 2 => :target_prefix,
253
+ 3 => :target_literal
254
+ }.freeze,
255
+ "es_address_type_t" => {
256
+ 0 => :none,
257
+ 1 => :ipv4,
258
+ 2 => :ipv6,
259
+ 3 => :named_socket
260
+ }.freeze,
261
+ "es_mute_inversion_type_t" => {
262
+ 0 => :process,
263
+ 1 => :path,
264
+ 2 => :target_path,
265
+ 3 => :last
266
+ }.freeze,
267
+ "es_mute_inverted_return_t" => {
268
+ 0 => :mute_inverted,
269
+ 1 => :mute_not_inverted,
270
+ 2 => :mute_inverted_error
271
+ }.freeze,
272
+ "es_authorization_rule_class_t" => {
273
+ 0 => :user,
274
+ 1 => :rule,
275
+ 2 => :mechanism,
276
+ 3 => :allow,
277
+ 4 => :deny,
278
+ 5 => :unknown,
279
+ 6 => :invalid
280
+ }.freeze,
281
+ "es_od_member_type_t" => {
282
+ 0 => :user_name,
283
+ 1 => :user_uuid,
284
+ 2 => :group_uuid
285
+ }.freeze,
286
+ "es_od_account_type_t" => {
287
+ 0 => :user,
288
+ 1 => :computer
289
+ }.freeze,
290
+ "es_od_record_type_t" => {
291
+ 0 => :user,
292
+ 1 => :group
293
+ }.freeze,
294
+ "es_gatekeeper_user_override_file_type_t" => {
295
+ 0 => :path,
296
+ 1 => :file
297
+ }.freeze,
298
+ "es_tcc_event_type_t" => {
299
+ 0 => :unknown,
300
+ 1 => :create,
301
+ 2 => :modify,
302
+ 3 => :delete
303
+ }.freeze,
304
+ "es_tcc_authorization_right_t" => {
305
+ 0 => :denied,
306
+ 1 => :unknown,
307
+ 2 => :allowed,
308
+ 3 => :limited,
309
+ 4 => :add_modify_added,
310
+ 5 => :session_pid,
311
+ 6 => :learn_more
312
+ }.freeze,
313
+ "es_tcc_authorization_reason_t" => {
314
+ 0 => :none,
315
+ 1 => :error,
316
+ 2 => :user_consent,
317
+ 3 => :user_set,
318
+ 4 => :system_set,
319
+ 5 => :service_policy,
320
+ 6 => :mdm_policy,
321
+ 7 => :service_override_policy,
322
+ 8 => :missing_usage_string,
323
+ 9 => :prompt_timeout,
324
+ 10 => :preflight_unknown,
325
+ 11 => :entitled,
326
+ 12 => :app_type_policy,
327
+ 13 => :prompt_cancel
328
+ }.freeze,
329
+ "es_tcc_identity_type_t" => {
330
+ 0 => :bundle_id,
331
+ 1 => :executable_path,
332
+ 2 => :policy_id,
333
+ 3 => :file_provider_domain_id
334
+ }.freeze,
335
+ "es_cs_validation_category_t" => {
336
+ 0 => :invalid,
337
+ 1 => :platform,
338
+ 2 => :testflight,
339
+ 3 => :development,
340
+ 4 => :app_store,
341
+ 5 => :enterprise,
342
+ 6 => :developer_id,
343
+ 7 => :local_signing,
344
+ 8 => :rosetta,
345
+ 9 => :oopjit,
346
+ 10 => :none
347
+ }.freeze,
348
+ "es_auto_unlock_type_t" => {
349
+ 1 => :auto_unlock_machine_unlock,
350
+ 2 => :auto_unlock_auth_prompt
351
+ }.freeze,
352
+ "es_btm_item_type_t" => {
353
+ 0 => :user_item,
354
+ 1 => :app,
355
+ 2 => :login_item,
356
+ 3 => :agent,
357
+ 4 => :daemon
358
+ }.freeze,
359
+ "es_destination_type_t" => {
360
+ 0 => :existing_file,
361
+ 1 => :new_path
362
+ }.freeze,
363
+ "es_get_task_type_t" => {
364
+ 0 => :task_for_pid,
365
+ 1 => :expose_task,
366
+ 2 => :identity_token
367
+ }.freeze,
368
+ "es_openssh_login_result_type_t" => {
369
+ 0 => :openssh_login_exceed_maxtries,
370
+ 1 => :openssh_login_root_denied,
371
+ 2 => :openssh_auth_success,
372
+ 3 => :openssh_auth_fail_none,
373
+ 4 => :openssh_auth_fail_passwd,
374
+ 5 => :openssh_auth_fail_kbdint,
375
+ 6 => :openssh_auth_fail_pubkey,
376
+ 7 => :openssh_auth_fail_hostbased,
377
+ 8 => :openssh_auth_fail_gssapi,
378
+ 9 => :openssh_invalid_user
379
+ }.freeze,
380
+ "es_mount_disposition_t" => {
381
+ 0 => :external,
382
+ 1 => :internal,
383
+ 2 => :network,
384
+ 3 => :virtual,
385
+ 4 => :nullfs,
386
+ 5 => :unknown
387
+ }.freeze,
388
+ "es_proc_suspend_resume_type_t" => {
389
+ 0 => :suspend,
390
+ 1 => :resume,
391
+ 3 => :shutdown_sockets
392
+ }.freeze,
393
+ "es_profile_source_t" => {
394
+ 0 => :managed,
395
+ 1 => :install
396
+ }.freeze,
397
+ "es_touchid_mode_t" => {
398
+ 0 => :verification,
399
+ 1 => :identification
400
+ }.freeze
401
+ }.freeze
402
+
403
+ module_function
404
+
405
+ # Returns the symbolic enum value, preserving unknown numeric values.
406
+ # @return [Symbol, Integer]
407
+ def symbol(type, value) = TABLES.fetch(type, {}).fetch(value, value)
408
+ end
409
+ end