Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_security.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 0 : static void ndr_print_flags_dom_sid(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct dom_sid *r)
8 : {
9 0 : ndr_print_dom_sid(ndr, name, r);
10 0 : }
11 :
12 7633931 : static enum ndr_err_code ndr_push_se_privilege(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint64_t r)
13 : {
14 7633931 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r));
15 7620297 : return NDR_ERR_SUCCESS;
16 : }
17 :
18 7484977 : static enum ndr_err_code ndr_pull_se_privilege(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint64_t *r)
19 : {
20 11407 : uint64_t v;
21 7484977 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &v));
22 7484977 : *r = v;
23 7484977 : return NDR_ERR_SUCCESS;
24 : }
25 :
26 0 : _PUBLIC_ void ndr_print_se_privilege(struct ndr_print *ndr, const char *name, uint64_t r)
27 : {
28 0 : ndr_print_hyper(ndr, name, r);
29 0 : ndr->depth++;
30 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_MACHINE_ACCOUNT_BIT", SEC_PRIV_MACHINE_ACCOUNT_BIT, r);
31 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_PRINT_OPERATOR_BIT", SEC_PRIV_PRINT_OPERATOR_BIT, r);
32 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_ADD_USERS_BIT", SEC_PRIV_ADD_USERS_BIT, r);
33 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_DISK_OPERATOR_BIT", SEC_PRIV_DISK_OPERATOR_BIT, r);
34 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_REMOTE_SHUTDOWN_BIT", SEC_PRIV_REMOTE_SHUTDOWN_BIT, r);
35 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_BACKUP_BIT", SEC_PRIV_BACKUP_BIT, r);
36 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_RESTORE_BIT", SEC_PRIV_RESTORE_BIT, r);
37 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_TAKE_OWNERSHIP_BIT", SEC_PRIV_TAKE_OWNERSHIP_BIT, r);
38 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_INCREASE_QUOTA_BIT", SEC_PRIV_INCREASE_QUOTA_BIT, r);
39 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_SECURITY_BIT", SEC_PRIV_SECURITY_BIT, r);
40 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_LOAD_DRIVER_BIT", SEC_PRIV_LOAD_DRIVER_BIT, r);
41 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_SYSTEM_PROFILE_BIT", SEC_PRIV_SYSTEM_PROFILE_BIT, r);
42 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_SYSTEMTIME_BIT", SEC_PRIV_SYSTEMTIME_BIT, r);
43 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_PROFILE_SINGLE_PROCESS_BIT", SEC_PRIV_PROFILE_SINGLE_PROCESS_BIT, r);
44 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_INCREASE_BASE_PRIORITY_BIT", SEC_PRIV_INCREASE_BASE_PRIORITY_BIT, r);
45 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_CREATE_PAGEFILE_BIT", SEC_PRIV_CREATE_PAGEFILE_BIT, r);
46 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_SHUTDOWN_BIT", SEC_PRIV_SHUTDOWN_BIT, r);
47 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_DEBUG_BIT", SEC_PRIV_DEBUG_BIT, r);
48 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_SYSTEM_ENVIRONMENT_BIT", SEC_PRIV_SYSTEM_ENVIRONMENT_BIT, r);
49 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_CHANGE_NOTIFY_BIT", SEC_PRIV_CHANGE_NOTIFY_BIT, r);
50 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_UNDOCK_BIT", SEC_PRIV_UNDOCK_BIT, r);
51 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_ENABLE_DELEGATION_BIT", SEC_PRIV_ENABLE_DELEGATION_BIT, r);
52 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_MANAGE_VOLUME_BIT", SEC_PRIV_MANAGE_VOLUME_BIT, r);
53 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_IMPERSONATE_BIT", SEC_PRIV_IMPERSONATE_BIT, r);
54 0 : ndr_print_bitmap_flag(ndr, sizeof(uint64_t), "SEC_PRIV_CREATE_GLOBAL_BIT", SEC_PRIV_CREATE_GLOBAL_BIT, r);
55 0 : ndr->depth--;
56 0 : }
57 :
58 7633931 : static enum ndr_err_code ndr_push_lsa_SystemAccessModeFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
59 : {
60 7633931 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
61 7620297 : return NDR_ERR_SUCCESS;
62 : }
63 :
64 7484977 : static enum ndr_err_code ndr_pull_lsa_SystemAccessModeFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
65 : {
66 11407 : uint32_t v;
67 7484977 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
68 7484977 : *r = v;
69 7484977 : return NDR_ERR_SUCCESS;
70 : }
71 :
72 0 : _PUBLIC_ void ndr_print_lsa_SystemAccessModeFlags(struct ndr_print *ndr, const char *name, uint32_t r)
73 : {
74 0 : ndr_print_uint32(ndr, name, r);
75 0 : ndr->depth++;
76 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_INTERACTIVE", LSA_POLICY_MODE_INTERACTIVE, r);
77 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_NETWORK", LSA_POLICY_MODE_NETWORK, r);
78 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_BATCH", LSA_POLICY_MODE_BATCH, r);
79 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_SERVICE", LSA_POLICY_MODE_SERVICE, r);
80 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_PROXY", LSA_POLICY_MODE_PROXY, r);
81 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_DENY_INTERACTIVE", LSA_POLICY_MODE_DENY_INTERACTIVE, r);
82 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_DENY_NETWORK", LSA_POLICY_MODE_DENY_NETWORK, r);
83 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_DENY_BATCH", LSA_POLICY_MODE_DENY_BATCH, r);
84 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_DENY_SERVICE", LSA_POLICY_MODE_DENY_SERVICE, r);
85 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_REMOTE_INTERACTIVE", LSA_POLICY_MODE_REMOTE_INTERACTIVE, r);
86 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_DENY_REMOTE_INTERACTIVE", LSA_POLICY_MODE_DENY_REMOTE_INTERACTIVE, r);
87 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_ALL", LSA_POLICY_MODE_ALL, r);
88 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_MODE_ALL_NT4", LSA_POLICY_MODE_ALL_NT4, r);
89 0 : ndr->depth--;
90 0 : }
91 :
92 38349626 : _PUBLIC_ enum ndr_err_code ndr_push_security_ace_flags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint8_t r)
93 : {
94 38349626 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
95 36806262 : return NDR_ERR_SUCCESS;
96 : }
97 :
98 179774706 : _PUBLIC_ enum ndr_err_code ndr_pull_security_ace_flags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint8_t *r)
99 : {
100 6469348 : uint8_t v;
101 179774706 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
102 179774706 : *r = v;
103 179774706 : return NDR_ERR_SUCCESS;
104 : }
105 :
106 4458 : _PUBLIC_ void ndr_print_security_ace_flags(struct ndr_print *ndr, const char *name, uint8_t r)
107 : {
108 4458 : ndr_print_uint8(ndr, name, r);
109 4458 : ndr->depth++;
110 4458 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_OBJECT_INHERIT", SEC_ACE_FLAG_OBJECT_INHERIT, r);
111 4458 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_CONTAINER_INHERIT", SEC_ACE_FLAG_CONTAINER_INHERIT, r);
112 4458 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_NO_PROPAGATE_INHERIT", SEC_ACE_FLAG_NO_PROPAGATE_INHERIT, r);
113 4458 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_INHERIT_ONLY", SEC_ACE_FLAG_INHERIT_ONLY, r);
114 4458 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_INHERITED_ACE", SEC_ACE_FLAG_INHERITED_ACE, r);
115 4458 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_VALID_INHERIT", SEC_ACE_FLAG_VALID_INHERIT, r);
116 4458 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_SUCCESSFUL_ACCESS", SEC_ACE_FLAG_SUCCESSFUL_ACCESS, r);
117 4458 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_FAILED_ACCESS", SEC_ACE_FLAG_FAILED_ACCESS, r);
118 4458 : ndr->depth--;
119 4458 : }
120 :
121 38349626 : _PUBLIC_ enum ndr_err_code ndr_push_security_ace_type(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum security_ace_type r)
122 : {
123 38349626 : NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
124 36806262 : return NDR_ERR_SUCCESS;
125 : }
126 :
127 179774706 : _PUBLIC_ enum ndr_err_code ndr_pull_security_ace_type(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum security_ace_type *r)
128 : {
129 6469348 : uint8_t v;
130 179774706 : NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
131 179774706 : *r = v;
132 179774706 : return NDR_ERR_SUCCESS;
133 : }
134 :
135 4458 : _PUBLIC_ void ndr_print_security_ace_type(struct ndr_print *ndr, const char *name, enum security_ace_type r)
136 : {
137 4458 : const char *val = NULL;
138 :
139 4458 : switch (r) {
140 4458 : case SEC_ACE_TYPE_ACCESS_ALLOWED: val = "SEC_ACE_TYPE_ACCESS_ALLOWED"; break;
141 0 : case SEC_ACE_TYPE_ACCESS_DENIED: val = "SEC_ACE_TYPE_ACCESS_DENIED"; break;
142 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT: val = "SEC_ACE_TYPE_SYSTEM_AUDIT"; break;
143 0 : case SEC_ACE_TYPE_SYSTEM_ALARM: val = "SEC_ACE_TYPE_SYSTEM_ALARM"; break;
144 0 : case SEC_ACE_TYPE_ALLOWED_COMPOUND: val = "SEC_ACE_TYPE_ALLOWED_COMPOUND"; break;
145 0 : case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: val = "SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT"; break;
146 0 : case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: val = "SEC_ACE_TYPE_ACCESS_DENIED_OBJECT"; break;
147 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: val = "SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT"; break;
148 0 : case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: val = "SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT"; break;
149 0 : case SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK: val = "SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK"; break;
150 0 : case SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK: val = "SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK"; break;
151 0 : case SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK_OBJECT: val = "SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK_OBJECT"; break;
152 0 : case SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK_OBJECT: val = "SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK_OBJECT"; break;
153 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK: val = "SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK"; break;
154 0 : case SEC_ACE_TYPE_SYSTEM_ALARM_CALLBACK: val = "SEC_ACE_TYPE_SYSTEM_ALARM_CALLBACK"; break;
155 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK_OBJECT: val = "SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK_OBJECT"; break;
156 0 : case SEC_ACE_TYPE_SYSTEM_ALARM_CALLBACK_OBJECT: val = "SEC_ACE_TYPE_SYSTEM_ALARM_CALLBACK_OBJECT"; break;
157 0 : case SEC_ACE_TYPE_SYSTEM_MANDATORY_LABEL: val = "SEC_ACE_TYPE_SYSTEM_MANDATORY_LABEL"; break;
158 0 : case SEC_ACE_TYPE_SYSTEM_RESOURCE_ATTRIBUTE: val = "SEC_ACE_TYPE_SYSTEM_RESOURCE_ATTRIBUTE"; break;
159 0 : case SEC_ACE_TYPE_SYSTEM_SCOPED_POLICY_ID: val = "SEC_ACE_TYPE_SYSTEM_SCOPED_POLICY_ID"; break;
160 : }
161 4458 : ndr_print_enum(ndr, name, "ENUM", val, r);
162 4458 : }
163 :
164 21648298 : static enum ndr_err_code ndr_push_security_ace_object_flags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
165 : {
166 21648298 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
167 21109261 : return NDR_ERR_SUCCESS;
168 : }
169 :
170 121793039 : static enum ndr_err_code ndr_pull_security_ace_object_flags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
171 : {
172 3429804 : uint32_t v;
173 121793039 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
174 121793039 : *r = v;
175 121793039 : return NDR_ERR_SUCCESS;
176 : }
177 :
178 0 : _PUBLIC_ void ndr_print_security_ace_object_flags(struct ndr_print *ndr, const char *name, uint32_t r)
179 : {
180 0 : ndr_print_uint32(ndr, name, r);
181 0 : ndr->depth++;
182 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_ACE_OBJECT_TYPE_PRESENT", SEC_ACE_OBJECT_TYPE_PRESENT, r);
183 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT", SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT, r);
184 0 : ndr->depth--;
185 0 : }
186 :
187 42757559 : static enum ndr_err_code ndr_push_security_ace_object_type(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union security_ace_object_type *r)
188 : {
189 539037 : uint32_t level;
190 42757559 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
191 42757559 : if (ndr_flags & NDR_SCALARS) {
192 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
193 21648298 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
194 21648298 : NDR_CHECK(ndr_push_union_align(ndr, 4));
195 21648298 : switch (level) {
196 19631838 : case SEC_ACE_OBJECT_TYPE_PRESENT: {
197 19631838 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->type));
198 19154657 : break; }
199 :
200 1954604 : default: {
201 1954604 : break; }
202 :
203 : }
204 : }
205 42218522 : return NDR_ERR_SUCCESS;
206 : }
207 :
208 240156274 : static enum ndr_err_code ndr_pull_security_ace_object_type(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union security_ace_object_type *r)
209 : {
210 3429804 : uint32_t level;
211 240156274 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
212 240156274 : if (ndr_flags & NDR_SCALARS) {
213 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
214 121793039 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
215 121793039 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
216 121793039 : switch (level) {
217 112739992 : case SEC_ACE_OBJECT_TYPE_PRESENT: {
218 112739992 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->type));
219 109482211 : break; }
220 :
221 8881024 : default: {
222 8881024 : break; }
223 :
224 : }
225 : }
226 236726470 : return NDR_ERR_SUCCESS;
227 : }
228 :
229 0 : _PUBLIC_ void ndr_print_security_ace_object_type(struct ndr_print *ndr, const char *name, const union security_ace_object_type *r)
230 : {
231 0 : uint32_t level;
232 0 : level = ndr_print_steal_switch_value(ndr, r);
233 0 : ndr_print_union(ndr, name, level, "security_ace_object_type");
234 0 : switch (level) {
235 0 : case SEC_ACE_OBJECT_TYPE_PRESENT:
236 0 : ndr_print_GUID(ndr, "type", &r->type);
237 0 : break;
238 :
239 0 : default:
240 0 : break;
241 :
242 : }
243 0 : }
244 :
245 42757559 : static enum ndr_err_code ndr_push_security_ace_object_inherited_type(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union security_ace_object_inherited_type *r)
246 : {
247 539037 : uint32_t level;
248 42757559 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
249 42757559 : if (ndr_flags & NDR_SCALARS) {
250 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
251 21648298 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
252 21648298 : NDR_CHECK(ndr_push_union_align(ndr, 4));
253 21648298 : switch (level) {
254 14249320 : case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: {
255 14249320 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->inherited_type));
256 13825746 : break; }
257 :
258 7283515 : default: {
259 7283515 : break; }
260 :
261 : }
262 : }
263 42218522 : return NDR_ERR_SUCCESS;
264 : }
265 :
266 240156274 : static enum ndr_err_code ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union security_ace_object_inherited_type *r)
267 : {
268 3429804 : uint32_t level;
269 240156274 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
270 240156274 : if (ndr_flags & NDR_SCALARS) {
271 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
272 121793039 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
273 121793039 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
274 121793039 : switch (level) {
275 64157514 : case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: {
276 64157514 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->inherited_type));
277 62982319 : break; }
278 :
279 55380916 : default: {
280 55380916 : break; }
281 :
282 : }
283 : }
284 236726470 : return NDR_ERR_SUCCESS;
285 : }
286 :
287 0 : _PUBLIC_ void ndr_print_security_ace_object_inherited_type(struct ndr_print *ndr, const char *name, const union security_ace_object_inherited_type *r)
288 : {
289 0 : uint32_t level;
290 0 : level = ndr_print_steal_switch_value(ndr, r);
291 0 : ndr_print_union(ndr, name, level, "security_ace_object_inherited_type");
292 0 : switch (level) {
293 0 : case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT:
294 0 : ndr_print_GUID(ndr, "inherited_type", &r->inherited_type);
295 0 : break;
296 :
297 0 : default:
298 0 : break;
299 :
300 : }
301 0 : }
302 :
303 43296596 : static enum ndr_err_code ndr_push_security_ace_object(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct security_ace_object *r)
304 : {
305 43296596 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
306 43296596 : if (ndr_flags & NDR_SCALARS) {
307 21648298 : NDR_CHECK(ndr_push_align(ndr, 4));
308 22187335 : NDR_CHECK(ndr_push_security_ace_object_flags(ndr, NDR_SCALARS, r->flags));
309 21648298 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->type, r->flags & SEC_ACE_OBJECT_TYPE_PRESENT));
310 21648298 : NDR_CHECK(ndr_push_security_ace_object_type(ndr, NDR_SCALARS, &r->type));
311 21648298 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->inherited_type, r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT));
312 21648298 : NDR_CHECK(ndr_push_security_ace_object_inherited_type(ndr, NDR_SCALARS, &r->inherited_type));
313 21648298 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
314 : }
315 43296596 : if (ndr_flags & NDR_BUFFERS) {
316 21648298 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->type, r->flags & SEC_ACE_OBJECT_TYPE_PRESENT));
317 21648298 : NDR_CHECK(ndr_push_security_ace_object_type(ndr, NDR_BUFFERS, &r->type));
318 21648298 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->inherited_type, r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT));
319 21109261 : NDR_CHECK(ndr_push_security_ace_object_inherited_type(ndr, NDR_BUFFERS, &r->inherited_type));
320 : }
321 42218522 : return NDR_ERR_SUCCESS;
322 : }
323 :
324 243586078 : static enum ndr_err_code ndr_pull_security_ace_object(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct security_ace_object *r)
325 : {
326 243586078 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
327 243586078 : if (ndr_flags & NDR_SCALARS) {
328 121793039 : NDR_CHECK(ndr_pull_align(ndr, 4));
329 125222843 : NDR_CHECK(ndr_pull_security_ace_object_flags(ndr, NDR_SCALARS, &r->flags));
330 121793039 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->type, r->flags & SEC_ACE_OBJECT_TYPE_PRESENT));
331 121793039 : NDR_CHECK(ndr_pull_security_ace_object_type(ndr, NDR_SCALARS, &r->type));
332 121793039 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->inherited_type, r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT));
333 121793039 : NDR_CHECK(ndr_pull_security_ace_object_inherited_type(ndr, NDR_SCALARS, &r->inherited_type));
334 121793039 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
335 : }
336 243586078 : if (ndr_flags & NDR_BUFFERS) {
337 121793039 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->type, r->flags & SEC_ACE_OBJECT_TYPE_PRESENT));
338 121793039 : NDR_CHECK(ndr_pull_security_ace_object_type(ndr, NDR_BUFFERS, &r->type));
339 121793039 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->inherited_type, r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT));
340 118363235 : NDR_CHECK(ndr_pull_security_ace_object_inherited_type(ndr, NDR_BUFFERS, &r->inherited_type));
341 : }
342 236726470 : return NDR_ERR_SUCCESS;
343 : }
344 :
345 0 : _PUBLIC_ void ndr_print_security_ace_object(struct ndr_print *ndr, const char *name, const struct security_ace_object *r)
346 : {
347 0 : ndr_print_struct(ndr, name, "security_ace_object");
348 0 : if (r == NULL) { ndr_print_null(ndr); return; }
349 0 : ndr->depth++;
350 0 : ndr_print_security_ace_object_flags(ndr, "flags", r->flags);
351 0 : ndr_print_set_switch_value(ndr, &r->type, r->flags & SEC_ACE_OBJECT_TYPE_PRESENT);
352 0 : ndr_print_security_ace_object_type(ndr, "type", &r->type);
353 0 : ndr_print_set_switch_value(ndr, &r->inherited_type, r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT);
354 0 : ndr_print_security_ace_object_inherited_type(ndr, "inherited_type", &r->inherited_type);
355 0 : ndr->depth--;
356 : }
357 :
358 0 : _PUBLIC_ enum ndr_err_code ndr_push_security_claim_value_type(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum security_claim_value_type r)
359 : {
360 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
361 0 : return NDR_ERR_SUCCESS;
362 : }
363 :
364 0 : _PUBLIC_ enum ndr_err_code ndr_pull_security_claim_value_type(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum security_claim_value_type *r)
365 : {
366 0 : uint16_t v;
367 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
368 0 : *r = v;
369 0 : return NDR_ERR_SUCCESS;
370 : }
371 :
372 0 : _PUBLIC_ void ndr_print_security_claim_value_type(struct ndr_print *ndr, const char *name, enum security_claim_value_type r)
373 : {
374 0 : const char *val = NULL;
375 :
376 0 : switch (r) {
377 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64: val = "CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64"; break;
378 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64: val = "CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64"; break;
379 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING: val = "CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING"; break;
380 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_SID: val = "CLAIM_SECURITY_ATTRIBUTE_TYPE_SID"; break;
381 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN: val = "CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN"; break;
382 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING: val = "CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING"; break;
383 : }
384 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
385 0 : }
386 :
387 19306 : static enum ndr_err_code ndr_push_claim_values(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union claim_values *r)
388 : {
389 19306 : uint32_t level;
390 : {
391 19306 : libndr_flags _flags_save_UNION = ndr->flags;
392 19306 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
393 19306 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
394 19306 : if (ndr_flags & NDR_SCALARS) {
395 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
396 9653 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
397 9653 : NDR_CHECK(ndr_push_union_align(ndr, 5));
398 9653 : switch (level) {
399 640 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64: {
400 640 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->int_value));
401 0 : break; }
402 :
403 1751 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64: {
404 1751 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->uint_value));
405 0 : break; }
406 :
407 4866 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING: {
408 : {
409 4866 : libndr_flags _flags_save_string = ndr->flags;
410 4866 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
411 4866 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->string_value));
412 4866 : ndr->flags = _flags_save_string;
413 : }
414 4866 : break; }
415 :
416 11 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_SID: {
417 11 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sid_value));
418 0 : break; }
419 :
420 2385 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING: {
421 2385 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->octet_value));
422 0 : break; }
423 :
424 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN: {
425 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->uint_value));
426 0 : break; }
427 :
428 0 : default:
429 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
430 : }
431 : }
432 19306 : if (ndr_flags & NDR_BUFFERS) {
433 9653 : if (!(ndr_flags & NDR_SCALARS)) {
434 : /* We didn't get it above, and the token is not needed after this. */
435 9653 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
436 : }
437 9653 : switch (level) {
438 640 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64:
439 640 : if (r->int_value) {
440 640 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->int_value));
441 640 : NDR_CHECK(ndr_push_int64(ndr, NDR_SCALARS, *r->int_value));
442 640 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->int_value));
443 : }
444 0 : break;
445 :
446 1751 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64:
447 1751 : if (r->uint_value) {
448 1751 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->uint_value));
449 1751 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->uint_value));
450 1751 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->uint_value));
451 : }
452 0 : break;
453 :
454 4866 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING:
455 : {
456 4866 : libndr_flags _flags_save_string = ndr->flags;
457 4866 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
458 4866 : if (r->string_value) {
459 4866 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->string_value));
460 4866 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->string_value));
461 4866 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->string_value));
462 : }
463 4866 : ndr->flags = _flags_save_string;
464 : }
465 4866 : break;
466 :
467 11 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_SID:
468 11 : if (r->sid_value) {
469 11 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->sid_value));
470 11 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->sid_value));
471 11 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->sid_value));
472 : }
473 0 : break;
474 :
475 2385 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING:
476 2385 : if (r->octet_value) {
477 2385 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->octet_value));
478 2385 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->octet_value));
479 2385 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->octet_value));
480 : }
481 0 : break;
482 :
483 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN:
484 0 : if (r->uint_value) {
485 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->uint_value));
486 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->uint_value));
487 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->uint_value));
488 : }
489 0 : break;
490 :
491 0 : default:
492 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
493 : }
494 : }
495 19306 : ndr->flags = _flags_save_UNION;
496 : }
497 19306 : return NDR_ERR_SUCCESS;
498 : }
499 :
500 11616 : static enum ndr_err_code ndr_pull_claim_values(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union claim_values *r)
501 : {
502 11616 : uint32_t level;
503 11616 : TALLOC_CTX *_mem_save_int_value_0 = NULL;
504 11616 : uint32_t _ptr_int_value;
505 11616 : TALLOC_CTX *_mem_save_uint_value_0 = NULL;
506 11616 : uint32_t _ptr_uint_value;
507 11616 : TALLOC_CTX *_mem_save_string_value_0 = NULL;
508 11616 : uint32_t _ptr_string_value;
509 11616 : TALLOC_CTX *_mem_save_sid_value_0 = NULL;
510 11616 : uint32_t _ptr_sid_value;
511 11616 : TALLOC_CTX *_mem_save_octet_value_0 = NULL;
512 11616 : uint32_t _ptr_octet_value;
513 : {
514 11616 : libndr_flags _flags_save_UNION = ndr->flags;
515 11616 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
516 11616 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
517 11616 : if (ndr_flags & NDR_SCALARS) {
518 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
519 5808 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
520 5808 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
521 5808 : switch (level) {
522 128 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64: {
523 128 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_int_value));
524 128 : if (_ptr_int_value) {
525 128 : NDR_PULL_ALLOC(ndr, r->int_value);
526 128 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->int_value, _ptr_int_value));
527 : } else {
528 0 : r->int_value = NULL;
529 : }
530 0 : break; }
531 :
532 350 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64: {
533 350 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uint_value));
534 350 : if (_ptr_uint_value) {
535 350 : NDR_PULL_ALLOC(ndr, r->uint_value);
536 350 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->uint_value, _ptr_uint_value));
537 : } else {
538 0 : r->uint_value = NULL;
539 : }
540 0 : break; }
541 :
542 4798 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING: {
543 : {
544 4798 : libndr_flags _flags_save_string = ndr->flags;
545 4798 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
546 4798 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string_value));
547 4798 : if (_ptr_string_value) {
548 4798 : NDR_PULL_ALLOC(ndr, r->string_value);
549 4798 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->string_value, _ptr_string_value));
550 : } else {
551 0 : r->string_value = NULL;
552 : }
553 4798 : ndr->flags = _flags_save_string;
554 : }
555 4798 : break; }
556 :
557 11 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_SID: {
558 11 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid_value));
559 11 : if (_ptr_sid_value) {
560 11 : NDR_PULL_ALLOC(ndr, r->sid_value);
561 11 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sid_value, _ptr_sid_value));
562 : } else {
563 0 : r->sid_value = NULL;
564 : }
565 0 : break; }
566 :
567 521 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING: {
568 521 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_octet_value));
569 521 : if (_ptr_octet_value) {
570 521 : NDR_PULL_ALLOC(ndr, r->octet_value);
571 521 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->octet_value, _ptr_octet_value));
572 : } else {
573 0 : r->octet_value = NULL;
574 : }
575 0 : break; }
576 :
577 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN: {
578 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uint_value));
579 0 : if (_ptr_uint_value) {
580 0 : NDR_PULL_ALLOC(ndr, r->uint_value);
581 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->uint_value, _ptr_uint_value));
582 : } else {
583 0 : r->uint_value = NULL;
584 : }
585 0 : break; }
586 :
587 0 : default:
588 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
589 : }
590 : }
591 11616 : if (ndr_flags & NDR_BUFFERS) {
592 5808 : if (!(ndr_flags & NDR_SCALARS)) {
593 : /* We didn't get it above, and the token is not needed after this. */
594 5808 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
595 : }
596 5808 : switch (level) {
597 128 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64:
598 128 : if (r->int_value) {
599 128 : uint32_t _relative_save_offset;
600 128 : _relative_save_offset = ndr->offset;
601 128 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->int_value));
602 128 : _mem_save_int_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
603 128 : NDR_PULL_SET_MEM_CTX(ndr, r->int_value, 0);
604 128 : NDR_CHECK(ndr_pull_int64(ndr, NDR_SCALARS, r->int_value));
605 128 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_int_value_0, 0);
606 128 : if (ndr->offset > ndr->relative_highest_offset) {
607 128 : ndr->relative_highest_offset = ndr->offset;
608 : }
609 128 : ndr->offset = _relative_save_offset;
610 : }
611 0 : break;
612 :
613 350 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64:
614 350 : if (r->uint_value) {
615 350 : uint32_t _relative_save_offset;
616 350 : _relative_save_offset = ndr->offset;
617 350 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->uint_value));
618 350 : _mem_save_uint_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
619 350 : NDR_PULL_SET_MEM_CTX(ndr, r->uint_value, 0);
620 350 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->uint_value));
621 350 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uint_value_0, 0);
622 350 : if (ndr->offset > ndr->relative_highest_offset) {
623 350 : ndr->relative_highest_offset = ndr->offset;
624 : }
625 350 : ndr->offset = _relative_save_offset;
626 : }
627 0 : break;
628 :
629 4798 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING:
630 : {
631 4798 : libndr_flags _flags_save_string = ndr->flags;
632 4798 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
633 4798 : if (r->string_value) {
634 4798 : uint32_t _relative_save_offset;
635 4798 : _relative_save_offset = ndr->offset;
636 4798 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->string_value));
637 4798 : _mem_save_string_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
638 4798 : NDR_PULL_SET_MEM_CTX(ndr, r->string_value, 0);
639 4798 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->string_value));
640 4798 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_value_0, 0);
641 4798 : if (ndr->offset > ndr->relative_highest_offset) {
642 4798 : ndr->relative_highest_offset = ndr->offset;
643 : }
644 4798 : ndr->offset = _relative_save_offset;
645 : }
646 4798 : ndr->flags = _flags_save_string;
647 : }
648 4798 : break;
649 :
650 11 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_SID:
651 11 : if (r->sid_value) {
652 11 : uint32_t _relative_save_offset;
653 11 : _relative_save_offset = ndr->offset;
654 11 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sid_value));
655 11 : _mem_save_sid_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
656 11 : NDR_PULL_SET_MEM_CTX(ndr, r->sid_value, 0);
657 11 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->sid_value));
658 11 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_value_0, 0);
659 11 : if (ndr->offset > ndr->relative_highest_offset) {
660 11 : ndr->relative_highest_offset = ndr->offset;
661 : }
662 11 : ndr->offset = _relative_save_offset;
663 : }
664 0 : break;
665 :
666 521 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING:
667 521 : if (r->octet_value) {
668 521 : uint32_t _relative_save_offset;
669 521 : _relative_save_offset = ndr->offset;
670 521 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->octet_value));
671 521 : _mem_save_octet_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
672 521 : NDR_PULL_SET_MEM_CTX(ndr, r->octet_value, 0);
673 521 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->octet_value));
674 521 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_octet_value_0, 0);
675 521 : if (ndr->offset > ndr->relative_highest_offset) {
676 521 : ndr->relative_highest_offset = ndr->offset;
677 : }
678 521 : ndr->offset = _relative_save_offset;
679 : }
680 0 : break;
681 :
682 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN:
683 0 : if (r->uint_value) {
684 0 : uint32_t _relative_save_offset;
685 0 : _relative_save_offset = ndr->offset;
686 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->uint_value));
687 0 : _mem_save_uint_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
688 0 : NDR_PULL_SET_MEM_CTX(ndr, r->uint_value, 0);
689 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->uint_value));
690 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uint_value_0, 0);
691 0 : if (ndr->offset > ndr->relative_highest_offset) {
692 0 : ndr->relative_highest_offset = ndr->offset;
693 : }
694 0 : ndr->offset = _relative_save_offset;
695 : }
696 0 : break;
697 :
698 0 : default:
699 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
700 : }
701 : }
702 11616 : ndr->flags = _flags_save_UNION;
703 : }
704 11616 : return NDR_ERR_SUCCESS;
705 : }
706 :
707 0 : _PUBLIC_ void ndr_print_claim_values(struct ndr_print *ndr, const char *name, const union claim_values *r)
708 : {
709 0 : uint32_t level;
710 : {
711 0 : libndr_flags _flags_save_UNION = ndr->flags;
712 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
713 0 : level = ndr_print_steal_switch_value(ndr, r);
714 0 : ndr_print_union(ndr, name, level, "claim_values");
715 0 : switch (level) {
716 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64:
717 0 : ndr_print_ptr(ndr, "int_value", r->int_value);
718 0 : ndr->depth++;
719 0 : if (r->int_value) {
720 0 : ndr_print_int64(ndr, "int_value", *r->int_value);
721 : }
722 0 : ndr->depth--;
723 0 : break;
724 :
725 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64:
726 0 : ndr_print_ptr(ndr, "uint_value", r->uint_value);
727 0 : ndr->depth++;
728 0 : if (r->uint_value) {
729 0 : ndr_print_hyper(ndr, "uint_value", *r->uint_value);
730 : }
731 0 : ndr->depth--;
732 0 : break;
733 :
734 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING:
735 : {
736 0 : libndr_flags _flags_save_string = ndr->flags;
737 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
738 0 : ndr_print_ptr(ndr, "string_value", r->string_value);
739 0 : ndr->depth++;
740 0 : if (r->string_value) {
741 0 : ndr_print_string(ndr, "string_value", r->string_value);
742 : }
743 0 : ndr->depth--;
744 0 : ndr->flags = _flags_save_string;
745 : }
746 0 : break;
747 :
748 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_SID:
749 0 : ndr_print_ptr(ndr, "sid_value", r->sid_value);
750 0 : ndr->depth++;
751 0 : if (r->sid_value) {
752 0 : ndr_print_DATA_BLOB(ndr, "sid_value", *r->sid_value);
753 : }
754 0 : ndr->depth--;
755 0 : break;
756 :
757 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING:
758 0 : ndr_print_ptr(ndr, "octet_value", r->octet_value);
759 0 : ndr->depth++;
760 0 : if (r->octet_value) {
761 0 : ndr_print_DATA_BLOB(ndr, "octet_value", *r->octet_value);
762 : }
763 0 : ndr->depth--;
764 0 : break;
765 :
766 0 : case CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN:
767 0 : ndr_print_ptr(ndr, "uint_value", r->uint_value);
768 0 : ndr->depth++;
769 0 : if (r->uint_value) {
770 0 : ndr_print_hyper(ndr, "uint_value", *r->uint_value);
771 : }
772 0 : ndr->depth--;
773 0 : break;
774 :
775 0 : default:
776 0 : ndr_print_bad_level(ndr, name, level);
777 : }
778 0 : ndr->flags = _flags_save_UNION;
779 : }
780 0 : }
781 :
782 872 : _PUBLIC_ enum ndr_err_code ndr_push_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 *r)
783 : {
784 872 : uint32_t cntr_values_0;
785 872 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
786 872 : if (ndr_flags & NDR_SCALARS) {
787 487 : NDR_CHECK(ndr_push_align(ndr, 5));
788 : {
789 487 : libndr_flags _flags_save_string = ndr->flags;
790 487 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
791 487 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->name));
792 487 : ndr->flags = _flags_save_string;
793 : }
794 487 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->value_type));
795 487 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
796 487 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->value_count));
797 10140 : for (cntr_values_0 = 0; cntr_values_0 < (r->value_count); cntr_values_0++) {
798 9653 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->values[cntr_values_0], r->value_type));
799 9653 : NDR_CHECK(ndr_push_claim_values(ndr, NDR_SCALARS, &r->values[cntr_values_0]));
800 : }
801 487 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
802 : }
803 872 : if (ndr_flags & NDR_BUFFERS) {
804 : {
805 487 : libndr_flags _flags_save_string = ndr->flags;
806 487 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
807 487 : if (r->name) {
808 487 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->name));
809 487 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
810 487 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->name));
811 : }
812 487 : ndr->flags = _flags_save_string;
813 : }
814 10140 : for (cntr_values_0 = 0; cntr_values_0 < (r->value_count); cntr_values_0++) {
815 9653 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->values[cntr_values_0], r->value_type));
816 9653 : NDR_CHECK(ndr_push_claim_values(ndr, NDR_BUFFERS, &r->values[cntr_values_0]));
817 : }
818 : }
819 0 : return NDR_ERR_SUCCESS;
820 : }
821 :
822 258 : _PUBLIC_ enum ndr_err_code ndr_pull_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 *r)
823 : {
824 258 : uint32_t _ptr_name;
825 258 : TALLOC_CTX *_mem_save_name_0 = NULL;
826 258 : uint32_t size_values_0 = 0;
827 258 : uint32_t cntr_values_0;
828 258 : TALLOC_CTX *_mem_save_values_0 = NULL;
829 258 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
830 258 : if (ndr_flags & NDR_SCALARS) {
831 180 : NDR_CHECK(ndr_pull_align(ndr, 5));
832 : {
833 180 : libndr_flags _flags_save_string = ndr->flags;
834 180 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
835 180 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
836 180 : if (_ptr_name) {
837 180 : NDR_PULL_ALLOC(ndr, r->name);
838 180 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->name, _ptr_name));
839 : } else {
840 0 : r->name = NULL;
841 : }
842 180 : ndr->flags = _flags_save_string;
843 : }
844 180 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->value_type));
845 180 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
846 180 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_count));
847 180 : size_values_0 = r->value_count;
848 180 : NDR_PULL_ALLOC_N(ndr, r->values, size_values_0);
849 180 : _mem_save_values_0 = NDR_PULL_GET_MEM_CTX(ndr);
850 180 : NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
851 5988 : for (cntr_values_0 = 0; cntr_values_0 < (size_values_0); cntr_values_0++) {
852 5808 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->values[cntr_values_0], r->value_type));
853 5808 : NDR_CHECK(ndr_pull_claim_values(ndr, NDR_SCALARS, &r->values[cntr_values_0]));
854 : }
855 180 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_0, 0);
856 180 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
857 : }
858 258 : if (ndr_flags & NDR_BUFFERS) {
859 : {
860 180 : libndr_flags _flags_save_string = ndr->flags;
861 180 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
862 180 : if (r->name) {
863 180 : uint32_t _relative_save_offset;
864 180 : _relative_save_offset = ndr->offset;
865 180 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->name));
866 180 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
867 180 : NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
868 180 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
869 180 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
870 180 : if (ndr->offset > ndr->relative_highest_offset) {
871 180 : ndr->relative_highest_offset = ndr->offset;
872 : }
873 180 : ndr->offset = _relative_save_offset;
874 : }
875 180 : ndr->flags = _flags_save_string;
876 : }
877 180 : size_values_0 = r->value_count;
878 180 : _mem_save_values_0 = NDR_PULL_GET_MEM_CTX(ndr);
879 180 : NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
880 5988 : for (cntr_values_0 = 0; cntr_values_0 < (size_values_0); cntr_values_0++) {
881 5808 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->values[cntr_values_0], r->value_type));
882 5808 : NDR_CHECK(ndr_pull_claim_values(ndr, NDR_BUFFERS, &r->values[cntr_values_0]));
883 : }
884 180 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_0, 0);
885 180 : for (cntr_values_0 = 0; cntr_values_0 < (size_values_0); cntr_values_0++) {
886 : }
887 : }
888 0 : return NDR_ERR_SUCCESS;
889 : }
890 :
891 0 : static void ndr_print_flags_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 *r)
892 : {
893 0 : ndr_print_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, name, r);
894 0 : }
895 :
896 0 : _PUBLIC_ void ndr_print_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(struct ndr_print *ndr, const char *name, const struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 *r)
897 : {
898 0 : uint32_t cntr_values_0;
899 0 : ndr_print_struct(ndr, name, "CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1");
900 0 : if (r == NULL) { ndr_print_null(ndr); return; }
901 0 : ndr->depth++;
902 : {
903 0 : libndr_flags _flags_save_string = ndr->flags;
904 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
905 0 : ndr_print_ptr(ndr, "name", r->name);
906 0 : ndr->depth++;
907 0 : if (r->name) {
908 0 : ndr_print_string(ndr, "name", r->name);
909 : }
910 0 : ndr->depth--;
911 0 : ndr->flags = _flags_save_string;
912 : }
913 0 : ndr_print_uint16(ndr, "value_type", r->value_type);
914 0 : ndr_print_uint32(ndr, "flags", r->flags);
915 0 : ndr_print_uint32(ndr, "value_count", r->value_count);
916 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "values", (uint32_t)(r->value_count));
917 0 : ndr->depth++;
918 0 : for (cntr_values_0 = 0; cntr_values_0 < (r->value_count); cntr_values_0++) {
919 0 : ndr_print_set_switch_value(ndr, &r->values[cntr_values_0], r->value_type);
920 0 : ndr_print_claim_values(ndr, "values", &r->values[cntr_values_0]);
921 : }
922 0 : ndr->depth--;
923 0 : ndr->depth--;
924 : }
925 :
926 0 : _PUBLIC_ size_t ndr_size_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(const struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 *r, libndr_flags flags)
927 : {
928 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1);
929 : }
930 :
931 76699252 : _PUBLIC_ enum ndr_err_code ndr_push_security_ace_object_ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union security_ace_object_ctr *r)
932 : {
933 3086728 : uint32_t level;
934 76699252 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
935 76699252 : if (ndr_flags & NDR_SCALARS) {
936 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
937 38349626 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
938 38349626 : NDR_CHECK(ndr_push_union_align(ndr, 4));
939 38349626 : switch (level) {
940 21648298 : default: {
941 21648298 : NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object));
942 21109261 : break; }
943 :
944 15697001 : case false: {
945 15697001 : break; }
946 :
947 : }
948 : }
949 76699252 : if (ndr_flags & NDR_BUFFERS) {
950 38349626 : if (!(ndr_flags & NDR_SCALARS)) {
951 : /* We didn't get it above, and the token is not needed after this. */
952 38349626 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
953 : }
954 38349626 : switch (level) {
955 21648298 : default:
956 21648298 : NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_BUFFERS, &r->object));
957 21109261 : break;
958 :
959 15697001 : case false:
960 15697001 : break;
961 :
962 : }
963 : }
964 73612524 : return NDR_ERR_SUCCESS;
965 : }
966 :
967 359549412 : _PUBLIC_ enum ndr_err_code ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union security_ace_object_ctr *r)
968 : {
969 12938696 : uint32_t level;
970 359549412 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
971 359549412 : if (ndr_flags & NDR_SCALARS) {
972 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
973 179774706 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
974 179774706 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
975 179774706 : switch (level) {
976 121793039 : default: {
977 121793039 : NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
978 118363235 : break; }
979 :
980 54942123 : case false: {
981 54942123 : break; }
982 :
983 : }
984 : }
985 359549412 : if (ndr_flags & NDR_BUFFERS) {
986 179774706 : if (!(ndr_flags & NDR_SCALARS)) {
987 : /* We didn't get it above, and the token is not needed after this. */
988 179774706 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
989 : }
990 179774706 : switch (level) {
991 121793039 : default:
992 121793039 : NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
993 118363235 : break;
994 :
995 54942123 : case false:
996 54942123 : break;
997 :
998 : }
999 : }
1000 346610716 : return NDR_ERR_SUCCESS;
1001 : }
1002 :
1003 4458 : _PUBLIC_ void ndr_print_security_ace_object_ctr(struct ndr_print *ndr, const char *name, const union security_ace_object_ctr *r)
1004 : {
1005 72 : uint32_t level;
1006 4458 : level = ndr_print_steal_switch_value(ndr, r);
1007 4458 : ndr_print_union(ndr, name, level, "security_ace_object_ctr");
1008 4458 : switch (level) {
1009 0 : default:
1010 0 : ndr_print_security_ace_object(ndr, "object", &r->object);
1011 0 : break;
1012 :
1013 4386 : case false:
1014 4386 : break;
1015 :
1016 : }
1017 4458 : }
1018 :
1019 38349934 : _PUBLIC_ enum ndr_err_code ndr_push_security_ace_coda(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union security_ace_coda *r)
1020 : {
1021 1543672 : uint32_t level;
1022 38349934 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1023 38349934 : if (ndr_flags & NDR_SCALARS) {
1024 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1025 38349934 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1026 38349934 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1027 38349934 : switch (level) {
1028 762 : case SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK: {
1029 : {
1030 762 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1031 762 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1032 762 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->conditions));
1033 762 : ndr->flags = _flags_save_DATA_BLOB;
1034 : }
1035 762 : break; }
1036 :
1037 311 : case SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK: {
1038 : {
1039 311 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1040 311 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1041 311 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->conditions));
1042 311 : ndr->flags = _flags_save_DATA_BLOB;
1043 : }
1044 311 : break; }
1045 :
1046 0 : case SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK_OBJECT: {
1047 : {
1048 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1049 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1050 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->conditions));
1051 0 : ndr->flags = _flags_save_DATA_BLOB;
1052 : }
1053 0 : break; }
1054 :
1055 0 : case SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK_OBJECT: {
1056 : {
1057 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1058 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1059 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->conditions));
1060 0 : ndr->flags = _flags_save_DATA_BLOB;
1061 : }
1062 0 : break; }
1063 :
1064 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK: {
1065 : {
1066 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1067 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1068 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->conditions));
1069 0 : ndr->flags = _flags_save_DATA_BLOB;
1070 : }
1071 0 : break; }
1072 :
1073 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK_OBJECT: {
1074 : {
1075 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1076 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1077 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->conditions));
1078 0 : ndr->flags = _flags_save_DATA_BLOB;
1079 : }
1080 0 : break; }
1081 :
1082 385 : case SEC_ACE_TYPE_SYSTEM_RESOURCE_ATTRIBUTE: {
1083 385 : NDR_CHECK(ndr_push_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_SCALARS, &r->claim));
1084 0 : break; }
1085 :
1086 38348476 : default: {
1087 : {
1088 38348476 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1089 38348476 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1090 38348476 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->ignored));
1091 38348476 : ndr->flags = _flags_save_DATA_BLOB;
1092 : }
1093 38348476 : break; }
1094 :
1095 : }
1096 : }
1097 38349934 : if (ndr_flags & NDR_BUFFERS) {
1098 38349934 : if (!(ndr_flags & NDR_SCALARS)) {
1099 : /* We didn't get it above, and the token is not needed after this. */
1100 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1101 : }
1102 38349934 : switch (level) {
1103 485 : case SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK:
1104 485 : break;
1105 :
1106 234 : case SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK:
1107 234 : break;
1108 :
1109 0 : case SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK_OBJECT:
1110 0 : break;
1111 :
1112 0 : case SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK_OBJECT:
1113 0 : break;
1114 :
1115 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK:
1116 0 : break;
1117 :
1118 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK_OBJECT:
1119 0 : break;
1120 :
1121 385 : case SEC_ACE_TYPE_SYSTEM_RESOURCE_ATTRIBUTE:
1122 385 : NDR_CHECK(ndr_push_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_BUFFERS, &r->claim));
1123 0 : break;
1124 :
1125 36805543 : default:
1126 36805543 : break;
1127 :
1128 : }
1129 : }
1130 36806262 : return NDR_ERR_SUCCESS;
1131 : }
1132 :
1133 179774706 : _PUBLIC_ enum ndr_err_code ndr_pull_security_ace_coda(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union security_ace_coda *r)
1134 : {
1135 6469348 : uint32_t level;
1136 179774706 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1137 179774706 : if (ndr_flags & NDR_SCALARS) {
1138 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1139 179774706 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1140 179774706 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
1141 179774706 : switch (level) {
1142 1117 : case SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK: {
1143 : {
1144 1117 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1145 1117 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1146 1117 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->conditions));
1147 1117 : ndr->flags = _flags_save_DATA_BLOB;
1148 : }
1149 1117 : break; }
1150 :
1151 457 : case SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK: {
1152 : {
1153 457 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1154 457 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1155 457 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->conditions));
1156 457 : ndr->flags = _flags_save_DATA_BLOB;
1157 : }
1158 457 : break; }
1159 :
1160 0 : case SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK_OBJECT: {
1161 : {
1162 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1163 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1164 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->conditions));
1165 0 : ndr->flags = _flags_save_DATA_BLOB;
1166 : }
1167 0 : break; }
1168 :
1169 0 : case SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK_OBJECT: {
1170 : {
1171 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1172 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1173 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->conditions));
1174 0 : ndr->flags = _flags_save_DATA_BLOB;
1175 : }
1176 0 : break; }
1177 :
1178 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK: {
1179 : {
1180 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1181 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1182 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->conditions));
1183 0 : ndr->flags = _flags_save_DATA_BLOB;
1184 : }
1185 0 : break; }
1186 :
1187 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK_OBJECT: {
1188 : {
1189 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1190 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1191 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->conditions));
1192 0 : ndr->flags = _flags_save_DATA_BLOB;
1193 : }
1194 0 : break; }
1195 :
1196 78 : case SEC_ACE_TYPE_SYSTEM_RESOURCE_ATTRIBUTE: {
1197 78 : NDR_CHECK(ndr_pull_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_SCALARS, &r->claim));
1198 0 : break; }
1199 :
1200 179773054 : default: {
1201 : {
1202 179773054 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1203 179773054 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1204 179773054 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->ignored));
1205 179773054 : ndr->flags = _flags_save_DATA_BLOB;
1206 : }
1207 179773054 : break; }
1208 :
1209 : }
1210 : }
1211 179774706 : if (ndr_flags & NDR_BUFFERS) {
1212 179774706 : if (!(ndr_flags & NDR_SCALARS)) {
1213 : /* We didn't get it above, and the token is not needed after this. */
1214 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1215 : }
1216 179774706 : switch (level) {
1217 839 : case SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK:
1218 839 : break;
1219 :
1220 380 : case SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK:
1221 380 : break;
1222 :
1223 0 : case SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK_OBJECT:
1224 0 : break;
1225 :
1226 0 : case SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK_OBJECT:
1227 0 : break;
1228 :
1229 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK:
1230 0 : break;
1231 :
1232 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK_OBJECT:
1233 0 : break;
1234 :
1235 78 : case SEC_ACE_TYPE_SYSTEM_RESOURCE_ATTRIBUTE:
1236 78 : NDR_CHECK(ndr_pull_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_BUFFERS, &r->claim));
1237 0 : break;
1238 :
1239 173304139 : default:
1240 173304139 : break;
1241 :
1242 : }
1243 : }
1244 173305358 : return NDR_ERR_SUCCESS;
1245 : }
1246 :
1247 4458 : _PUBLIC_ void ndr_print_security_ace_coda(struct ndr_print *ndr, const char *name, const union security_ace_coda *r)
1248 : {
1249 72 : uint32_t level;
1250 4458 : level = ndr_print_steal_switch_value(ndr, r);
1251 4458 : ndr_print_union(ndr, name, level, "security_ace_coda");
1252 4458 : switch (level) {
1253 0 : case SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK:
1254 : {
1255 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1256 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1257 0 : ndr_print_DATA_BLOB(ndr, "conditions", r->conditions);
1258 0 : ndr->flags = _flags_save_DATA_BLOB;
1259 : }
1260 0 : break;
1261 :
1262 0 : case SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK:
1263 : {
1264 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1265 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1266 0 : ndr_print_DATA_BLOB(ndr, "conditions", r->conditions);
1267 0 : ndr->flags = _flags_save_DATA_BLOB;
1268 : }
1269 0 : break;
1270 :
1271 0 : case SEC_ACE_TYPE_ACCESS_ALLOWED_CALLBACK_OBJECT:
1272 : {
1273 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1274 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1275 0 : ndr_print_DATA_BLOB(ndr, "conditions", r->conditions);
1276 0 : ndr->flags = _flags_save_DATA_BLOB;
1277 : }
1278 0 : break;
1279 :
1280 0 : case SEC_ACE_TYPE_ACCESS_DENIED_CALLBACK_OBJECT:
1281 : {
1282 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1283 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1284 0 : ndr_print_DATA_BLOB(ndr, "conditions", r->conditions);
1285 0 : ndr->flags = _flags_save_DATA_BLOB;
1286 : }
1287 0 : break;
1288 :
1289 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK:
1290 : {
1291 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1292 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1293 0 : ndr_print_DATA_BLOB(ndr, "conditions", r->conditions);
1294 0 : ndr->flags = _flags_save_DATA_BLOB;
1295 : }
1296 0 : break;
1297 :
1298 0 : case SEC_ACE_TYPE_SYSTEM_AUDIT_CALLBACK_OBJECT:
1299 : {
1300 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1301 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1302 0 : ndr_print_DATA_BLOB(ndr, "conditions", r->conditions);
1303 0 : ndr->flags = _flags_save_DATA_BLOB;
1304 : }
1305 0 : break;
1306 :
1307 0 : case SEC_ACE_TYPE_SYSTEM_RESOURCE_ATTRIBUTE:
1308 0 : ndr_print_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, "claim", &r->claim);
1309 0 : break;
1310 :
1311 4458 : default:
1312 : {
1313 4458 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
1314 4458 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1315 4458 : ndr_print_DATA_BLOB(ndr, "ignored", r->ignored);
1316 4458 : ndr->flags = _flags_save_DATA_BLOB;
1317 : }
1318 4458 : break;
1319 :
1320 : }
1321 4458 : }
1322 :
1323 308 : _PUBLIC_ size_t ndr_size_security_ace_coda(const union security_ace_coda *r, uint32_t level, libndr_flags flags)
1324 : {
1325 308 : return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_security_ace_coda);
1326 : }
1327 :
1328 76699252 : _PUBLIC_ enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct security_ace *r)
1329 : {
1330 76699252 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1331 76699252 : if (ndr_flags & NDR_SCALARS) {
1332 38349626 : NDR_CHECK(ndr_push_align(ndr, 5));
1333 38349626 : NDR_CHECK(ndr_push_security_ace_type(ndr, NDR_SCALARS, r->type));
1334 38349626 : NDR_CHECK(ndr_push_security_ace_flags(ndr, NDR_SCALARS, r->flags));
1335 38349626 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_security_ace(r, ndr->flags)));
1336 38349626 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->access_mask));
1337 38349626 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, sec_ace_object(r->type)));
1338 38349626 : NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_SCALARS, &r->object));
1339 38349626 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->trustee));
1340 : {
1341 1543364 : struct ndr_push *_ndr_coda;
1342 38349626 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_coda, 0, ndr_subcontext_size_of_ace_coda(r, ndr_size_security_ace(r, ndr->flags), ndr->flags)));
1343 38349626 : NDR_CHECK(ndr_push_set_switch_value(_ndr_coda, &r->coda, r->type));
1344 38349626 : NDR_CHECK(ndr_push_security_ace_coda(_ndr_coda, NDR_SCALARS|NDR_BUFFERS, &r->coda));
1345 38349626 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_coda, 0, ndr_subcontext_size_of_ace_coda(r, ndr_size_security_ace(r, ndr->flags), ndr->flags)));
1346 : }
1347 38349626 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1348 : }
1349 76699252 : if (ndr_flags & NDR_BUFFERS) {
1350 38349626 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, sec_ace_object(r->type)));
1351 38349626 : NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_BUFFERS, &r->object));
1352 : }
1353 73612524 : return NDR_ERR_SUCCESS;
1354 : }
1355 :
1356 359549412 : _PUBLIC_ enum ndr_err_code ndr_pull_security_ace(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct security_ace *r)
1357 : {
1358 359549412 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1359 359549412 : if (ndr_flags & NDR_SCALARS) {
1360 179774706 : NDR_CHECK(ndr_pull_align(ndr, 5));
1361 179774706 : NDR_CHECK(ndr_pull_security_ace_type(ndr, NDR_SCALARS, &r->type));
1362 179774706 : NDR_CHECK(ndr_pull_security_ace_flags(ndr, NDR_SCALARS, &r->flags));
1363 179774706 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
1364 179774706 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->access_mask));
1365 179774706 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, sec_ace_object(r->type)));
1366 179774706 : NDR_CHECK(ndr_pull_security_ace_object_ctr(ndr, NDR_SCALARS, &r->object));
1367 179774706 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->trustee));
1368 : {
1369 6469348 : struct ndr_pull *_ndr_coda;
1370 179774706 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_coda, 0, ndr_subcontext_size_of_ace_coda(r, r->size, ndr->flags)));
1371 179774706 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_coda, &r->coda, r->type));
1372 179774706 : NDR_CHECK(ndr_pull_security_ace_coda(_ndr_coda, NDR_SCALARS|NDR_BUFFERS, &r->coda));
1373 179774706 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_coda, 0, ndr_subcontext_size_of_ace_coda(r, r->size, ndr->flags)));
1374 : }
1375 179774706 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1376 : }
1377 359549412 : if (ndr_flags & NDR_BUFFERS) {
1378 179774706 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, sec_ace_object(r->type)));
1379 179774706 : NDR_CHECK(ndr_pull_security_ace_object_ctr(ndr, NDR_BUFFERS, &r->object));
1380 : }
1381 346610716 : return NDR_ERR_SUCCESS;
1382 : }
1383 :
1384 0 : static void ndr_print_flags_security_ace(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct security_ace *r)
1385 : {
1386 0 : ndr_print_security_ace(ndr, name, r);
1387 0 : }
1388 :
1389 4458 : _PUBLIC_ void ndr_print_security_ace(struct ndr_print *ndr, const char *name, const struct security_ace *r)
1390 : {
1391 4458 : ndr_print_struct(ndr, name, "security_ace");
1392 4458 : if (r == NULL) { ndr_print_null(ndr); return; }
1393 4458 : ndr->depth++;
1394 4458 : ndr_print_security_ace_type(ndr, "type", r->type);
1395 4458 : ndr_print_security_ace_flags(ndr, "flags", r->flags);
1396 4458 : ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_ace(r, ndr->flags):r->size);
1397 4458 : ndr_print_uint32(ndr, "access_mask", r->access_mask);
1398 4458 : ndr_print_set_switch_value(ndr, &r->object, sec_ace_object(r->type));
1399 4458 : ndr_print_security_ace_object_ctr(ndr, "object", &r->object);
1400 4458 : ndr_print_dom_sid(ndr, "trustee", &r->trustee);
1401 4458 : ndr_print_set_switch_value(ndr, &r->coda, r->type);
1402 4458 : ndr_print_security_ace_coda(ndr, "coda", &r->coda);
1403 4458 : ndr->depth--;
1404 : }
1405 :
1406 5271258 : static enum ndr_err_code ndr_push_security_acl_revision(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum security_acl_revision r)
1407 : {
1408 5271258 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1409 4965203 : return NDR_ERR_SUCCESS;
1410 : }
1411 :
1412 16518119 : static enum ndr_err_code ndr_pull_security_acl_revision(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum security_acl_revision *r)
1413 : {
1414 805017 : uint16_t v;
1415 16518119 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1416 16518119 : *r = v;
1417 16518119 : return NDR_ERR_SUCCESS;
1418 : }
1419 :
1420 3520 : _PUBLIC_ void ndr_print_security_acl_revision(struct ndr_print *ndr, const char *name, enum security_acl_revision r)
1421 : {
1422 3520 : const char *val = NULL;
1423 :
1424 3520 : switch (r) {
1425 3518 : case SECURITY_ACL_REVISION_NT4: val = "SECURITY_ACL_REVISION_NT4"; break;
1426 2 : case SECURITY_ACL_REVISION_ADS: val = "SECURITY_ACL_REVISION_ADS"; break;
1427 : }
1428 3520 : ndr_print_enum(ndr, name, "ENUM", val, r);
1429 3520 : }
1430 :
1431 5271258 : _PUBLIC_ enum ndr_err_code ndr_push_security_acl(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct security_acl *r)
1432 : {
1433 306055 : uint32_t cntr_aces_0;
1434 5271258 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1435 5271258 : if (ndr_flags & NDR_SCALARS) {
1436 5271258 : NDR_CHECK(ndr_push_align(ndr, 5));
1437 5577313 : NDR_CHECK(ndr_push_security_acl_revision(ndr, NDR_SCALARS, r->revision));
1438 5271258 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_security_acl(r, ndr->flags)));
1439 5271258 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_aces));
1440 43620884 : for (cntr_aces_0 = 0; cntr_aces_0 < (r->num_aces); cntr_aces_0++) {
1441 38349626 : NDR_CHECK(ndr_push_security_ace(ndr, NDR_SCALARS, &r->aces[cntr_aces_0]));
1442 : }
1443 5271258 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1444 : }
1445 5271258 : if (ndr_flags & NDR_BUFFERS) {
1446 43620884 : for (cntr_aces_0 = 0; cntr_aces_0 < (r->num_aces); cntr_aces_0++) {
1447 38349626 : NDR_CHECK(ndr_push_security_ace(ndr, NDR_BUFFERS, &r->aces[cntr_aces_0]));
1448 : }
1449 : }
1450 4965203 : return NDR_ERR_SUCCESS;
1451 : }
1452 :
1453 16518119 : _PUBLIC_ enum ndr_err_code ndr_pull_security_acl(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct security_acl *r)
1454 : {
1455 16518119 : uint32_t size_aces_0 = 0;
1456 805017 : uint32_t cntr_aces_0;
1457 16518119 : TALLOC_CTX *_mem_save_aces_0 = NULL;
1458 16518119 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1459 16518119 : if (ndr_flags & NDR_SCALARS) {
1460 16518119 : NDR_CHECK(ndr_pull_align(ndr, 5));
1461 17323136 : NDR_CHECK(ndr_pull_security_acl_revision(ndr, NDR_SCALARS, &r->revision));
1462 16518119 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
1463 16518119 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aces));
1464 16518119 : if (r->num_aces > 2000) {
1465 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_aces), (uint32_t)(0), (uint32_t)(2000));
1466 : }
1467 16518119 : size_aces_0 = r->num_aces;
1468 16518119 : NDR_PULL_ALLOC_N(ndr, r->aces, size_aces_0);
1469 16518119 : _mem_save_aces_0 = NDR_PULL_GET_MEM_CTX(ndr);
1470 16518119 : NDR_PULL_SET_MEM_CTX(ndr, r->aces, 0);
1471 196292825 : for (cntr_aces_0 = 0; cntr_aces_0 < (size_aces_0); cntr_aces_0++) {
1472 179774706 : NDR_CHECK(ndr_pull_security_ace(ndr, NDR_SCALARS, &r->aces[cntr_aces_0]));
1473 : }
1474 16518119 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aces_0, 0);
1475 16518119 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1476 : }
1477 16518119 : if (ndr_flags & NDR_BUFFERS) {
1478 16518119 : size_aces_0 = r->num_aces;
1479 16518119 : _mem_save_aces_0 = NDR_PULL_GET_MEM_CTX(ndr);
1480 16518119 : NDR_PULL_SET_MEM_CTX(ndr, r->aces, 0);
1481 196292825 : for (cntr_aces_0 = 0; cntr_aces_0 < (size_aces_0); cntr_aces_0++) {
1482 179774706 : NDR_CHECK(ndr_pull_security_ace(ndr, NDR_BUFFERS, &r->aces[cntr_aces_0]));
1483 : }
1484 16518119 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aces_0, 0);
1485 189823477 : for (cntr_aces_0 = 0; cntr_aces_0 < (size_aces_0); cntr_aces_0++) {
1486 : }
1487 : }
1488 15713102 : return NDR_ERR_SUCCESS;
1489 : }
1490 :
1491 0 : static void ndr_print_flags_security_acl(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct security_acl *r)
1492 : {
1493 0 : ndr_print_security_acl(ndr, name, r);
1494 0 : }
1495 :
1496 3520 : _PUBLIC_ void ndr_print_security_acl(struct ndr_print *ndr, const char *name, const struct security_acl *r)
1497 : {
1498 17 : uint32_t cntr_aces_0;
1499 3520 : ndr_print_struct(ndr, name, "security_acl");
1500 3520 : if (r == NULL) { ndr_print_null(ndr); return; }
1501 3520 : ndr->depth++;
1502 3520 : ndr_print_security_acl_revision(ndr, "revision", r->revision);
1503 3520 : ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_acl(r, ndr->flags):r->size);
1504 3520 : ndr_print_uint32(ndr, "num_aces", r->num_aces);
1505 3520 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "aces", (uint32_t)(r->num_aces));
1506 3520 : ndr->depth++;
1507 7978 : for (cntr_aces_0 = 0; cntr_aces_0 < (r->num_aces); cntr_aces_0++) {
1508 4458 : ndr_print_security_ace(ndr, "aces", &r->aces[cntr_aces_0]);
1509 : }
1510 3520 : ndr->depth--;
1511 3520 : ndr->depth--;
1512 : }
1513 :
1514 3311264 : _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor_revision(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum security_descriptor_revision r)
1515 : {
1516 3311264 : NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
1517 3102785 : return NDR_ERR_SUCCESS;
1518 : }
1519 :
1520 9959081 : _PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor_revision(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum security_descriptor_revision *r)
1521 : {
1522 549752 : uint8_t v;
1523 9959081 : NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
1524 9959081 : *r = v;
1525 9959081 : return NDR_ERR_SUCCESS;
1526 : }
1527 :
1528 3552 : _PUBLIC_ void ndr_print_security_descriptor_revision(struct ndr_print *ndr, const char *name, enum security_descriptor_revision r)
1529 : {
1530 3552 : const char *val = NULL;
1531 :
1532 3552 : switch (r) {
1533 3552 : case SECURITY_DESCRIPTOR_REVISION_1: val = "SECURITY_DESCRIPTOR_REVISION_1"; break;
1534 : }
1535 3552 : ndr_print_enum(ndr, name, "ENUM", val, r);
1536 3552 : }
1537 :
1538 3311264 : _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor_type(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint16_t r)
1539 : {
1540 3311264 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1541 3102785 : return NDR_ERR_SUCCESS;
1542 : }
1543 :
1544 9959081 : _PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor_type(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint16_t *r)
1545 : {
1546 549752 : uint16_t v;
1547 9959081 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1548 9959081 : *r = v;
1549 9959081 : return NDR_ERR_SUCCESS;
1550 : }
1551 :
1552 3552 : _PUBLIC_ void ndr_print_security_descriptor_type(struct ndr_print *ndr, const char *name, uint16_t r)
1553 : {
1554 3552 : ndr_print_uint16(ndr, name, r);
1555 3552 : ndr->depth++;
1556 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_OWNER_DEFAULTED", SEC_DESC_OWNER_DEFAULTED, r);
1557 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_GROUP_DEFAULTED", SEC_DESC_GROUP_DEFAULTED, r);
1558 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_PRESENT", SEC_DESC_DACL_PRESENT, r);
1559 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_DEFAULTED", SEC_DESC_DACL_DEFAULTED, r);
1560 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_PRESENT", SEC_DESC_SACL_PRESENT, r);
1561 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_DEFAULTED", SEC_DESC_SACL_DEFAULTED, r);
1562 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_TRUSTED", SEC_DESC_DACL_TRUSTED, r);
1563 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SERVER_SECURITY", SEC_DESC_SERVER_SECURITY, r);
1564 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_AUTO_INHERIT_REQ", SEC_DESC_DACL_AUTO_INHERIT_REQ, r);
1565 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_AUTO_INHERIT_REQ", SEC_DESC_SACL_AUTO_INHERIT_REQ, r);
1566 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_AUTO_INHERITED", SEC_DESC_DACL_AUTO_INHERITED, r);
1567 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_AUTO_INHERITED", SEC_DESC_SACL_AUTO_INHERITED, r);
1568 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_PROTECTED", SEC_DESC_DACL_PROTECTED, r);
1569 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_PROTECTED", SEC_DESC_SACL_PROTECTED, r);
1570 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_RM_CONTROL_VALID", SEC_DESC_RM_CONTROL_VALID, r);
1571 3552 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SELF_RELATIVE", SEC_DESC_SELF_RELATIVE, r);
1572 3552 : ndr->depth--;
1573 3552 : }
1574 :
1575 3309104 : _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct security_descriptor *r)
1576 : {
1577 : {
1578 3309104 : libndr_flags _flags_save_STRUCT = ndr->flags;
1579 3309104 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
1580 3309104 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1581 3309104 : if (ndr_flags & NDR_SCALARS) {
1582 3309104 : NDR_CHECK(ndr_push_align(ndr, 5));
1583 3309104 : NDR_CHECK(ndr_push_security_descriptor_revision(ndr, NDR_SCALARS, r->revision));
1584 3309104 : NDR_CHECK(ndr_push_security_descriptor_type(ndr, NDR_SCALARS, r->type));
1585 3309104 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->owner_sid));
1586 3309104 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->group_sid));
1587 3309104 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sacl));
1588 3309104 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dacl));
1589 3309104 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1590 : }
1591 3309104 : if (ndr_flags & NDR_BUFFERS) {
1592 3309104 : if (r->owner_sid) {
1593 3268887 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->owner_sid));
1594 3268887 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->owner_sid));
1595 3268887 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->owner_sid));
1596 : }
1597 3309104 : if (r->group_sid) {
1598 3248047 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->group_sid));
1599 3248047 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->group_sid));
1600 3248047 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->group_sid));
1601 : }
1602 3309104 : if (r->sacl) {
1603 1963976 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->sacl));
1604 1963976 : NDR_CHECK(ndr_push_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->sacl));
1605 1963976 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->sacl));
1606 : }
1607 3309104 : if (r->dacl) {
1608 3298922 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->dacl));
1609 3298922 : NDR_CHECK(ndr_push_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->dacl));
1610 3298922 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->dacl));
1611 : }
1612 : }
1613 3309104 : ndr->flags = _flags_save_STRUCT;
1614 : }
1615 3309104 : return NDR_ERR_SUCCESS;
1616 : }
1617 :
1618 9959081 : _PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct security_descriptor *r)
1619 : {
1620 549752 : uint32_t _ptr_owner_sid;
1621 9959081 : TALLOC_CTX *_mem_save_owner_sid_0 = NULL;
1622 549752 : uint32_t _ptr_group_sid;
1623 9959081 : TALLOC_CTX *_mem_save_group_sid_0 = NULL;
1624 549752 : uint32_t _ptr_sacl;
1625 9959081 : TALLOC_CTX *_mem_save_sacl_0 = NULL;
1626 549752 : uint32_t _ptr_dacl;
1627 9959081 : TALLOC_CTX *_mem_save_dacl_0 = NULL;
1628 : {
1629 9959081 : libndr_flags _flags_save_STRUCT = ndr->flags;
1630 9959081 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
1631 9959081 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1632 9959081 : if (ndr_flags & NDR_SCALARS) {
1633 9959081 : NDR_CHECK(ndr_pull_align(ndr, 5));
1634 9959081 : NDR_CHECK(ndr_pull_security_descriptor_revision(ndr, NDR_SCALARS, &r->revision));
1635 9959081 : NDR_CHECK(ndr_pull_security_descriptor_type(ndr, NDR_SCALARS, &r->type));
1636 9959081 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_owner_sid));
1637 9959081 : if (_ptr_owner_sid) {
1638 9902093 : NDR_PULL_ALLOC(ndr, r->owner_sid);
1639 9902093 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->owner_sid, _ptr_owner_sid));
1640 : } else {
1641 56988 : r->owner_sid = NULL;
1642 : }
1643 9959081 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_sid));
1644 9959081 : if (_ptr_group_sid) {
1645 9880282 : NDR_PULL_ALLOC(ndr, r->group_sid);
1646 9880282 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->group_sid, _ptr_group_sid));
1647 : } else {
1648 78799 : r->group_sid = NULL;
1649 : }
1650 9959081 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sacl));
1651 9959081 : if (_ptr_sacl) {
1652 6570252 : NDR_PULL_ALLOC(ndr, r->sacl);
1653 6570252 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sacl, _ptr_sacl));
1654 : } else {
1655 3388829 : r->sacl = NULL;
1656 : }
1657 9959081 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dacl));
1658 9959081 : if (_ptr_dacl) {
1659 9941667 : NDR_PULL_ALLOC(ndr, r->dacl);
1660 9941667 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dacl, _ptr_dacl));
1661 : } else {
1662 17414 : r->dacl = NULL;
1663 : }
1664 9959081 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1665 : }
1666 9959081 : if (ndr_flags & NDR_BUFFERS) {
1667 9959081 : if (r->owner_sid) {
1668 544909 : uint32_t _relative_save_offset;
1669 9902093 : _relative_save_offset = ndr->offset;
1670 9902093 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->owner_sid));
1671 9902093 : _mem_save_owner_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1672 9902093 : NDR_PULL_SET_MEM_CTX(ndr, r->owner_sid, 0);
1673 9902093 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->owner_sid));
1674 9902093 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_owner_sid_0, 0);
1675 9902093 : if (ndr->offset > ndr->relative_highest_offset) {
1676 9902093 : ndr->relative_highest_offset = ndr->offset;
1677 : }
1678 9902093 : ndr->offset = _relative_save_offset;
1679 : }
1680 9959081 : if (r->group_sid) {
1681 544774 : uint32_t _relative_save_offset;
1682 9880282 : _relative_save_offset = ndr->offset;
1683 9880282 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->group_sid));
1684 9880282 : _mem_save_group_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1685 9880282 : NDR_PULL_SET_MEM_CTX(ndr, r->group_sid, 0);
1686 9880282 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->group_sid));
1687 9880282 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_sid_0, 0);
1688 9880282 : if (ndr->offset > ndr->relative_highest_offset) {
1689 9880282 : ndr->relative_highest_offset = ndr->offset;
1690 : }
1691 9880282 : ndr->offset = _relative_save_offset;
1692 : }
1693 9959081 : if (r->sacl) {
1694 255285 : uint32_t _relative_save_offset;
1695 6570252 : _relative_save_offset = ndr->offset;
1696 6570252 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sacl));
1697 6570252 : _mem_save_sacl_0 = NDR_PULL_GET_MEM_CTX(ndr);
1698 6570252 : NDR_PULL_SET_MEM_CTX(ndr, r->sacl, 0);
1699 6570252 : NDR_CHECK(ndr_pull_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->sacl));
1700 6570252 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sacl_0, 0);
1701 6570252 : if (ndr->offset > ndr->relative_highest_offset) {
1702 6566206 : ndr->relative_highest_offset = ndr->offset;
1703 : }
1704 6570252 : ndr->offset = _relative_save_offset;
1705 : }
1706 9959081 : if (r->dacl) {
1707 549556 : uint32_t _relative_save_offset;
1708 9941667 : _relative_save_offset = ndr->offset;
1709 9941667 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dacl));
1710 9941667 : _mem_save_dacl_0 = NDR_PULL_GET_MEM_CTX(ndr);
1711 9941667 : NDR_PULL_SET_MEM_CTX(ndr, r->dacl, 0);
1712 9941667 : NDR_CHECK(ndr_pull_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->dacl));
1713 9941667 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dacl_0, 0);
1714 9941667 : if (ndr->offset > ndr->relative_highest_offset) {
1715 9934364 : ndr->relative_highest_offset = ndr->offset;
1716 : }
1717 9941667 : ndr->offset = _relative_save_offset;
1718 : }
1719 : }
1720 9959081 : ndr->flags = _flags_save_STRUCT;
1721 : }
1722 9959081 : return NDR_ERR_SUCCESS;
1723 : }
1724 :
1725 0 : static void ndr_print_flags_security_descriptor(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct security_descriptor *r)
1726 : {
1727 0 : ndr_print_security_descriptor(ndr, name, r);
1728 0 : }
1729 :
1730 3552 : _PUBLIC_ void ndr_print_security_descriptor(struct ndr_print *ndr, const char *name, const struct security_descriptor *r)
1731 : {
1732 3552 : ndr_print_struct(ndr, name, "security_descriptor");
1733 3552 : if (r == NULL) { ndr_print_null(ndr); return; }
1734 : {
1735 3552 : libndr_flags _flags_save_STRUCT = ndr->flags;
1736 3552 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
1737 3552 : ndr->depth++;
1738 3552 : ndr_print_security_descriptor_revision(ndr, "revision", r->revision);
1739 3552 : ndr_print_security_descriptor_type(ndr, "type", r->type);
1740 3552 : ndr_print_ptr(ndr, "owner_sid", r->owner_sid);
1741 3552 : ndr->depth++;
1742 3552 : if (r->owner_sid) {
1743 3342 : ndr_print_dom_sid(ndr, "owner_sid", r->owner_sid);
1744 : }
1745 3552 : ndr->depth--;
1746 3552 : ndr_print_ptr(ndr, "group_sid", r->group_sid);
1747 3552 : ndr->depth++;
1748 3552 : if (r->group_sid) {
1749 80 : ndr_print_dom_sid(ndr, "group_sid", r->group_sid);
1750 : }
1751 3552 : ndr->depth--;
1752 3552 : ndr_print_ptr(ndr, "sacl", r->sacl);
1753 3552 : ndr->depth++;
1754 3552 : if (r->sacl) {
1755 0 : ndr_print_security_acl(ndr, "sacl", r->sacl);
1756 : }
1757 3552 : ndr->depth--;
1758 3552 : ndr_print_ptr(ndr, "dacl", r->dacl);
1759 3552 : ndr->depth++;
1760 3552 : if (r->dacl) {
1761 3520 : ndr_print_security_acl(ndr, "dacl", r->dacl);
1762 : }
1763 3552 : ndr->depth--;
1764 3552 : ndr->depth--;
1765 3552 : ndr->flags = _flags_save_STRUCT;
1766 : }
1767 : }
1768 :
1769 2502 : _PUBLIC_ enum ndr_err_code ndr_push_sec_desc_buf(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct sec_desc_buf *r)
1770 : {
1771 2502 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1772 2502 : if (ndr_flags & NDR_SCALARS) {
1773 1808 : NDR_CHECK(ndr_push_align(ndr, 5));
1774 1808 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_security_descriptor(r->sd, ndr->flags)));
1775 1808 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd));
1776 1808 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1777 : }
1778 2502 : if (ndr_flags & NDR_BUFFERS) {
1779 1808 : if (r->sd) {
1780 : {
1781 20 : struct ndr_push *_ndr_sd;
1782 1050 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sd, 4, -1));
1783 1050 : NDR_CHECK(ndr_push_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd));
1784 1050 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sd, 4, -1));
1785 : }
1786 : }
1787 : }
1788 2482 : return NDR_ERR_SUCCESS;
1789 : }
1790 :
1791 4826 : _PUBLIC_ enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct sec_desc_buf *r)
1792 : {
1793 24 : uint32_t _ptr_sd;
1794 4826 : TALLOC_CTX *_mem_save_sd_0 = NULL;
1795 4826 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1796 4826 : if (ndr_flags & NDR_SCALARS) {
1797 2974 : NDR_CHECK(ndr_pull_align(ndr, 5));
1798 2974 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sd_size));
1799 2974 : if (r->sd_size > 262144) {
1800 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->sd_size), (uint32_t)(0), (uint32_t)(262144));
1801 : }
1802 2974 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd));
1803 2974 : if (_ptr_sd) {
1804 2252 : NDR_PULL_ALLOC(ndr, r->sd);
1805 : } else {
1806 722 : r->sd = NULL;
1807 : }
1808 2974 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1809 : }
1810 4826 : if (ndr_flags & NDR_BUFFERS) {
1811 2974 : if (r->sd) {
1812 2252 : _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
1813 2252 : NDR_PULL_SET_MEM_CTX(ndr, r->sd, 0);
1814 : {
1815 20 : struct ndr_pull *_ndr_sd;
1816 2252 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sd, 4, -1));
1817 2252 : NDR_CHECK(ndr_pull_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd));
1818 2252 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sd, 4, -1));
1819 : }
1820 2252 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, 0);
1821 : }
1822 : }
1823 4802 : return NDR_ERR_SUCCESS;
1824 : }
1825 :
1826 0 : static void ndr_print_flags_sec_desc_buf(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct sec_desc_buf *r)
1827 : {
1828 0 : ndr_print_sec_desc_buf(ndr, name, r);
1829 0 : }
1830 :
1831 118 : _PUBLIC_ void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name, const struct sec_desc_buf *r)
1832 : {
1833 118 : ndr_print_struct(ndr, name, "sec_desc_buf");
1834 118 : if (r == NULL) { ndr_print_null(ndr); return; }
1835 118 : ndr->depth++;
1836 118 : ndr_print_uint32(ndr, "sd_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_descriptor(r->sd, ndr->flags):r->sd_size);
1837 118 : ndr_print_ptr(ndr, "sd", r->sd);
1838 118 : ndr->depth++;
1839 118 : if (r->sd) {
1840 36 : ndr_print_security_descriptor(ndr, "sd", r->sd);
1841 : }
1842 118 : ndr->depth--;
1843 118 : ndr->depth--;
1844 : }
1845 :
1846 600036 : _PUBLIC_ enum ndr_err_code ndr_push_security_GroupAttrs(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
1847 : {
1848 600036 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1849 570781 : return NDR_ERR_SUCCESS;
1850 : }
1851 :
1852 703190 : _PUBLIC_ enum ndr_err_code ndr_pull_security_GroupAttrs(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
1853 : {
1854 25285 : uint32_t v;
1855 703190 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1856 703190 : *r = v;
1857 703190 : return NDR_ERR_SUCCESS;
1858 : }
1859 :
1860 21484 : _PUBLIC_ void ndr_print_security_GroupAttrs(struct ndr_print *ndr, const char *name, uint32_t r)
1861 : {
1862 21484 : ndr_print_uint32(ndr, name, r);
1863 21484 : ndr->depth++;
1864 21484 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_MANDATORY", SE_GROUP_MANDATORY, r);
1865 21484 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_ENABLED_BY_DEFAULT", SE_GROUP_ENABLED_BY_DEFAULT, r);
1866 21484 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_ENABLED", SE_GROUP_ENABLED, r);
1867 21484 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_OWNER", SE_GROUP_OWNER, r);
1868 21484 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_USE_FOR_DENY_ONLY", SE_GROUP_USE_FOR_DENY_ONLY, r);
1869 21484 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_INTEGRITY", SE_GROUP_INTEGRITY, r);
1870 21484 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_INTEGRITY_ENABLED", SE_GROUP_INTEGRITY_ENABLED, r);
1871 21484 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_RESOURCE", SE_GROUP_RESOURCE, r);
1872 21484 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_LOGON_ID", SE_GROUP_LOGON_ID, r);
1873 21484 : ndr->depth--;
1874 21484 : }
1875 :
1876 7633931 : static enum ndr_err_code ndr_push_claims_evaluation_control(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum claims_evaluation_control r)
1877 : {
1878 7633931 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1879 7620297 : return NDR_ERR_SUCCESS;
1880 : }
1881 :
1882 7484977 : static enum ndr_err_code ndr_pull_claims_evaluation_control(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum claims_evaluation_control *r)
1883 : {
1884 11407 : uint16_t v;
1885 7484977 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1886 7484977 : *r = v;
1887 7484977 : return NDR_ERR_SUCCESS;
1888 : }
1889 :
1890 0 : _PUBLIC_ void ndr_print_claims_evaluation_control(struct ndr_print *ndr, const char *name, enum claims_evaluation_control r)
1891 : {
1892 0 : const char *val = NULL;
1893 :
1894 0 : switch (r) {
1895 0 : case CLAIMS_EVALUATION_INVALID_STATE: val = "CLAIMS_EVALUATION_INVALID_STATE"; break;
1896 0 : case CLAIMS_EVALUATION_NEVER: val = "CLAIMS_EVALUATION_NEVER"; break;
1897 0 : case CLAIMS_EVALUATION_ALWAYS: val = "CLAIMS_EVALUATION_ALWAYS"; break;
1898 : }
1899 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1900 0 : }
1901 :
1902 7633931 : _PUBLIC_ enum ndr_err_code ndr_push_security_token(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct security_token *r)
1903 : {
1904 13634 : uint32_t cntr_sids_0;
1905 13634 : uint32_t cntr_local_claims_0;
1906 13634 : uint32_t cntr_user_claims_0;
1907 13634 : uint32_t cntr_device_claims_0;
1908 13634 : uint32_t cntr_device_sids_0;
1909 7633931 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1910 7633931 : if (ndr_flags & NDR_SCALARS) {
1911 7633931 : NDR_CHECK(ndr_push_align(ndr, 8));
1912 7633931 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
1913 7633931 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sids));
1914 58011629 : for (cntr_sids_0 = 0; cntr_sids_0 < (r->num_sids); cntr_sids_0++) {
1915 50377698 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sids[cntr_sids_0]));
1916 : }
1917 7647565 : NDR_CHECK(ndr_push_se_privilege(ndr, NDR_SCALARS, r->privilege_mask));
1918 7647565 : NDR_CHECK(ndr_push_lsa_SystemAccessModeFlags(ndr, NDR_SCALARS, r->rights_mask));
1919 7633931 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_local_claims));
1920 7633931 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_user_claims));
1921 7633931 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_device_claims));
1922 7633931 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_device_sids));
1923 7633931 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_local_claims));
1924 7633931 : for (cntr_local_claims_0 = 0; cntr_local_claims_0 < (r->num_local_claims); cntr_local_claims_0++) {
1925 0 : NDR_CHECK(ndr_push_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_SCALARS, &r->local_claims[cntr_local_claims_0]));
1926 : }
1927 7633931 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_user_claims));
1928 7633931 : for (cntr_user_claims_0 = 0; cntr_user_claims_0 < (r->num_user_claims); cntr_user_claims_0++) {
1929 0 : NDR_CHECK(ndr_push_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_SCALARS, &r->user_claims[cntr_user_claims_0]));
1930 : }
1931 7633931 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_device_claims));
1932 7633931 : for (cntr_device_claims_0 = 0; cntr_device_claims_0 < (r->num_device_claims); cntr_device_claims_0++) {
1933 0 : NDR_CHECK(ndr_push_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_SCALARS, &r->device_claims[cntr_device_claims_0]));
1934 : }
1935 7633931 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_device_sids));
1936 7633931 : for (cntr_device_sids_0 = 0; cntr_device_sids_0 < (r->num_device_sids); cntr_device_sids_0++) {
1937 0 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->device_sids[cntr_device_sids_0]));
1938 : }
1939 7647565 : NDR_CHECK(ndr_push_claims_evaluation_control(ndr, NDR_SCALARS, r->evaluate_claims));
1940 7633931 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1941 : }
1942 7633931 : if (ndr_flags & NDR_BUFFERS) {
1943 7633931 : for (cntr_local_claims_0 = 0; cntr_local_claims_0 < (r->num_local_claims); cntr_local_claims_0++) {
1944 0 : NDR_CHECK(ndr_push_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_BUFFERS, &r->local_claims[cntr_local_claims_0]));
1945 : }
1946 7633931 : for (cntr_user_claims_0 = 0; cntr_user_claims_0 < (r->num_user_claims); cntr_user_claims_0++) {
1947 0 : NDR_CHECK(ndr_push_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_BUFFERS, &r->user_claims[cntr_user_claims_0]));
1948 : }
1949 7633931 : for (cntr_device_claims_0 = 0; cntr_device_claims_0 < (r->num_device_claims); cntr_device_claims_0++) {
1950 0 : NDR_CHECK(ndr_push_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_BUFFERS, &r->device_claims[cntr_device_claims_0]));
1951 : }
1952 : }
1953 7620297 : return NDR_ERR_SUCCESS;
1954 : }
1955 :
1956 7484977 : _PUBLIC_ enum ndr_err_code ndr_pull_security_token(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct security_token *r)
1957 : {
1958 7484977 : uint32_t size_sids_0 = 0;
1959 11407 : uint32_t cntr_sids_0;
1960 7484977 : TALLOC_CTX *_mem_save_sids_0 = NULL;
1961 7484977 : uint32_t size_local_claims_0 = 0;
1962 11407 : uint32_t cntr_local_claims_0;
1963 7484977 : TALLOC_CTX *_mem_save_local_claims_0 = NULL;
1964 7484977 : uint32_t size_user_claims_0 = 0;
1965 11407 : uint32_t cntr_user_claims_0;
1966 7484977 : TALLOC_CTX *_mem_save_user_claims_0 = NULL;
1967 7484977 : uint32_t size_device_claims_0 = 0;
1968 11407 : uint32_t cntr_device_claims_0;
1969 7484977 : TALLOC_CTX *_mem_save_device_claims_0 = NULL;
1970 7484977 : uint32_t size_device_sids_0 = 0;
1971 11407 : uint32_t cntr_device_sids_0;
1972 7484977 : TALLOC_CTX *_mem_save_device_sids_0 = NULL;
1973 7484977 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1974 7484977 : if (ndr_flags & NDR_SCALARS) {
1975 7484977 : NDR_CHECK(ndr_pull_align(ndr, 8));
1976 7484977 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
1977 7484977 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
1978 7484977 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_0));
1979 7484977 : NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_0);
1980 7484977 : _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1981 7484977 : NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1982 56323581 : for (cntr_sids_0 = 0; cntr_sids_0 < (size_sids_0); cntr_sids_0++) {
1983 48838604 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sids[cntr_sids_0]));
1984 : }
1985 7484977 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
1986 7496384 : NDR_CHECK(ndr_pull_se_privilege(ndr, NDR_SCALARS, &r->privilege_mask));
1987 7496384 : NDR_CHECK(ndr_pull_lsa_SystemAccessModeFlags(ndr, NDR_SCALARS, &r->rights_mask));
1988 7484977 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_local_claims));
1989 7484977 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_user_claims));
1990 7484977 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_device_claims));
1991 7484977 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_device_sids));
1992 7484977 : NDR_CHECK(ndr_pull_array_size(ndr, &r->local_claims));
1993 7484977 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->local_claims, &size_local_claims_0));
1994 7484977 : NDR_PULL_ALLOC_N(ndr, r->local_claims, size_local_claims_0);
1995 7484977 : _mem_save_local_claims_0 = NDR_PULL_GET_MEM_CTX(ndr);
1996 7484977 : NDR_PULL_SET_MEM_CTX(ndr, r->local_claims, 0);
1997 7484977 : for (cntr_local_claims_0 = 0; cntr_local_claims_0 < (size_local_claims_0); cntr_local_claims_0++) {
1998 0 : NDR_CHECK(ndr_pull_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_SCALARS, &r->local_claims[cntr_local_claims_0]));
1999 : }
2000 7484977 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_local_claims_0, 0);
2001 7484977 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user_claims));
2002 7484977 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->user_claims, &size_user_claims_0));
2003 7484977 : NDR_PULL_ALLOC_N(ndr, r->user_claims, size_user_claims_0);
2004 7484977 : _mem_save_user_claims_0 = NDR_PULL_GET_MEM_CTX(ndr);
2005 7484977 : NDR_PULL_SET_MEM_CTX(ndr, r->user_claims, 0);
2006 7484977 : for (cntr_user_claims_0 = 0; cntr_user_claims_0 < (size_user_claims_0); cntr_user_claims_0++) {
2007 0 : NDR_CHECK(ndr_pull_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_SCALARS, &r->user_claims[cntr_user_claims_0]));
2008 : }
2009 7484977 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_claims_0, 0);
2010 7484977 : NDR_CHECK(ndr_pull_array_size(ndr, &r->device_claims));
2011 7484977 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->device_claims, &size_device_claims_0));
2012 7484977 : NDR_PULL_ALLOC_N(ndr, r->device_claims, size_device_claims_0);
2013 7484977 : _mem_save_device_claims_0 = NDR_PULL_GET_MEM_CTX(ndr);
2014 7484977 : NDR_PULL_SET_MEM_CTX(ndr, r->device_claims, 0);
2015 7484977 : for (cntr_device_claims_0 = 0; cntr_device_claims_0 < (size_device_claims_0); cntr_device_claims_0++) {
2016 0 : NDR_CHECK(ndr_pull_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_SCALARS, &r->device_claims[cntr_device_claims_0]));
2017 : }
2018 7484977 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_claims_0, 0);
2019 7484977 : NDR_CHECK(ndr_pull_array_size(ndr, &r->device_sids));
2020 7484977 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->device_sids, &size_device_sids_0));
2021 7484977 : NDR_PULL_ALLOC_N(ndr, r->device_sids, size_device_sids_0);
2022 7484977 : _mem_save_device_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
2023 7484977 : NDR_PULL_SET_MEM_CTX(ndr, r->device_sids, 0);
2024 7484977 : for (cntr_device_sids_0 = 0; cntr_device_sids_0 < (size_device_sids_0); cntr_device_sids_0++) {
2025 0 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->device_sids[cntr_device_sids_0]));
2026 : }
2027 7484977 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_sids_0, 0);
2028 7496384 : NDR_CHECK(ndr_pull_claims_evaluation_control(ndr, NDR_SCALARS, &r->evaluate_claims));
2029 7484977 : if (r->sids) {
2030 7484977 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->sids, r->num_sids));
2031 : }
2032 7484977 : if (r->local_claims) {
2033 7484977 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->local_claims, r->num_local_claims));
2034 : }
2035 7484977 : if (r->user_claims) {
2036 7484977 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->user_claims, r->num_user_claims));
2037 : }
2038 7484977 : if (r->device_claims) {
2039 7484977 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->device_claims, r->num_device_claims));
2040 : }
2041 7484977 : if (r->device_sids) {
2042 7484977 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->device_sids, r->num_device_sids));
2043 : }
2044 7484977 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2045 : }
2046 7484977 : if (ndr_flags & NDR_BUFFERS) {
2047 7484977 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->local_claims, &size_local_claims_0));
2048 7484977 : _mem_save_local_claims_0 = NDR_PULL_GET_MEM_CTX(ndr);
2049 7484977 : NDR_PULL_SET_MEM_CTX(ndr, r->local_claims, 0);
2050 7484977 : for (cntr_local_claims_0 = 0; cntr_local_claims_0 < (size_local_claims_0); cntr_local_claims_0++) {
2051 0 : NDR_CHECK(ndr_pull_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_BUFFERS, &r->local_claims[cntr_local_claims_0]));
2052 : }
2053 7484977 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_local_claims_0, 0);
2054 7484977 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->user_claims, &size_user_claims_0));
2055 7484977 : _mem_save_user_claims_0 = NDR_PULL_GET_MEM_CTX(ndr);
2056 7484977 : NDR_PULL_SET_MEM_CTX(ndr, r->user_claims, 0);
2057 7484977 : for (cntr_user_claims_0 = 0; cntr_user_claims_0 < (size_user_claims_0); cntr_user_claims_0++) {
2058 0 : NDR_CHECK(ndr_pull_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_BUFFERS, &r->user_claims[cntr_user_claims_0]));
2059 : }
2060 7484977 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_claims_0, 0);
2061 7484977 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->device_claims, &size_device_claims_0));
2062 7484977 : _mem_save_device_claims_0 = NDR_PULL_GET_MEM_CTX(ndr);
2063 7484977 : NDR_PULL_SET_MEM_CTX(ndr, r->device_claims, 0);
2064 7484977 : for (cntr_device_claims_0 = 0; cntr_device_claims_0 < (size_device_claims_0); cntr_device_claims_0++) {
2065 0 : NDR_CHECK(ndr_pull_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, NDR_BUFFERS, &r->device_claims[cntr_device_claims_0]));
2066 : }
2067 7484977 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_claims_0, 0);
2068 7484977 : for (cntr_local_claims_0 = 0; cntr_local_claims_0 < (size_local_claims_0); cntr_local_claims_0++) {
2069 0 : }
2070 7484977 : for (cntr_user_claims_0 = 0; cntr_user_claims_0 < (size_user_claims_0); cntr_user_claims_0++) {
2071 0 : }
2072 7473570 : for (cntr_device_claims_0 = 0; cntr_device_claims_0 < (size_device_claims_0); cntr_device_claims_0++) {
2073 : }
2074 : }
2075 7473570 : return NDR_ERR_SUCCESS;
2076 : }
2077 :
2078 0 : static void ndr_print_flags_security_token(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct security_token *r)
2079 : {
2080 0 : ndr_print_security_token(ndr, name, r);
2081 0 : }
2082 :
2083 0 : _PUBLIC_ void ndr_print_security_token(struct ndr_print *ndr, const char *name, const struct security_token *r)
2084 : {
2085 0 : uint32_t cntr_sids_0;
2086 0 : uint32_t cntr_local_claims_0;
2087 0 : uint32_t cntr_user_claims_0;
2088 0 : uint32_t cntr_device_claims_0;
2089 0 : uint32_t cntr_device_sids_0;
2090 0 : ndr_print_struct(ndr, name, "security_token");
2091 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2092 0 : ndr->depth++;
2093 0 : ndr_print_uint32(ndr, "num_sids", r->num_sids);
2094 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sids", (uint32_t)(r->num_sids));
2095 0 : ndr->depth++;
2096 0 : for (cntr_sids_0 = 0; cntr_sids_0 < (r->num_sids); cntr_sids_0++) {
2097 0 : ndr_print_dom_sid(ndr, "sids", &r->sids[cntr_sids_0]);
2098 : }
2099 0 : ndr->depth--;
2100 0 : ndr_print_se_privilege(ndr, "privilege_mask", r->privilege_mask);
2101 0 : ndr_print_lsa_SystemAccessModeFlags(ndr, "rights_mask", r->rights_mask);
2102 0 : ndr_print_uint32(ndr, "num_local_claims", r->num_local_claims);
2103 0 : ndr_print_uint32(ndr, "num_user_claims", r->num_user_claims);
2104 0 : ndr_print_uint32(ndr, "num_device_claims", r->num_device_claims);
2105 0 : ndr_print_uint32(ndr, "num_device_sids", r->num_device_sids);
2106 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "local_claims", (uint32_t)(r->num_local_claims));
2107 0 : ndr->depth++;
2108 0 : for (cntr_local_claims_0 = 0; cntr_local_claims_0 < (r->num_local_claims); cntr_local_claims_0++) {
2109 0 : ndr_print_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, "local_claims", &r->local_claims[cntr_local_claims_0]);
2110 : }
2111 0 : ndr->depth--;
2112 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "user_claims", (uint32_t)(r->num_user_claims));
2113 0 : ndr->depth++;
2114 0 : for (cntr_user_claims_0 = 0; cntr_user_claims_0 < (r->num_user_claims); cntr_user_claims_0++) {
2115 0 : ndr_print_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, "user_claims", &r->user_claims[cntr_user_claims_0]);
2116 : }
2117 0 : ndr->depth--;
2118 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "device_claims", (uint32_t)(r->num_device_claims));
2119 0 : ndr->depth++;
2120 0 : for (cntr_device_claims_0 = 0; cntr_device_claims_0 < (r->num_device_claims); cntr_device_claims_0++) {
2121 0 : ndr_print_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1(ndr, "device_claims", &r->device_claims[cntr_device_claims_0]);
2122 : }
2123 0 : ndr->depth--;
2124 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "device_sids", (uint32_t)(r->num_device_sids));
2125 0 : ndr->depth++;
2126 0 : for (cntr_device_sids_0 = 0; cntr_device_sids_0 < (r->num_device_sids); cntr_device_sids_0++) {
2127 0 : ndr_print_dom_sid(ndr, "device_sids", &r->device_sids[cntr_device_sids_0]);
2128 : }
2129 0 : ndr->depth--;
2130 0 : ndr_print_claims_evaluation_control(ndr, "evaluate_claims", r->evaluate_claims);
2131 0 : ndr->depth--;
2132 : }
2133 :
2134 0 : _PUBLIC_ enum ndr_err_code ndr_push_security_token_descriptor_fuzzing_pair(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct security_token_descriptor_fuzzing_pair *r)
2135 : {
2136 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2137 0 : if (ndr_flags & NDR_SCALARS) {
2138 0 : NDR_CHECK(ndr_push_align(ndr, 8));
2139 0 : NDR_CHECK(ndr_push_security_token(ndr, NDR_SCALARS, &r->token));
2140 0 : NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS, &r->sd));
2141 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->access_desired));
2142 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2143 : }
2144 0 : if (ndr_flags & NDR_BUFFERS) {
2145 0 : NDR_CHECK(ndr_push_security_token(ndr, NDR_BUFFERS, &r->token));
2146 0 : NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_BUFFERS, &r->sd));
2147 : }
2148 0 : return NDR_ERR_SUCCESS;
2149 : }
2150 :
2151 0 : _PUBLIC_ enum ndr_err_code ndr_pull_security_token_descriptor_fuzzing_pair(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct security_token_descriptor_fuzzing_pair *r)
2152 : {
2153 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2154 0 : if (ndr_flags & NDR_SCALARS) {
2155 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
2156 0 : NDR_CHECK(ndr_pull_security_token(ndr, NDR_SCALARS, &r->token));
2157 0 : NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_SCALARS, &r->sd));
2158 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->access_desired));
2159 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2160 : }
2161 0 : if (ndr_flags & NDR_BUFFERS) {
2162 0 : NDR_CHECK(ndr_pull_security_token(ndr, NDR_BUFFERS, &r->token));
2163 0 : NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_BUFFERS, &r->sd));
2164 : }
2165 0 : return NDR_ERR_SUCCESS;
2166 : }
2167 :
2168 0 : static void ndr_print_flags_security_token_descriptor_fuzzing_pair(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct security_token_descriptor_fuzzing_pair *r)
2169 : {
2170 0 : ndr_print_security_token_descriptor_fuzzing_pair(ndr, name, r);
2171 0 : }
2172 :
2173 0 : _PUBLIC_ void ndr_print_security_token_descriptor_fuzzing_pair(struct ndr_print *ndr, const char *name, const struct security_token_descriptor_fuzzing_pair *r)
2174 : {
2175 0 : ndr_print_struct(ndr, name, "security_token_descriptor_fuzzing_pair");
2176 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2177 0 : ndr->depth++;
2178 0 : ndr_print_security_token(ndr, "token", &r->token);
2179 0 : ndr_print_security_descriptor(ndr, "sd", &r->sd);
2180 0 : ndr_print_uint32(ndr, "access_desired", r->access_desired);
2181 0 : ndr->depth--;
2182 : }
2183 :
2184 422371 : _PUBLIC_ enum ndr_err_code ndr_push_security_unix_token(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct security_unix_token *r)
2185 : {
2186 5812 : uint32_t cntr_groups_0;
2187 422371 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2188 422371 : if (ndr_flags & NDR_SCALARS) {
2189 422371 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->ngroups));
2190 422371 : NDR_CHECK(ndr_push_align(ndr, 8));
2191 422371 : NDR_CHECK(ndr_push_uid_t(ndr, NDR_SCALARS, r->uid));
2192 422371 : NDR_CHECK(ndr_push_gid_t(ndr, NDR_SCALARS, r->gid));
2193 422371 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ngroups));
2194 2475187 : for (cntr_groups_0 = 0; cntr_groups_0 < (r->ngroups); cntr_groups_0++) {
2195 2052816 : NDR_CHECK(ndr_push_gid_t(ndr, NDR_SCALARS, r->groups[cntr_groups_0]));
2196 : }
2197 422371 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2198 : }
2199 422371 : if (ndr_flags & NDR_BUFFERS) {
2200 5812 : }
2201 422371 : return NDR_ERR_SUCCESS;
2202 : }
2203 :
2204 273617 : _PUBLIC_ enum ndr_err_code ndr_pull_security_unix_token(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct security_unix_token *r)
2205 : {
2206 273617 : uint32_t size_groups_0 = 0;
2207 3585 : uint32_t cntr_groups_0;
2208 273617 : TALLOC_CTX *_mem_save_groups_0 = NULL;
2209 273617 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2210 273617 : if (ndr_flags & NDR_SCALARS) {
2211 273617 : NDR_CHECK(ndr_pull_array_size(ndr, &r->groups));
2212 273617 : NDR_CHECK(ndr_pull_align(ndr, 8));
2213 273617 : NDR_CHECK(ndr_pull_uid_t(ndr, NDR_SCALARS, &r->uid));
2214 273617 : NDR_CHECK(ndr_pull_gid_t(ndr, NDR_SCALARS, &r->gid));
2215 273617 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ngroups));
2216 273617 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->groups, &size_groups_0));
2217 273617 : NDR_PULL_ALLOC_N(ndr, r->groups, size_groups_0);
2218 273617 : _mem_save_groups_0 = NDR_PULL_GET_MEM_CTX(ndr);
2219 273617 : NDR_PULL_SET_MEM_CTX(ndr, r->groups, 0);
2220 1397336 : for (cntr_groups_0 = 0; cntr_groups_0 < (size_groups_0); cntr_groups_0++) {
2221 1123719 : NDR_CHECK(ndr_pull_gid_t(ndr, NDR_SCALARS, &r->groups[cntr_groups_0]));
2222 : }
2223 273617 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_groups_0, 0);
2224 273617 : if (r->groups) {
2225 273617 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->groups, r->ngroups));
2226 : }
2227 273617 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2228 : }
2229 273617 : if (ndr_flags & NDR_BUFFERS) {
2230 3585 : }
2231 273617 : return NDR_ERR_SUCCESS;
2232 : }
2233 :
2234 0 : static void ndr_print_flags_security_unix_token(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct security_unix_token *r)
2235 : {
2236 0 : ndr_print_security_unix_token(ndr, name, r);
2237 0 : }
2238 :
2239 0 : _PUBLIC_ void ndr_print_security_unix_token(struct ndr_print *ndr, const char *name, const struct security_unix_token *r)
2240 : {
2241 0 : uint32_t cntr_groups_0;
2242 0 : ndr_print_struct(ndr, name, "security_unix_token");
2243 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2244 0 : ndr->depth++;
2245 0 : ndr_print_uid_t(ndr, "uid", r->uid);
2246 0 : ndr_print_gid_t(ndr, "gid", r->gid);
2247 0 : ndr_print_uint32(ndr, "ngroups", r->ngroups);
2248 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "groups", (uint32_t)(r->ngroups));
2249 0 : ndr->depth++;
2250 0 : for (cntr_groups_0 = 0; cntr_groups_0 < (r->ngroups); cntr_groups_0++) {
2251 0 : ndr_print_gid_t(ndr, "groups", r->groups[cntr_groups_0]);
2252 : }
2253 0 : ndr->depth--;
2254 0 : ndr->depth--;
2255 : }
2256 :
2257 434 : _PUBLIC_ enum ndr_err_code ndr_push_security_secinfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
2258 : {
2259 434 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2260 418 : return NDR_ERR_SUCCESS;
2261 : }
2262 :
2263 410 : _PUBLIC_ enum ndr_err_code ndr_pull_security_secinfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
2264 : {
2265 16 : uint32_t v;
2266 410 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2267 410 : *r = v;
2268 410 : return NDR_ERR_SUCCESS;
2269 : }
2270 :
2271 0 : _PUBLIC_ void ndr_print_security_secinfo(struct ndr_print *ndr, const char *name, uint32_t r)
2272 : {
2273 0 : ndr_print_uint32(ndr, name, r);
2274 0 : ndr->depth++;
2275 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_OWNER", SECINFO_OWNER, r);
2276 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_GROUP", SECINFO_GROUP, r);
2277 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_DACL", SECINFO_DACL, r);
2278 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_SACL", SECINFO_SACL, r);
2279 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_LABEL", SECINFO_LABEL, r);
2280 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_ATTRIBUTE", SECINFO_ATTRIBUTE, r);
2281 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_SCOPE", SECINFO_SCOPE, r);
2282 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_BACKUP", SECINFO_BACKUP, r);
2283 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_UNPROTECTED_SACL", SECINFO_UNPROTECTED_SACL, r);
2284 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_UNPROTECTED_DACL", SECINFO_UNPROTECTED_DACL, r);
2285 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_PROTECTED_SACL", SECINFO_PROTECTED_SACL, r);
2286 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_PROTECTED_DACL", SECINFO_PROTECTED_DACL, r);
2287 0 : ndr->depth--;
2288 0 : }
2289 :
2290 292400 : _PUBLIC_ enum ndr_err_code ndr_push_LSAP_TOKEN_INFO_INTEGRITY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct LSAP_TOKEN_INFO_INTEGRITY *r)
2291 : {
2292 : {
2293 292400 : libndr_flags _flags_save_STRUCT = ndr->flags;
2294 292400 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2295 292400 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2296 292400 : if (ndr_flags & NDR_SCALARS) {
2297 292400 : NDR_CHECK(ndr_push_align(ndr, 4));
2298 292400 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Flags));
2299 292400 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->TokenIL));
2300 292400 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->MachineId, 32));
2301 292400 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2302 : }
2303 292400 : if (ndr_flags & NDR_BUFFERS) {
2304 1104 : }
2305 292400 : ndr->flags = _flags_save_STRUCT;
2306 : }
2307 292400 : return NDR_ERR_SUCCESS;
2308 : }
2309 :
2310 35932 : _PUBLIC_ enum ndr_err_code ndr_pull_LSAP_TOKEN_INFO_INTEGRITY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct LSAP_TOKEN_INFO_INTEGRITY *r)
2311 : {
2312 35932 : uint32_t size_MachineId_0 = 0;
2313 : {
2314 35932 : libndr_flags _flags_save_STRUCT = ndr->flags;
2315 35932 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2316 35932 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2317 35932 : if (ndr_flags & NDR_SCALARS) {
2318 35932 : NDR_CHECK(ndr_pull_align(ndr, 4));
2319 35932 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Flags));
2320 35932 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->TokenIL));
2321 35932 : size_MachineId_0 = 32;
2322 35932 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->MachineId, size_MachineId_0));
2323 35932 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2324 : }
2325 35932 : if (ndr_flags & NDR_BUFFERS) {
2326 138 : }
2327 35932 : ndr->flags = _flags_save_STRUCT;
2328 : }
2329 35932 : return NDR_ERR_SUCCESS;
2330 : }
2331 :
2332 0 : static void ndr_print_flags_LSAP_TOKEN_INFO_INTEGRITY(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct LSAP_TOKEN_INFO_INTEGRITY *r)
2333 : {
2334 0 : ndr_print_LSAP_TOKEN_INFO_INTEGRITY(ndr, name, r);
2335 0 : }
2336 :
2337 4 : _PUBLIC_ void ndr_print_LSAP_TOKEN_INFO_INTEGRITY(struct ndr_print *ndr, const char *name, const struct LSAP_TOKEN_INFO_INTEGRITY *r)
2338 : {
2339 4 : ndr_print_struct(ndr, name, "LSAP_TOKEN_INFO_INTEGRITY");
2340 4 : if (r == NULL) { ndr_print_null(ndr); return; }
2341 : {
2342 4 : libndr_flags _flags_save_STRUCT = ndr->flags;
2343 4 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2344 4 : ndr->depth++;
2345 4 : ndr_print_uint32(ndr, "Flags", r->Flags);
2346 4 : ndr_print_uint32(ndr, "TokenIL", r->TokenIL);
2347 4 : ndr_print_array_uint8(ndr, "MachineId", r->MachineId, 32);
2348 4 : ndr->depth--;
2349 4 : ndr->flags = _flags_save_STRUCT;
2350 : }
2351 : }
2352 :
2353 146200 : _PUBLIC_ size_t ndr_size_LSAP_TOKEN_INFO_INTEGRITY(const struct LSAP_TOKEN_INFO_INTEGRITY *r, libndr_flags flags)
2354 : {
2355 146200 : flags |= LIBNDR_PRINT_ARRAY_HEX;
2356 146200 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_LSAP_TOKEN_INFO_INTEGRITY);
2357 : }
2358 :
2359 1305 : _PUBLIC_ enum ndr_err_code ndr_push_kerb_EncTypes(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
2360 : {
2361 1305 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2362 1242 : return NDR_ERR_SUCCESS;
2363 : }
2364 :
2365 5463 : _PUBLIC_ enum ndr_err_code ndr_pull_kerb_EncTypes(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
2366 : {
2367 70 : uint32_t v;
2368 5463 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2369 5463 : *r = v;
2370 5463 : return NDR_ERR_SUCCESS;
2371 : }
2372 :
2373 391 : _PUBLIC_ void ndr_print_kerb_EncTypes(struct ndr_print *ndr, const char *name, uint32_t r)
2374 : {
2375 391 : ndr_print_uint32(ndr, name, r);
2376 391 : ndr->depth++;
2377 391 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_DES_CBC_CRC", KERB_ENCTYPE_DES_CBC_CRC, r);
2378 391 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_DES_CBC_MD5", KERB_ENCTYPE_DES_CBC_MD5, r);
2379 391 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_RC4_HMAC_MD5", KERB_ENCTYPE_RC4_HMAC_MD5, r);
2380 391 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96", KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96, r);
2381 391 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96", KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96, r);
2382 391 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96_SK", KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96_SK, r);
2383 391 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_FAST_SUPPORTED", KERB_ENCTYPE_FAST_SUPPORTED, r);
2384 391 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_COMPOUND_IDENTITY_SUPPORTED", KERB_ENCTYPE_COMPOUND_IDENTITY_SUPPORTED, r);
2385 391 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_CLAIMS_SUPPORTED", KERB_ENCTYPE_CLAIMS_SUPPORTED, r);
2386 391 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_RESOURCE_SID_COMPRESSION_DISABLED", KERB_ENCTYPE_RESOURCE_SID_COMPRESSION_DISABLED, r);
2387 391 : ndr->depth--;
2388 391 : }
2389 :
2390 0 : _PUBLIC_ enum ndr_err_code ndr_push_security_autoinherit(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
2391 : {
2392 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2393 0 : return NDR_ERR_SUCCESS;
2394 : }
2395 :
2396 0 : _PUBLIC_ enum ndr_err_code ndr_pull_security_autoinherit(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
2397 : {
2398 0 : uint32_t v;
2399 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2400 0 : *r = v;
2401 0 : return NDR_ERR_SUCCESS;
2402 : }
2403 :
2404 0 : _PUBLIC_ void ndr_print_security_autoinherit(struct ndr_print *ndr, const char *name, uint32_t r)
2405 : {
2406 0 : ndr_print_uint32(ndr, name, r);
2407 0 : ndr->depth++;
2408 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_DACL_AUTO_INHERIT", SEC_DACL_AUTO_INHERIT, r);
2409 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_SACL_AUTO_INHERIT", SEC_SACL_AUTO_INHERIT, r);
2410 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_DEFAULT_DESCRIPTOR", SEC_DEFAULT_DESCRIPTOR, r);
2411 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_OWNER_FROM_PARENT", SEC_OWNER_FROM_PARENT, r);
2412 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_GROUP_FROM_PARENT", SEC_GROUP_FROM_PARENT, r);
2413 0 : ndr->depth--;
2414 0 : }
2415 :
2416 : #ifndef SKIP_NDR_TABLE_security
2417 : static const struct ndr_interface_public_struct security_public_structs[] = {
2418 : {
2419 : .name = "dom_sid",
2420 : .struct_size = sizeof(struct dom_sid ),
2421 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_dom_sid,
2422 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dom_sid,
2423 : .ndr_print = (ndr_print_function_t) ndr_print_flags_dom_sid,
2424 : },
2425 : {
2426 : .name = "CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1",
2427 : .struct_size = sizeof(struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 ),
2428 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1,
2429 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1,
2430 : .ndr_print = (ndr_print_function_t) ndr_print_flags_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1,
2431 : },
2432 : {
2433 : .name = "security_ace",
2434 : .struct_size = sizeof(struct security_ace ),
2435 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_security_ace,
2436 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_security_ace,
2437 : .ndr_print = (ndr_print_function_t) ndr_print_flags_security_ace,
2438 : },
2439 : {
2440 : .name = "security_acl",
2441 : .struct_size = sizeof(struct security_acl ),
2442 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_security_acl,
2443 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_security_acl,
2444 : .ndr_print = (ndr_print_function_t) ndr_print_flags_security_acl,
2445 : },
2446 : {
2447 : .name = "security_descriptor",
2448 : .struct_size = sizeof(struct security_descriptor ),
2449 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_security_descriptor,
2450 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_security_descriptor,
2451 : .ndr_print = (ndr_print_function_t) ndr_print_flags_security_descriptor,
2452 : },
2453 : {
2454 : .name = "sec_desc_buf",
2455 : .struct_size = sizeof(struct sec_desc_buf ),
2456 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_sec_desc_buf,
2457 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_sec_desc_buf,
2458 : .ndr_print = (ndr_print_function_t) ndr_print_flags_sec_desc_buf,
2459 : },
2460 : {
2461 : .name = "security_token",
2462 : .struct_size = sizeof(struct security_token ),
2463 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_security_token,
2464 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_security_token,
2465 : .ndr_print = (ndr_print_function_t) ndr_print_flags_security_token,
2466 : },
2467 : {
2468 : .name = "security_token_descriptor_fuzzing_pair",
2469 : .struct_size = sizeof(struct security_token_descriptor_fuzzing_pair ),
2470 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_security_token_descriptor_fuzzing_pair,
2471 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_security_token_descriptor_fuzzing_pair,
2472 : .ndr_print = (ndr_print_function_t) ndr_print_flags_security_token_descriptor_fuzzing_pair,
2473 : },
2474 : {
2475 : .name = "security_unix_token",
2476 : .struct_size = sizeof(struct security_unix_token ),
2477 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_security_unix_token,
2478 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_security_unix_token,
2479 : .ndr_print = (ndr_print_function_t) ndr_print_flags_security_unix_token,
2480 : },
2481 : {
2482 : .name = "LSAP_TOKEN_INFO_INTEGRITY",
2483 : .struct_size = sizeof(struct LSAP_TOKEN_INFO_INTEGRITY ),
2484 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_LSAP_TOKEN_INFO_INTEGRITY,
2485 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_LSAP_TOKEN_INFO_INTEGRITY,
2486 : .ndr_print = (ndr_print_function_t) ndr_print_flags_LSAP_TOKEN_INFO_INTEGRITY,
2487 : },
2488 : { .name = NULL }
2489 : };
2490 :
2491 : static const struct ndr_interface_call security_calls[] = {
2492 : { .name = NULL }
2493 : };
2494 :
2495 : static const char * const security_endpoint_strings[] = {
2496 : "ncacn_np:[\\pipe\\security]",
2497 : };
2498 :
2499 : static const struct ndr_interface_string_array security_endpoints = {
2500 : .count = 1,
2501 : .names = security_endpoint_strings
2502 : };
2503 :
2504 : static const char * const security_authservice_strings[] = {
2505 : "host",
2506 : };
2507 :
2508 : static const struct ndr_interface_string_array security_authservices = {
2509 : .count = 1,
2510 : .names = security_authservice_strings
2511 : };
2512 :
2513 :
2514 : const struct ndr_interface_table ndr_table_security = {
2515 : .name = "security",
2516 : .syntax_id = {
2517 : {0xcbf7d408,0x2d6c,0x11e2,{0xae,0x5b},{0x0b,0x56,0x92,0x79,0x0e,0x18}},
2518 : NDR_SECURITY_VERSION
2519 : },
2520 : .helpstring = NDR_SECURITY_HELPSTRING,
2521 : .num_calls = 0,
2522 : .calls = security_calls,
2523 : .num_public_structs = 10,
2524 : .public_structs = security_public_structs,
2525 : .endpoints = &security_endpoints,
2526 : .authservices = &security_authservices
2527 : };
2528 :
2529 : #endif /* SKIP_NDR_TABLE_security */
|