- fixed lsa_EnumTrustDom
[ira/wip.git] / source / librpc / ndr / ndr_lsa.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4
5 NTSTATUS ndr_push_lsa_Close(struct ndr_push *ndr, struct lsa_Close *r)
6 {
7         NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
8
9         return NT_STATUS_OK;
10 }
11
12 NTSTATUS ndr_pull_lsa_Close(struct ndr_pull *ndr, struct lsa_Close *r)
13 {
14         NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle));
15         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
16
17         return NT_STATUS_OK;
18 }
19
20 NTSTATUS ndr_push_lsa_Delete(struct ndr_push *ndr, struct lsa_Delete *r)
21 {
22         NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
23
24         return NT_STATUS_OK;
25 }
26
27 NTSTATUS ndr_pull_lsa_Delete(struct ndr_pull *ndr, struct lsa_Delete *r)
28 {
29         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
30
31         return NT_STATUS_OK;
32 }
33
34 static NTSTATUS ndr_push_lsa_Name(struct ndr_push *ndr, int ndr_flags, struct lsa_Name *r)
35 {
36         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
37         NDR_CHECK(ndr_push_uint16(ndr, r->name_len));
38         NDR_CHECK(ndr_push_uint16(ndr, r->name_size));
39         NDR_CHECK(ndr_push_ptr(ndr, r->name));
40 buffers:
41         if (!(ndr_flags & NDR_BUFFERS)) goto done;
42         if (r->name) {
43                 NDR_CHECK(ndr_push_unistr_noterm(ndr, r->name));
44         }
45 done:
46         return NT_STATUS_OK;
47 }
48
49 static NTSTATUS ndr_pull_lsa_Name(struct ndr_pull *ndr, int ndr_flags, struct lsa_Name *r)
50 {
51         uint32 _ptr_name;
52         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
53         NDR_CHECK(ndr_pull_uint16(ndr, &r->name_len));
54         NDR_CHECK(ndr_pull_uint16(ndr, &r->name_size));
55         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name));
56         if (_ptr_name) {
57                 NDR_ALLOC(ndr, r->name);
58         } else {
59                 r->name = NULL;
60         }
61 buffers:
62         if (!(ndr_flags & NDR_BUFFERS)) goto done;
63         if (r->name) {
64                 NDR_CHECK(ndr_pull_unistr_noterm(ndr, &r->name));
65         }
66 done:
67         return NT_STATUS_OK;
68 }
69
70 static NTSTATUS ndr_push_lsa_PrivEntry(struct ndr_push *ndr, int ndr_flags, struct lsa_PrivEntry *r)
71 {
72         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
73         NDR_CHECK(ndr_push_lsa_Name(ndr, NDR_SCALARS, &r->name));
74         NDR_CHECK(ndr_push_uint32(ndr, r->luid_low));
75         NDR_CHECK(ndr_push_uint32(ndr, r->luid_high));
76 buffers:
77         if (!(ndr_flags & NDR_BUFFERS)) goto done;
78                 NDR_CHECK(ndr_push_lsa_Name(ndr, ndr_flags, &r->name));
79 done:
80         return NT_STATUS_OK;
81 }
82
83 static NTSTATUS ndr_pull_lsa_PrivEntry(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivEntry *r)
84 {
85         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
86         NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name));
87         NDR_CHECK(ndr_pull_uint32(ndr, &r->luid_low));
88         NDR_CHECK(ndr_pull_uint32(ndr, &r->luid_high));
89 buffers:
90         if (!(ndr_flags & NDR_BUFFERS)) goto done;
91                 NDR_CHECK(ndr_pull_lsa_Name(ndr, ndr_flags, &r->name));
92 done:
93         return NT_STATUS_OK;
94 }
95
96 static NTSTATUS ndr_push_lsa_PrivArray(struct ndr_push *ndr, int ndr_flags, struct lsa_PrivArray *r)
97 {
98         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
99         NDR_CHECK(ndr_push_uint32(ndr, r->count));
100         NDR_CHECK(ndr_push_ptr(ndr, r->privs));
101 buffers:
102         if (!(ndr_flags & NDR_BUFFERS)) goto done;
103         if (r->privs) {
104                 NDR_CHECK(ndr_push_array(ndr, ndr_flags, r->privs, sizeof(r->privs[0]), r->count, (ndr_push_flags_fn_t)ndr_push_lsa_PrivEntry));
105         }
106 done:
107         return NT_STATUS_OK;
108 }
109
110 static NTSTATUS ndr_pull_lsa_PrivArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivArray *r)
111 {
112         uint32 _ptr_privs;
113         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
114         NDR_CHECK(ndr_pull_uint32(ndr, &r->count));
115         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_privs));
116         if (_ptr_privs) {
117                 NDR_ALLOC(ndr, r->privs);
118         } else {
119                 r->privs = NULL;
120         }
121 buffers:
122         if (!(ndr_flags & NDR_BUFFERS)) goto done;
123         if (r->privs) {
124                 NDR_ALLOC_N_SIZE(ndr, r->privs, r->count, sizeof(r->privs[0]));
125                 NDR_CHECK(ndr_pull_array(ndr, ndr_flags, (void **)r->privs, sizeof(r->privs[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_lsa_PrivEntry));
126         }
127 done:
128         return NT_STATUS_OK;
129 }
130
131 NTSTATUS ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, struct lsa_EnumPrivs *r)
132 {
133         NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
134         NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle));
135         NDR_CHECK(ndr_push_uint32(ndr, r->in.max_count));
136
137         return NT_STATUS_OK;
138 }
139
140 NTSTATUS ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, struct lsa_EnumPrivs *r)
141 {
142         NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle));
143         NDR_CHECK(ndr_pull_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
144         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
145
146         return NT_STATUS_OK;
147 }
148
149 NTSTATUS ndr_push_lsa_QuerySecObj(struct ndr_push *ndr, struct lsa_QuerySecObj *r)
150 {
151
152         return NT_STATUS_OK;
153 }
154
155 NTSTATUS ndr_pull_lsa_QuerySecObj(struct ndr_pull *ndr, struct lsa_QuerySecObj *r)
156 {
157         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
158
159         return NT_STATUS_OK;
160 }
161
162 NTSTATUS ndr_push_lsa_SetSecObj(struct ndr_push *ndr, struct lsa_SetSecObj *r)
163 {
164
165         return NT_STATUS_OK;
166 }
167
168 NTSTATUS ndr_pull_lsa_SetSecObj(struct ndr_pull *ndr, struct lsa_SetSecObj *r)
169 {
170         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
171
172         return NT_STATUS_OK;
173 }
174
175 NTSTATUS ndr_push_lsa_ChangePassword(struct ndr_push *ndr, struct lsa_ChangePassword *r)
176 {
177
178         return NT_STATUS_OK;
179 }
180
181 NTSTATUS ndr_pull_lsa_ChangePassword(struct ndr_pull *ndr, struct lsa_ChangePassword *r)
182 {
183         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
184
185         return NT_STATUS_OK;
186 }
187
188 static NTSTATUS ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, struct lsa_QosInfo *r)
189 {
190         struct ndr_push_save _save1, _save2, _save3;
191         ndr_push_save(ndr, &_save1);
192         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
193         NDR_CHECK(ndr_push_align_uint32(ndr));
194         ndr_push_save(ndr, &_save2);
195         NDR_CHECK(ndr_push_uint32(ndr, 0));
196         NDR_CHECK(ndr_push_uint16(ndr, r->impersonation_level));
197         NDR_CHECK(ndr_push_uint8(ndr, r->context_mode));
198         NDR_CHECK(ndr_push_uint8(ndr, r->effective_only));
199 buffers:
200         if (!(ndr_flags & NDR_BUFFERS)) goto done;
201         ndr_push_save(ndr, &_save3);
202         ndr_push_restore(ndr, &_save2);
203         NDR_CHECK(ndr_push_uint32(ndr, _save3.offset - _save1.offset));
204         ndr_push_restore(ndr, &_save3);
205 done:
206         return NT_STATUS_OK;
207 }
208
209 static NTSTATUS ndr_pull_lsa_QosInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_QosInfo *r)
210 {
211         uint32 _size;
212         struct ndr_pull_save _save;
213         ndr_pull_save(ndr, &_save);
214         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
215         NDR_CHECK(ndr_pull_uint32(ndr, &_size));
216         NDR_CHECK(ndr_pull_limit_size(ndr, _size, 4));
217         NDR_CHECK(ndr_pull_uint16(ndr, &r->impersonation_level));
218         NDR_CHECK(ndr_pull_uint8(ndr, &r->context_mode));
219         NDR_CHECK(ndr_pull_uint8(ndr, &r->effective_only));
220 buffers:
221         if (!(ndr_flags & NDR_BUFFERS)) goto done;
222         ndr_pull_restore(ndr, &_save);
223         NDR_CHECK(ndr_pull_advance(ndr, _size));
224 done:
225         return NT_STATUS_OK;
226 }
227
228 static NTSTATUS ndr_push_lsa_ObjectAttribute(struct ndr_push *ndr, int ndr_flags, struct lsa_ObjectAttribute *r)
229 {
230         struct ndr_push_save _save1, _save2, _save3;
231         ndr_push_save(ndr, &_save1);
232         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
233         NDR_CHECK(ndr_push_align_uint32(ndr));
234         ndr_push_save(ndr, &_save2);
235         NDR_CHECK(ndr_push_uint32(ndr, 0));
236         NDR_CHECK(ndr_push_ptr(ndr, r->root_dir));
237         NDR_CHECK(ndr_push_ptr(ndr, r->object_name));
238         NDR_CHECK(ndr_push_uint32(ndr, r->attributes));
239         NDR_CHECK(ndr_push_ptr(ndr, r->sec_desc));
240         NDR_CHECK(ndr_push_ptr(ndr, r->sec_qos));
241 buffers:
242         if (!(ndr_flags & NDR_BUFFERS)) goto done;
243         if (r->root_dir) {
244                 NDR_CHECK(ndr_push_uint8(ndr, *r->root_dir));
245         }
246         if (r->object_name) {
247                 NDR_CHECK(ndr_push_unistr(ndr, r->object_name));
248         }
249         if (r->sec_desc) {
250                 NDR_CHECK(ndr_push_security_descriptor(ndr, r->sec_desc));
251         }
252         if (r->sec_qos) {
253                 NDR_CHECK(ndr_push_lsa_QosInfo(ndr, ndr_flags, r->sec_qos));
254         }
255         ndr_push_save(ndr, &_save3);
256         ndr_push_restore(ndr, &_save2);
257         NDR_CHECK(ndr_push_uint32(ndr, _save3.offset - _save1.offset));
258         ndr_push_restore(ndr, &_save3);
259 done:
260         return NT_STATUS_OK;
261 }
262
263 static NTSTATUS ndr_pull_lsa_ObjectAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_ObjectAttribute *r)
264 {
265         uint32 _ptr_root_dir;
266         uint32 _ptr_object_name;
267         uint32 _ptr_sec_desc;
268         uint32 _ptr_sec_qos;
269         uint32 _size;
270         struct ndr_pull_save _save;
271         ndr_pull_save(ndr, &_save);
272         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
273         NDR_CHECK(ndr_pull_uint32(ndr, &_size));
274         NDR_CHECK(ndr_pull_limit_size(ndr, _size, 4));
275         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_root_dir));
276         if (_ptr_root_dir) {
277                 NDR_ALLOC(ndr, r->root_dir);
278         } else {
279                 r->root_dir = NULL;
280         }
281         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_object_name));
282         if (_ptr_object_name) {
283                 NDR_ALLOC(ndr, r->object_name);
284         } else {
285                 r->object_name = NULL;
286         }
287         NDR_CHECK(ndr_pull_uint32(ndr, &r->attributes));
288         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sec_desc));
289         if (_ptr_sec_desc) {
290                 NDR_ALLOC(ndr, r->sec_desc);
291         } else {
292                 r->sec_desc = NULL;
293         }
294         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sec_qos));
295         if (_ptr_sec_qos) {
296                 NDR_ALLOC(ndr, r->sec_qos);
297         } else {
298                 r->sec_qos = NULL;
299         }
300 buffers:
301         if (!(ndr_flags & NDR_BUFFERS)) goto done;
302         if (r->root_dir) {
303                 NDR_CHECK(ndr_pull_uint8(ndr, r->root_dir));
304         }
305         if (r->object_name) {
306                 NDR_CHECK(ndr_pull_unistr(ndr, &r->object_name));
307         }
308         if (r->sec_desc) {
309                 NDR_CHECK(ndr_pull_security_descriptor(ndr, r->sec_desc));
310         }
311         if (r->sec_qos) {
312                 NDR_CHECK(ndr_pull_lsa_QosInfo(ndr, ndr_flags, r->sec_qos));
313         }
314         ndr_pull_restore(ndr, &_save);
315         NDR_CHECK(ndr_pull_advance(ndr, _size));
316 done:
317         return NT_STATUS_OK;
318 }
319
320 NTSTATUS ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, struct lsa_OpenPolicy *r)
321 {
322         NDR_CHECK(ndr_push_ptr(ndr, r->in.system_name));
323         if (r->in.system_name) {
324                 NDR_CHECK(ndr_push_uint16(ndr, *r->in.system_name));
325         }
326         NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
327         NDR_CHECK(ndr_push_uint32(ndr, r->in.desired_access));
328
329         return NT_STATUS_OK;
330 }
331
332 NTSTATUS ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, struct lsa_OpenPolicy *r)
333 {
334         NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle));
335         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
336
337         return NT_STATUS_OK;
338 }
339
340 NTSTATUS ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, struct lsa_QueryInfoPolicy *r)
341 {
342
343         return NT_STATUS_OK;
344 }
345
346 NTSTATUS ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, struct lsa_QueryInfoPolicy *r)
347 {
348         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
349
350         return NT_STATUS_OK;
351 }
352
353 NTSTATUS ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, struct lsa_SetInfoPolicy *r)
354 {
355
356         return NT_STATUS_OK;
357 }
358
359 NTSTATUS ndr_pull_lsa_SetInfoPolicy(struct ndr_pull *ndr, struct lsa_SetInfoPolicy *r)
360 {
361         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
362
363         return NT_STATUS_OK;
364 }
365
366 NTSTATUS ndr_push_lsa_ClearAuditLog(struct ndr_push *ndr, struct lsa_ClearAuditLog *r)
367 {
368
369         return NT_STATUS_OK;
370 }
371
372 NTSTATUS ndr_pull_lsa_ClearAuditLog(struct ndr_pull *ndr, struct lsa_ClearAuditLog *r)
373 {
374         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
375
376         return NT_STATUS_OK;
377 }
378
379 NTSTATUS ndr_push_lsa_CreateAccount(struct ndr_push *ndr, struct lsa_CreateAccount *r)
380 {
381
382         return NT_STATUS_OK;
383 }
384
385 NTSTATUS ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, struct lsa_CreateAccount *r)
386 {
387         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
388
389         return NT_STATUS_OK;
390 }
391
392 static NTSTATUS ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags, struct lsa_SidPtr *r)
393 {
394         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
395         NDR_CHECK(ndr_push_ptr(ndr, r->sid));
396 buffers:
397         if (!(ndr_flags & NDR_BUFFERS)) goto done;
398         if (r->sid) {
399                 NDR_CHECK(ndr_push_dom_sid2(ndr, r->sid));
400         }
401 done:
402         return NT_STATUS_OK;
403 }
404
405 static NTSTATUS ndr_pull_lsa_SidPtr(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidPtr *r)
406 {
407         uint32 _ptr_sid;
408         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
409         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sid));
410         if (_ptr_sid) {
411                 NDR_ALLOC(ndr, r->sid);
412         } else {
413                 r->sid = NULL;
414         }
415 buffers:
416         if (!(ndr_flags & NDR_BUFFERS)) goto done;
417         if (r->sid) {
418                 NDR_CHECK(ndr_pull_dom_sid2(ndr, r->sid));
419         }
420 done:
421         return NT_STATUS_OK;
422 }
423
424 static NTSTATUS ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, struct lsa_SidArray *r)
425 {
426         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
427         NDR_CHECK(ndr_push_uint32(ndr, r->num_sids));
428         NDR_CHECK(ndr_push_ptr(ndr, r->sids));
429 buffers:
430         if (!(ndr_flags & NDR_BUFFERS)) goto done;
431         if (r->sids) {
432                 NDR_CHECK(ndr_push_array(ndr, ndr_flags, r->sids, sizeof(r->sids[0]), r->num_sids, (ndr_push_flags_fn_t)ndr_push_lsa_SidPtr));
433         }
434 done:
435         return NT_STATUS_OK;
436 }
437
438 static NTSTATUS ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r)
439 {
440         uint32 _ptr_sids;
441         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
442         NDR_CHECK(ndr_pull_uint32(ndr, &r->num_sids));
443         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sids));
444         if (_ptr_sids) {
445                 NDR_ALLOC(ndr, r->sids);
446         } else {
447                 r->sids = NULL;
448         }
449 buffers:
450         if (!(ndr_flags & NDR_BUFFERS)) goto done;
451         if (r->sids) {
452                 NDR_ALLOC_N_SIZE(ndr, r->sids, r->num_sids, sizeof(r->sids[0]));
453                 NDR_CHECK(ndr_pull_array(ndr, ndr_flags, (void **)r->sids, sizeof(r->sids[0]), r->num_sids, (ndr_pull_flags_fn_t)ndr_pull_lsa_SidPtr));
454         }
455 done:
456         return NT_STATUS_OK;
457 }
458
459 NTSTATUS ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, struct lsa_EnumAccounts *r)
460 {
461         NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
462         NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle));
463         NDR_CHECK(ndr_push_uint32(ndr, r->in.num_entries));
464
465         return NT_STATUS_OK;
466 }
467
468 NTSTATUS ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, struct lsa_EnumAccounts *r)
469 {
470         NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle));
471         NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
472         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
473
474         return NT_STATUS_OK;
475 }
476
477 NTSTATUS ndr_push_lsa_CreateTrustDom(struct ndr_push *ndr, struct lsa_CreateTrustDom *r)
478 {
479
480         return NT_STATUS_OK;
481 }
482
483 NTSTATUS ndr_pull_lsa_CreateTrustDom(struct ndr_pull *ndr, struct lsa_CreateTrustDom *r)
484 {
485         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
486
487         return NT_STATUS_OK;
488 }
489
490 static NTSTATUS ndr_push_lsa_DomainInformation(struct ndr_push *ndr, int ndr_flags, struct lsa_DomainInformation *r)
491 {
492         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
493         NDR_CHECK(ndr_push_lsa_Name(ndr, NDR_SCALARS, &r->name));
494         NDR_CHECK(ndr_push_ptr(ndr, r->sid));
495 buffers:
496         if (!(ndr_flags & NDR_BUFFERS)) goto done;
497                 NDR_CHECK(ndr_push_lsa_Name(ndr, ndr_flags, &r->name));
498         if (r->sid) {
499                 NDR_CHECK(ndr_push_dom_sid2(ndr, r->sid));
500         }
501 done:
502         return NT_STATUS_OK;
503 }
504
505 static NTSTATUS ndr_pull_lsa_DomainInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInformation *r)
506 {
507         uint32 _ptr_sid;
508         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
509         NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name));
510         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sid));
511         if (_ptr_sid) {
512                 NDR_ALLOC(ndr, r->sid);
513         } else {
514                 r->sid = NULL;
515         }
516 buffers:
517         if (!(ndr_flags & NDR_BUFFERS)) goto done;
518                 NDR_CHECK(ndr_pull_lsa_Name(ndr, ndr_flags, &r->name));
519         if (r->sid) {
520                 NDR_CHECK(ndr_pull_dom_sid2(ndr, r->sid));
521         }
522 done:
523         return NT_STATUS_OK;
524 }
525
526 static NTSTATUS ndr_push_lsa_DomainList(struct ndr_push *ndr, int ndr_flags, struct lsa_DomainList *r)
527 {
528         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
529         NDR_CHECK(ndr_push_uint32(ndr, r->count));
530         NDR_CHECK(ndr_push_ptr(ndr, r->domains));
531 buffers:
532         if (!(ndr_flags & NDR_BUFFERS)) goto done;
533         if (r->domains) {
534                 NDR_CHECK(ndr_push_array(ndr, ndr_flags, r->domains, sizeof(r->domains[0]), r->count, (ndr_push_flags_fn_t)ndr_push_lsa_DomainInformation));
535         }
536 done:
537         return NT_STATUS_OK;
538 }
539
540 static NTSTATUS ndr_pull_lsa_DomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainList *r)
541 {
542         uint32 _ptr_domains;
543         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
544         NDR_CHECK(ndr_pull_uint32(ndr, &r->count));
545         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domains));
546         if (_ptr_domains) {
547                 NDR_ALLOC(ndr, r->domains);
548         } else {
549                 r->domains = NULL;
550         }
551 buffers:
552         if (!(ndr_flags & NDR_BUFFERS)) goto done;
553         if (r->domains) {
554                 NDR_ALLOC_N_SIZE(ndr, r->domains, r->count, sizeof(r->domains[0]));
555                 NDR_CHECK(ndr_pull_array(ndr, ndr_flags, (void **)r->domains, sizeof(r->domains[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_lsa_DomainInformation));
556         }
557 done:
558         return NT_STATUS_OK;
559 }
560
561 NTSTATUS ndr_push_lsa_EnumTrustDom(struct ndr_push *ndr, struct lsa_EnumTrustDom *r)
562 {
563         NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
564         NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle));
565         NDR_CHECK(ndr_push_uint32(ndr, r->in.num_entries));
566
567         return NT_STATUS_OK;
568 }
569
570 NTSTATUS ndr_pull_lsa_EnumTrustDom(struct ndr_pull *ndr, struct lsa_EnumTrustDom *r)
571 {
572         NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle));
573         NDR_CHECK(ndr_pull_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
574         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
575
576         return NT_STATUS_OK;
577 }
578
579 static NTSTATUS ndr_push_lsa_TranslatedSid(struct ndr_push *ndr, int ndr_flags, struct lsa_TranslatedSid *r)
580 {
581         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
582         NDR_CHECK(ndr_push_uint16(ndr, r->sid_type));
583         NDR_CHECK(ndr_push_uint32(ndr, r->rid));
584         NDR_CHECK(ndr_push_uint32(ndr, r->sid_index));
585 buffers:
586         if (!(ndr_flags & NDR_BUFFERS)) goto done;
587 done:
588         return NT_STATUS_OK;
589 }
590
591 static NTSTATUS ndr_pull_lsa_TranslatedSid(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid *r)
592 {
593         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
594         NDR_CHECK(ndr_pull_uint16(ndr, &r->sid_type));
595         NDR_CHECK(ndr_pull_uint32(ndr, &r->rid));
596         NDR_CHECK(ndr_pull_uint32(ndr, &r->sid_index));
597 buffers:
598         if (!(ndr_flags & NDR_BUFFERS)) goto done;
599 done:
600         return NT_STATUS_OK;
601 }
602
603 static NTSTATUS ndr_push_lsa_TransSidArray(struct ndr_push *ndr, int ndr_flags, struct lsa_TransSidArray *r)
604 {
605         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
606         NDR_CHECK(ndr_push_uint32(ndr, r->count));
607         NDR_CHECK(ndr_push_ptr(ndr, r->sids));
608 buffers:
609         if (!(ndr_flags & NDR_BUFFERS)) goto done;
610         if (r->sids) {
611                 NDR_CHECK(ndr_push_array(ndr, ndr_flags, r->sids, sizeof(r->sids[0]), r->count, (ndr_push_flags_fn_t)ndr_push_lsa_TranslatedSid));
612         }
613 done:
614         return NT_STATUS_OK;
615 }
616
617 static NTSTATUS ndr_pull_lsa_TransSidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray *r)
618 {
619         uint32 _ptr_sids;
620         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
621         NDR_CHECK(ndr_pull_uint32(ndr, &r->count));
622         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sids));
623         if (_ptr_sids) {
624                 NDR_ALLOC(ndr, r->sids);
625         } else {
626                 r->sids = NULL;
627         }
628 buffers:
629         if (!(ndr_flags & NDR_BUFFERS)) goto done;
630         if (r->sids) {
631                 NDR_ALLOC_N_SIZE(ndr, r->sids, r->count, sizeof(r->sids[0]));
632                 NDR_CHECK(ndr_pull_array(ndr, ndr_flags, (void **)r->sids, sizeof(r->sids[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_lsa_TranslatedSid));
633         }
634 done:
635         return NT_STATUS_OK;
636 }
637
638 static NTSTATUS ndr_push_lsa_TrustInformation(struct ndr_push *ndr, int ndr_flags, struct lsa_TrustInformation *r)
639 {
640         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
641         NDR_CHECK(ndr_push_lsa_Name(ndr, NDR_SCALARS, &r->name));
642         NDR_CHECK(ndr_push_ptr(ndr, r->sid));
643 buffers:
644         if (!(ndr_flags & NDR_BUFFERS)) goto done;
645                 NDR_CHECK(ndr_push_lsa_Name(ndr, ndr_flags, &r->name));
646         if (r->sid) {
647                 NDR_CHECK(ndr_push_dom_sid2(ndr, r->sid));
648         }
649 done:
650         return NT_STATUS_OK;
651 }
652
653 static NTSTATUS ndr_pull_lsa_TrustInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustInformation *r)
654 {
655         uint32 _ptr_sid;
656         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
657         NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name));
658         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sid));
659         if (_ptr_sid) {
660                 NDR_ALLOC(ndr, r->sid);
661         } else {
662                 r->sid = NULL;
663         }
664 buffers:
665         if (!(ndr_flags & NDR_BUFFERS)) goto done;
666                 NDR_CHECK(ndr_pull_lsa_Name(ndr, ndr_flags, &r->name));
667         if (r->sid) {
668                 NDR_CHECK(ndr_pull_dom_sid2(ndr, r->sid));
669         }
670 done:
671         return NT_STATUS_OK;
672 }
673
674 static NTSTATUS ndr_push_lsa_RefDomainList(struct ndr_push *ndr, int ndr_flags, struct lsa_RefDomainList *r)
675 {
676         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
677         NDR_CHECK(ndr_push_uint32(ndr, r->count));
678         NDR_CHECK(ndr_push_ptr(ndr, r->domains));
679         NDR_CHECK(ndr_push_uint32(ndr, r->max_count));
680 buffers:
681         if (!(ndr_flags & NDR_BUFFERS)) goto done;
682         if (r->domains) {
683                 NDR_CHECK(ndr_push_array(ndr, ndr_flags, r->domains, sizeof(r->domains[0]), r->count, (ndr_push_flags_fn_t)ndr_push_lsa_TrustInformation));
684         }
685 done:
686         return NT_STATUS_OK;
687 }
688
689 static NTSTATUS ndr_pull_lsa_RefDomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_RefDomainList *r)
690 {
691         uint32 _ptr_domains;
692         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
693         NDR_CHECK(ndr_pull_uint32(ndr, &r->count));
694         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domains));
695         if (_ptr_domains) {
696                 NDR_ALLOC(ndr, r->domains);
697         } else {
698                 r->domains = NULL;
699         }
700         NDR_CHECK(ndr_pull_uint32(ndr, &r->max_count));
701 buffers:
702         if (!(ndr_flags & NDR_BUFFERS)) goto done;
703         if (r->domains) {
704                 NDR_ALLOC_N_SIZE(ndr, r->domains, r->count, sizeof(r->domains[0]));
705                 NDR_CHECK(ndr_pull_array(ndr, ndr_flags, (void **)r->domains, sizeof(r->domains[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_lsa_TrustInformation));
706         }
707 done:
708         return NT_STATUS_OK;
709 }
710
711 NTSTATUS ndr_push_lsa_LookupNames(struct ndr_push *ndr, struct lsa_LookupNames *r)
712 {
713         NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
714         NDR_CHECK(ndr_push_uint32(ndr, r->in.num_names));
715         if (r->in.names) {
716                 int ndr_flags = NDR_SCALARS|NDR_BUFFERS;
717                 NDR_CHECK(ndr_push_array(ndr, ndr_flags, r->in.names, sizeof(r->in.names[0]), r->in.num_names, (ndr_push_flags_fn_t)ndr_push_lsa_Name));
718         }
719         NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
720         NDR_CHECK(ndr_push_uint16(ndr, r->in.level));
721         NDR_CHECK(ndr_push_uint32(ndr, *r->in.count));
722
723         return NT_STATUS_OK;
724 }
725
726 NTSTATUS ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, struct lsa_LookupNames *r)
727 {
728         uint32 _ptr_domains;
729         NDR_ALLOC(ndr, r->out.domains);
730         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domains));
731         if (_ptr_domains) {
732                 NDR_ALLOC(ndr, r->out.domains);
733         } else {
734                 r->out.domains = NULL;
735         }
736         if (r->out.domains) {
737                 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
738         }
739         NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
740         NDR_CHECK(ndr_pull_uint32(ndr, r->out.count));
741         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
742
743         return NT_STATUS_OK;
744 }
745
746 static NTSTATUS ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int ndr_flags, struct lsa_TranslatedName *r)
747 {
748         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
749         NDR_CHECK(ndr_push_uint16(ndr, r->sid_type));
750         NDR_CHECK(ndr_push_lsa_Name(ndr, NDR_SCALARS, &r->name));
751         NDR_CHECK(ndr_push_uint32(ndr, r->sid_index));
752 buffers:
753         if (!(ndr_flags & NDR_BUFFERS)) goto done;
754                 NDR_CHECK(ndr_push_lsa_Name(ndr, ndr_flags, &r->name));
755 done:
756         return NT_STATUS_OK;
757 }
758
759 static NTSTATUS ndr_pull_lsa_TranslatedName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName *r)
760 {
761         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
762         NDR_CHECK(ndr_pull_uint16(ndr, &r->sid_type));
763         NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name));
764         NDR_CHECK(ndr_pull_uint32(ndr, &r->sid_index));
765 buffers:
766         if (!(ndr_flags & NDR_BUFFERS)) goto done;
767                 NDR_CHECK(ndr_pull_lsa_Name(ndr, ndr_flags, &r->name));
768 done:
769         return NT_STATUS_OK;
770 }
771
772 static NTSTATUS ndr_push_lsa_TransNameArray(struct ndr_push *ndr, int ndr_flags, struct lsa_TransNameArray *r)
773 {
774         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
775         NDR_CHECK(ndr_push_uint32(ndr, r->count));
776         NDR_CHECK(ndr_push_ptr(ndr, r->names));
777 buffers:
778         if (!(ndr_flags & NDR_BUFFERS)) goto done;
779         if (r->names) {
780                 NDR_CHECK(ndr_push_array(ndr, ndr_flags, r->names, sizeof(r->names[0]), r->count, (ndr_push_flags_fn_t)ndr_push_lsa_TranslatedName));
781         }
782 done:
783         return NT_STATUS_OK;
784 }
785
786 static NTSTATUS ndr_pull_lsa_TransNameArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray *r)
787 {
788         uint32 _ptr_names;
789         if (!(ndr_flags & NDR_SCALARS)) goto buffers;
790         NDR_CHECK(ndr_pull_uint32(ndr, &r->count));
791         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_names));
792         if (_ptr_names) {
793                 NDR_ALLOC(ndr, r->names);
794         } else {
795                 r->names = NULL;
796         }
797 buffers:
798         if (!(ndr_flags & NDR_BUFFERS)) goto done;
799         if (r->names) {
800                 NDR_ALLOC_N_SIZE(ndr, r->names, r->count, sizeof(r->names[0]));
801                 NDR_CHECK(ndr_pull_array(ndr, ndr_flags, (void **)r->names, sizeof(r->names[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_lsa_TranslatedName));
802         }
803 done:
804         return NT_STATUS_OK;
805 }
806
807 NTSTATUS ndr_push_lsa_LookupSids(struct ndr_push *ndr, struct lsa_LookupSids *r)
808 {
809         NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
810         NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
811         NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
812         NDR_CHECK(ndr_push_uint16(ndr, r->in.level));
813         NDR_CHECK(ndr_push_uint32(ndr, *r->in.count));
814
815         return NT_STATUS_OK;
816 }
817
818 NTSTATUS ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, struct lsa_LookupSids *r)
819 {
820         uint32 _ptr_domains;
821         NDR_ALLOC(ndr, r->out.domains);
822         NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domains));
823         if (_ptr_domains) {
824                 NDR_ALLOC(ndr, r->out.domains);
825         } else {
826                 r->out.domains = NULL;
827         }
828         if (r->out.domains) {
829                 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
830         }
831         NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
832         NDR_CHECK(ndr_pull_uint32(ndr, r->out.count));
833         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
834
835         return NT_STATUS_OK;
836 }
837
838 NTSTATUS ndr_push_CREATESECRET(struct ndr_push *ndr, struct CREATESECRET *r)
839 {
840
841         return NT_STATUS_OK;
842 }
843
844 NTSTATUS ndr_pull_CREATESECRET(struct ndr_pull *ndr, struct CREATESECRET *r)
845 {
846         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
847
848         return NT_STATUS_OK;
849 }
850
851 NTSTATUS ndr_push_lsa_OpenAccount(struct ndr_push *ndr, struct lsa_OpenAccount *r)
852 {
853         NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
854         NDR_CHECK(ndr_push_dom_sid2(ndr, r->in.sid));
855         NDR_CHECK(ndr_push_uint32(ndr, r->in.desired_access));
856
857         return NT_STATUS_OK;
858 }
859
860 NTSTATUS ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, struct lsa_OpenAccount *r)
861 {
862         NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.acct_handle));
863         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
864
865         return NT_STATUS_OK;
866 }
867
868 NTSTATUS ndr_push_ENUMPRIVSACCOUNT(struct ndr_push *ndr, struct ENUMPRIVSACCOUNT *r)
869 {
870
871         return NT_STATUS_OK;
872 }
873
874 NTSTATUS ndr_pull_ENUMPRIVSACCOUNT(struct ndr_pull *ndr, struct ENUMPRIVSACCOUNT *r)
875 {
876         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
877
878         return NT_STATUS_OK;
879 }
880
881 NTSTATUS ndr_push_ADDPRIVS(struct ndr_push *ndr, struct ADDPRIVS *r)
882 {
883
884         return NT_STATUS_OK;
885 }
886
887 NTSTATUS ndr_pull_ADDPRIVS(struct ndr_pull *ndr, struct ADDPRIVS *r)
888 {
889         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
890
891         return NT_STATUS_OK;
892 }
893
894 NTSTATUS ndr_push_REMOVEPRIVS(struct ndr_push *ndr, struct REMOVEPRIVS *r)
895 {
896
897         return NT_STATUS_OK;
898 }
899
900 NTSTATUS ndr_pull_REMOVEPRIVS(struct ndr_pull *ndr, struct REMOVEPRIVS *r)
901 {
902         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
903
904         return NT_STATUS_OK;
905 }
906
907 NTSTATUS ndr_push_GETQUOTAS(struct ndr_push *ndr, struct GETQUOTAS *r)
908 {
909
910         return NT_STATUS_OK;
911 }
912
913 NTSTATUS ndr_pull_GETQUOTAS(struct ndr_pull *ndr, struct GETQUOTAS *r)
914 {
915         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
916
917         return NT_STATUS_OK;
918 }
919
920 NTSTATUS ndr_push_SETQUOTAS(struct ndr_push *ndr, struct SETQUOTAS *r)
921 {
922
923         return NT_STATUS_OK;
924 }
925
926 NTSTATUS ndr_pull_SETQUOTAS(struct ndr_pull *ndr, struct SETQUOTAS *r)
927 {
928         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
929
930         return NT_STATUS_OK;
931 }
932
933 NTSTATUS ndr_push_GETSYSTEMACCOUNT(struct ndr_push *ndr, struct GETSYSTEMACCOUNT *r)
934 {
935
936         return NT_STATUS_OK;
937 }
938
939 NTSTATUS ndr_pull_GETSYSTEMACCOUNT(struct ndr_pull *ndr, struct GETSYSTEMACCOUNT *r)
940 {
941         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
942
943         return NT_STATUS_OK;
944 }
945
946 NTSTATUS ndr_push_SETSYSTEMACCOUNT(struct ndr_push *ndr, struct SETSYSTEMACCOUNT *r)
947 {
948
949         return NT_STATUS_OK;
950 }
951
952 NTSTATUS ndr_pull_SETSYSTEMACCOUNT(struct ndr_pull *ndr, struct SETSYSTEMACCOUNT *r)
953 {
954         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
955
956         return NT_STATUS_OK;
957 }
958
959 NTSTATUS ndr_push_OPENTRUSTDOM(struct ndr_push *ndr, struct OPENTRUSTDOM *r)
960 {
961
962         return NT_STATUS_OK;
963 }
964
965 NTSTATUS ndr_pull_OPENTRUSTDOM(struct ndr_pull *ndr, struct OPENTRUSTDOM *r)
966 {
967         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
968
969         return NT_STATUS_OK;
970 }
971
972 NTSTATUS ndr_push_QUERYTRUSTDOM(struct ndr_push *ndr, struct QUERYTRUSTDOM *r)
973 {
974
975         return NT_STATUS_OK;
976 }
977
978 NTSTATUS ndr_pull_QUERYTRUSTDOM(struct ndr_pull *ndr, struct QUERYTRUSTDOM *r)
979 {
980         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
981
982         return NT_STATUS_OK;
983 }
984
985 NTSTATUS ndr_push_SETINFOTRUSTDOM(struct ndr_push *ndr, struct SETINFOTRUSTDOM *r)
986 {
987
988         return NT_STATUS_OK;
989 }
990
991 NTSTATUS ndr_pull_SETINFOTRUSTDOM(struct ndr_pull *ndr, struct SETINFOTRUSTDOM *r)
992 {
993         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
994
995         return NT_STATUS_OK;
996 }
997
998 NTSTATUS ndr_push_OPENSECRET(struct ndr_push *ndr, struct OPENSECRET *r)
999 {
1000
1001         return NT_STATUS_OK;
1002 }
1003
1004 NTSTATUS ndr_pull_OPENSECRET(struct ndr_pull *ndr, struct OPENSECRET *r)
1005 {
1006         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1007
1008         return NT_STATUS_OK;
1009 }
1010
1011 NTSTATUS ndr_push_SETSECRET(struct ndr_push *ndr, struct SETSECRET *r)
1012 {
1013
1014         return NT_STATUS_OK;
1015 }
1016
1017 NTSTATUS ndr_pull_SETSECRET(struct ndr_pull *ndr, struct SETSECRET *r)
1018 {
1019         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1020
1021         return NT_STATUS_OK;
1022 }
1023
1024 NTSTATUS ndr_push_QUERYSECRET(struct ndr_push *ndr, struct QUERYSECRET *r)
1025 {
1026
1027         return NT_STATUS_OK;
1028 }
1029
1030 NTSTATUS ndr_pull_QUERYSECRET(struct ndr_pull *ndr, struct QUERYSECRET *r)
1031 {
1032         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1033
1034         return NT_STATUS_OK;
1035 }
1036
1037 NTSTATUS ndr_push_LOOKUPPRIVVALUE(struct ndr_push *ndr, struct LOOKUPPRIVVALUE *r)
1038 {
1039
1040         return NT_STATUS_OK;
1041 }
1042
1043 NTSTATUS ndr_pull_LOOKUPPRIVVALUE(struct ndr_pull *ndr, struct LOOKUPPRIVVALUE *r)
1044 {
1045         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1046
1047         return NT_STATUS_OK;
1048 }
1049
1050 NTSTATUS ndr_push_LOOKUPPRIVNAME(struct ndr_push *ndr, struct LOOKUPPRIVNAME *r)
1051 {
1052
1053         return NT_STATUS_OK;
1054 }
1055
1056 NTSTATUS ndr_pull_LOOKUPPRIVNAME(struct ndr_pull *ndr, struct LOOKUPPRIVNAME *r)
1057 {
1058         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1059
1060         return NT_STATUS_OK;
1061 }
1062
1063 NTSTATUS ndr_push_PRIV_GET_DISPNAME(struct ndr_push *ndr, struct PRIV_GET_DISPNAME *r)
1064 {
1065
1066         return NT_STATUS_OK;
1067 }
1068
1069 NTSTATUS ndr_pull_PRIV_GET_DISPNAME(struct ndr_pull *ndr, struct PRIV_GET_DISPNAME *r)
1070 {
1071         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1072
1073         return NT_STATUS_OK;
1074 }
1075
1076 NTSTATUS ndr_push_DELETEOBJECT(struct ndr_push *ndr, struct DELETEOBJECT *r)
1077 {
1078
1079         return NT_STATUS_OK;
1080 }
1081
1082 NTSTATUS ndr_pull_DELETEOBJECT(struct ndr_pull *ndr, struct DELETEOBJECT *r)
1083 {
1084         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1085
1086         return NT_STATUS_OK;
1087 }
1088
1089 NTSTATUS ndr_push_ENUMACCTWITHRIGHT(struct ndr_push *ndr, struct ENUMACCTWITHRIGHT *r)
1090 {
1091
1092         return NT_STATUS_OK;
1093 }
1094
1095 NTSTATUS ndr_pull_ENUMACCTWITHRIGHT(struct ndr_pull *ndr, struct ENUMACCTWITHRIGHT *r)
1096 {
1097         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1098
1099         return NT_STATUS_OK;
1100 }
1101
1102 NTSTATUS ndr_push_ENUMACCTRIGHTS(struct ndr_push *ndr, struct ENUMACCTRIGHTS *r)
1103 {
1104
1105         return NT_STATUS_OK;
1106 }
1107
1108 NTSTATUS ndr_pull_ENUMACCTRIGHTS(struct ndr_pull *ndr, struct ENUMACCTRIGHTS *r)
1109 {
1110         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1111
1112         return NT_STATUS_OK;
1113 }
1114
1115 NTSTATUS ndr_push_ADDACCTRIGHTS(struct ndr_push *ndr, struct ADDACCTRIGHTS *r)
1116 {
1117
1118         return NT_STATUS_OK;
1119 }
1120
1121 NTSTATUS ndr_pull_ADDACCTRIGHTS(struct ndr_pull *ndr, struct ADDACCTRIGHTS *r)
1122 {
1123         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1124
1125         return NT_STATUS_OK;
1126 }
1127
1128 NTSTATUS ndr_push_REMOVEACCTRIGHTS(struct ndr_push *ndr, struct REMOVEACCTRIGHTS *r)
1129 {
1130
1131         return NT_STATUS_OK;
1132 }
1133
1134 NTSTATUS ndr_pull_REMOVEACCTRIGHTS(struct ndr_pull *ndr, struct REMOVEACCTRIGHTS *r)
1135 {
1136         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1137
1138         return NT_STATUS_OK;
1139 }
1140
1141 NTSTATUS ndr_push_QUERYTRUSTDOMINFO(struct ndr_push *ndr, struct QUERYTRUSTDOMINFO *r)
1142 {
1143
1144         return NT_STATUS_OK;
1145 }
1146
1147 NTSTATUS ndr_pull_QUERYTRUSTDOMINFO(struct ndr_pull *ndr, struct QUERYTRUSTDOMINFO *r)
1148 {
1149         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1150
1151         return NT_STATUS_OK;
1152 }
1153
1154 NTSTATUS ndr_push_SETTRUSTDOMINFO(struct ndr_push *ndr, struct SETTRUSTDOMINFO *r)
1155 {
1156
1157         return NT_STATUS_OK;
1158 }
1159
1160 NTSTATUS ndr_pull_SETTRUSTDOMINFO(struct ndr_pull *ndr, struct SETTRUSTDOMINFO *r)
1161 {
1162         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1163
1164         return NT_STATUS_OK;
1165 }
1166
1167 NTSTATUS ndr_push_DELETETRUSTDOM(struct ndr_push *ndr, struct DELETETRUSTDOM *r)
1168 {
1169
1170         return NT_STATUS_OK;
1171 }
1172
1173 NTSTATUS ndr_pull_DELETETRUSTDOM(struct ndr_pull *ndr, struct DELETETRUSTDOM *r)
1174 {
1175         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1176
1177         return NT_STATUS_OK;
1178 }
1179
1180 NTSTATUS ndr_push_STOREPRIVDATA(struct ndr_push *ndr, struct STOREPRIVDATA *r)
1181 {
1182
1183         return NT_STATUS_OK;
1184 }
1185
1186 NTSTATUS ndr_pull_STOREPRIVDATA(struct ndr_pull *ndr, struct STOREPRIVDATA *r)
1187 {
1188         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1189
1190         return NT_STATUS_OK;
1191 }
1192
1193 NTSTATUS ndr_push_RETRPRIVDATA(struct ndr_push *ndr, struct RETRPRIVDATA *r)
1194 {
1195
1196         return NT_STATUS_OK;
1197 }
1198
1199 NTSTATUS ndr_pull_RETRPRIVDATA(struct ndr_pull *ndr, struct RETRPRIVDATA *r)
1200 {
1201         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1202
1203         return NT_STATUS_OK;
1204 }
1205
1206 NTSTATUS ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, struct lsa_OpenPolicy2 *r)
1207 {
1208         NDR_CHECK(ndr_push_ptr(ndr, r->in.system_name));
1209         if (r->in.system_name) {
1210                 NDR_CHECK(ndr_push_unistr(ndr, r->in.system_name));
1211         }
1212         NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
1213         NDR_CHECK(ndr_push_uint32(ndr, r->in.desired_access));
1214
1215         return NT_STATUS_OK;
1216 }
1217
1218 NTSTATUS ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, struct lsa_OpenPolicy2 *r)
1219 {
1220         NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle));
1221         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1222
1223         return NT_STATUS_OK;
1224 }
1225
1226 NTSTATUS ndr_push_UNK_GET_CONNUSER(struct ndr_push *ndr, struct UNK_GET_CONNUSER *r)
1227 {
1228
1229         return NT_STATUS_OK;
1230 }
1231
1232 NTSTATUS ndr_pull_UNK_GET_CONNUSER(struct ndr_pull *ndr, struct UNK_GET_CONNUSER *r)
1233 {
1234         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1235
1236         return NT_STATUS_OK;
1237 }
1238
1239 NTSTATUS ndr_push_QUERYINFO2(struct ndr_push *ndr, struct QUERYINFO2 *r)
1240 {
1241
1242         return NT_STATUS_OK;
1243 }
1244
1245 NTSTATUS ndr_pull_QUERYINFO2(struct ndr_pull *ndr, struct QUERYINFO2 *r)
1246 {
1247         NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
1248
1249         return NT_STATUS_OK;
1250 }
1251