Line data Source code
1 : /* s3 compat server functions auto-generated by pidl */
2 : #include "bin/default/librpc/gen_ndr/ndr_samr.h"
3 : #include "bin/default/librpc/gen_ndr/ndr_samr_scompat.h"
4 : #include <librpc/rpc/dcesrv_core.h>
5 : #include <rpc_server/rpc_config.h>
6 : #include <rpc_server/rpc_server.h>
7 : #include <util/debug.h>
8 :
9 : enum s3compat_rpc_dispatch {
10 : S3COMPAT_RPC_DISPATCH_EXTERNAL = 0x00000001,
11 : S3COMPAT_RPC_DISPATCH_INTERNAL = 0x00000002,
12 : };
13 :
14 : /* samr - dcerpc server boilerplate generated by pidl */
15 59 : static NTSTATUS samr__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
16 : {
17 : #ifdef DCESRV_INTERFACE_SAMR_BIND
18 : return DCESRV_INTERFACE_SAMR_BIND(context,iface);
19 : #else
20 59 : return NT_STATUS_OK;
21 : #endif
22 : }
23 :
24 59 : static void samr__op_unbind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
25 : {
26 : #ifdef DCESRV_INTERFACE_SAMR_UNBIND
27 : DCESRV_INTERFACE_SAMR_UNBIND(context, iface);
28 : #else
29 59 : return;
30 : #endif
31 : }
32 :
33 471 : NTSTATUS samr__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
34 : {
35 : enum ndr_err_code ndr_err;
36 471 : uint16_t opnum = dce_call->pkt.u.request.opnum;
37 :
38 471 : dce_call->fault_code = 0;
39 :
40 471 : if (opnum >= ndr_table_samr.num_calls) {
41 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
42 0 : return NT_STATUS_NET_WRITE_FAULT;
43 : }
44 :
45 471 : *r = talloc_named(mem_ctx, ndr_table_samr.calls[opnum].struct_size, "struct %s", ndr_table_samr.calls[opnum].name);
46 471 : NT_STATUS_HAVE_NO_MEMORY(*r);
47 :
48 : /* unravel the NDR for the packet */
49 471 : ndr_err = ndr_table_samr.calls[opnum].ndr_pull(pull, NDR_IN, *r);
50 471 : if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
51 0 : dce_call->fault_code = DCERPC_FAULT_NDR;
52 0 : return NT_STATUS_NET_WRITE_FAULT;
53 : }
54 :
55 471 : return NT_STATUS_OK;
56 : }
57 :
58 471 : static NTSTATUS samr__op_dispatch_internal(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r, enum s3compat_rpc_dispatch dispatch)
59 : {
60 471 : uint16_t opnum = dce_call->pkt.u.request.opnum;
61 471 : struct pipes_struct *p = NULL;
62 471 : NTSTATUS status = NT_STATUS_OK;
63 471 : bool impersonated = false;
64 :
65 : /* Retrieve pipes struct */
66 471 : p = dcesrv_get_pipes_struct(dce_call->conn);
67 471 : p->dce_call = dce_call;
68 471 : p->mem_ctx = mem_ctx;
69 : /* Reset pipes struct fault state */
70 471 : p->fault_state = 0;
71 :
72 : /* Impersonate */
73 471 : if (dispatch == S3COMPAT_RPC_DISPATCH_EXTERNAL) {
74 471 : impersonated = become_authenticated_pipe_user(dce_call->auth_state->session_info);
75 471 : if (!impersonated) {
76 0 : dce_call->fault_code = DCERPC_FAULT_ACCESS_DENIED;
77 0 : status = NT_STATUS_NET_WRITE_FAULT;
78 0 : goto fail;
79 : }
80 : }
81 :
82 471 : switch (opnum) {
83 0 : case 0: { /* samr_Connect */
84 0 : struct samr_Connect *r2 = (struct samr_Connect *)r;
85 0 : if (DEBUGLEVEL >= 10) {
86 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect, NDR_IN, r2);
87 : }
88 0 : NDR_ZERO_STRUCT(r2->out);
89 0 : r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
90 0 : if (r2->out.connect_handle == NULL) {
91 0 : status = NT_STATUS_NO_MEMORY;
92 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
93 0 : goto fail;
94 : }
95 :
96 0 : r2->out.result = _samr_Connect(p, r2);
97 0 : break;
98 : }
99 50 : case 1: { /* samr_Close */
100 50 : struct samr_Close *r2 = (struct samr_Close *)r;
101 50 : if (DEBUGLEVEL >= 10) {
102 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Close, NDR_IN, r2);
103 : }
104 50 : NDR_ZERO_STRUCT(r2->out);
105 50 : r2->out.handle = r2->in.handle;
106 50 : r2->out.result = _samr_Close(p, r2);
107 50 : break;
108 : }
109 0 : case 2: { /* samr_SetSecurity */
110 0 : struct samr_SetSecurity *r2 = (struct samr_SetSecurity *)r;
111 0 : if (DEBUGLEVEL >= 10) {
112 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetSecurity, NDR_IN, r2);
113 : }
114 0 : r2->out.result = _samr_SetSecurity(p, r2);
115 0 : break;
116 : }
117 0 : case 3: { /* samr_QuerySecurity */
118 0 : struct samr_QuerySecurity *r2 = (struct samr_QuerySecurity *)r;
119 0 : if (DEBUGLEVEL >= 10) {
120 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QuerySecurity, NDR_IN, r2);
121 : }
122 0 : NDR_ZERO_STRUCT(r2->out);
123 0 : r2->out.sdbuf = talloc_zero(r2, struct sec_desc_buf *);
124 0 : if (r2->out.sdbuf == NULL) {
125 0 : status = NT_STATUS_NO_MEMORY;
126 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
127 0 : goto fail;
128 : }
129 :
130 0 : r2->out.result = _samr_QuerySecurity(p, r2);
131 0 : break;
132 : }
133 0 : case 4: { /* samr_Shutdown */
134 0 : struct samr_Shutdown *r2 = (struct samr_Shutdown *)r;
135 0 : if (DEBUGLEVEL >= 10) {
136 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Shutdown, NDR_IN, r2);
137 : }
138 0 : r2->out.result = _samr_Shutdown(p, r2);
139 0 : break;
140 : }
141 14 : case 5: { /* samr_LookupDomain */
142 14 : struct samr_LookupDomain *r2 = (struct samr_LookupDomain *)r;
143 14 : if (DEBUGLEVEL >= 10) {
144 0 : NDR_PRINT_FUNCTION_DEBUG(samr_LookupDomain, NDR_IN, r2);
145 : }
146 14 : NDR_ZERO_STRUCT(r2->out);
147 14 : r2->out.sid = talloc_zero(r2, struct dom_sid2 *);
148 14 : if (r2->out.sid == NULL) {
149 0 : status = NT_STATUS_NO_MEMORY;
150 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
151 0 : goto fail;
152 : }
153 :
154 14 : r2->out.result = _samr_LookupDomain(p, r2);
155 14 : break;
156 : }
157 4 : case 6: { /* samr_EnumDomains */
158 4 : struct samr_EnumDomains *r2 = (struct samr_EnumDomains *)r;
159 4 : if (DEBUGLEVEL >= 10) {
160 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomains, NDR_IN, r2);
161 : }
162 4 : NDR_ZERO_STRUCT(r2->out);
163 4 : r2->out.resume_handle = r2->in.resume_handle;
164 4 : r2->out.sam = talloc_zero(r2, struct samr_SamArray *);
165 4 : if (r2->out.sam == NULL) {
166 0 : status = NT_STATUS_NO_MEMORY;
167 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
168 0 : goto fail;
169 : }
170 :
171 4 : r2->out.num_entries = talloc_zero(r2, uint32_t);
172 4 : if (r2->out.num_entries == NULL) {
173 0 : status = NT_STATUS_NO_MEMORY;
174 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
175 0 : goto fail;
176 : }
177 :
178 4 : r2->out.result = _samr_EnumDomains(p, r2);
179 4 : break;
180 : }
181 56 : case 7: { /* samr_OpenDomain */
182 56 : struct samr_OpenDomain *r2 = (struct samr_OpenDomain *)r;
183 56 : if (DEBUGLEVEL >= 10) {
184 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenDomain, NDR_IN, r2);
185 : }
186 56 : NDR_ZERO_STRUCT(r2->out);
187 56 : r2->out.domain_handle = talloc_zero(r2, struct policy_handle);
188 56 : if (r2->out.domain_handle == NULL) {
189 0 : status = NT_STATUS_NO_MEMORY;
190 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
191 0 : goto fail;
192 : }
193 :
194 56 : r2->out.result = _samr_OpenDomain(p, r2);
195 56 : break;
196 : }
197 0 : case 8: { /* samr_QueryDomainInfo */
198 0 : struct samr_QueryDomainInfo *r2 = (struct samr_QueryDomainInfo *)r;
199 0 : if (DEBUGLEVEL >= 10) {
200 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo, NDR_IN, r2);
201 : }
202 0 : NDR_ZERO_STRUCT(r2->out);
203 0 : r2->out.info = talloc_zero(r2, union samr_DomainInfo *);
204 0 : if (r2->out.info == NULL) {
205 0 : status = NT_STATUS_NO_MEMORY;
206 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
207 0 : goto fail;
208 : }
209 :
210 0 : r2->out.result = _samr_QueryDomainInfo(p, r2);
211 0 : break;
212 : }
213 0 : case 9: { /* samr_SetDomainInfo */
214 0 : struct samr_SetDomainInfo *r2 = (struct samr_SetDomainInfo *)r;
215 0 : if (DEBUGLEVEL >= 10) {
216 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetDomainInfo, NDR_IN, r2);
217 : }
218 0 : r2->out.result = _samr_SetDomainInfo(p, r2);
219 0 : break;
220 : }
221 0 : case 10: { /* samr_CreateDomainGroup */
222 0 : struct samr_CreateDomainGroup *r2 = (struct samr_CreateDomainGroup *)r;
223 0 : if (DEBUGLEVEL >= 10) {
224 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomainGroup, NDR_IN, r2);
225 : }
226 0 : NDR_ZERO_STRUCT(r2->out);
227 0 : r2->out.group_handle = talloc_zero(r2, struct policy_handle);
228 0 : if (r2->out.group_handle == NULL) {
229 0 : status = NT_STATUS_NO_MEMORY;
230 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
231 0 : goto fail;
232 : }
233 :
234 0 : r2->out.rid = talloc_zero(r2, uint32_t);
235 0 : if (r2->out.rid == NULL) {
236 0 : status = NT_STATUS_NO_MEMORY;
237 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
238 0 : goto fail;
239 : }
240 :
241 0 : r2->out.result = _samr_CreateDomainGroup(p, r2);
242 0 : break;
243 : }
244 4 : case 11: { /* samr_EnumDomainGroups */
245 4 : struct samr_EnumDomainGroups *r2 = (struct samr_EnumDomainGroups *)r;
246 4 : if (DEBUGLEVEL >= 10) {
247 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainGroups, NDR_IN, r2);
248 : }
249 4 : NDR_ZERO_STRUCT(r2->out);
250 4 : r2->out.resume_handle = r2->in.resume_handle;
251 4 : r2->out.sam = talloc_zero(r2, struct samr_SamArray *);
252 4 : if (r2->out.sam == NULL) {
253 0 : status = NT_STATUS_NO_MEMORY;
254 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
255 0 : goto fail;
256 : }
257 :
258 4 : r2->out.num_entries = talloc_zero(r2, uint32_t);
259 4 : if (r2->out.num_entries == NULL) {
260 0 : status = NT_STATUS_NO_MEMORY;
261 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
262 0 : goto fail;
263 : }
264 :
265 4 : r2->out.result = _samr_EnumDomainGroups(p, r2);
266 4 : break;
267 : }
268 0 : case 12: { /* samr_CreateUser */
269 0 : struct samr_CreateUser *r2 = (struct samr_CreateUser *)r;
270 0 : if (DEBUGLEVEL >= 10) {
271 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser, NDR_IN, r2);
272 : }
273 0 : NDR_ZERO_STRUCT(r2->out);
274 0 : r2->out.user_handle = talloc_zero(r2, struct policy_handle);
275 0 : if (r2->out.user_handle == NULL) {
276 0 : status = NT_STATUS_NO_MEMORY;
277 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
278 0 : goto fail;
279 : }
280 :
281 0 : r2->out.rid = talloc_zero(r2, uint32_t);
282 0 : if (r2->out.rid == NULL) {
283 0 : status = NT_STATUS_NO_MEMORY;
284 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
285 0 : goto fail;
286 : }
287 :
288 0 : r2->out.result = _samr_CreateUser(p, r2);
289 0 : break;
290 : }
291 4 : case 13: { /* samr_EnumDomainUsers */
292 4 : struct samr_EnumDomainUsers *r2 = (struct samr_EnumDomainUsers *)r;
293 4 : if (DEBUGLEVEL >= 10) {
294 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainUsers, NDR_IN, r2);
295 : }
296 4 : NDR_ZERO_STRUCT(r2->out);
297 4 : r2->out.resume_handle = r2->in.resume_handle;
298 4 : r2->out.sam = talloc_zero(r2, struct samr_SamArray *);
299 4 : if (r2->out.sam == NULL) {
300 0 : status = NT_STATUS_NO_MEMORY;
301 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
302 0 : goto fail;
303 : }
304 :
305 4 : r2->out.num_entries = talloc_zero(r2, uint32_t);
306 4 : if (r2->out.num_entries == NULL) {
307 0 : status = NT_STATUS_NO_MEMORY;
308 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
309 0 : goto fail;
310 : }
311 :
312 4 : r2->out.result = _samr_EnumDomainUsers(p, r2);
313 4 : break;
314 : }
315 0 : case 14: { /* samr_CreateDomAlias */
316 0 : struct samr_CreateDomAlias *r2 = (struct samr_CreateDomAlias *)r;
317 0 : if (DEBUGLEVEL >= 10) {
318 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomAlias, NDR_IN, r2);
319 : }
320 0 : NDR_ZERO_STRUCT(r2->out);
321 0 : r2->out.alias_handle = talloc_zero(r2, struct policy_handle);
322 0 : if (r2->out.alias_handle == NULL) {
323 0 : status = NT_STATUS_NO_MEMORY;
324 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
325 0 : goto fail;
326 : }
327 :
328 0 : r2->out.rid = talloc_zero(r2, uint32_t);
329 0 : if (r2->out.rid == NULL) {
330 0 : status = NT_STATUS_NO_MEMORY;
331 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
332 0 : goto fail;
333 : }
334 :
335 0 : r2->out.result = _samr_CreateDomAlias(p, r2);
336 0 : break;
337 : }
338 0 : case 15: { /* samr_EnumDomainAliases */
339 0 : struct samr_EnumDomainAliases *r2 = (struct samr_EnumDomainAliases *)r;
340 0 : if (DEBUGLEVEL >= 10) {
341 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainAliases, NDR_IN, r2);
342 : }
343 0 : NDR_ZERO_STRUCT(r2->out);
344 0 : r2->out.resume_handle = r2->in.resume_handle;
345 0 : r2->out.sam = talloc_zero(r2, struct samr_SamArray *);
346 0 : if (r2->out.sam == NULL) {
347 0 : status = NT_STATUS_NO_MEMORY;
348 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
349 0 : goto fail;
350 : }
351 :
352 0 : r2->out.num_entries = talloc_zero(r2, uint32_t);
353 0 : if (r2->out.num_entries == NULL) {
354 0 : status = NT_STATUS_NO_MEMORY;
355 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
356 0 : goto fail;
357 : }
358 :
359 0 : r2->out.result = _samr_EnumDomainAliases(p, r2);
360 0 : break;
361 : }
362 152 : case 16: { /* samr_GetAliasMembership */
363 152 : struct samr_GetAliasMembership *r2 = (struct samr_GetAliasMembership *)r;
364 152 : if (DEBUGLEVEL >= 10) {
365 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetAliasMembership, NDR_IN, r2);
366 : }
367 152 : NDR_ZERO_STRUCT(r2->out);
368 152 : r2->out.rids = talloc_zero(r2, struct samr_Ids);
369 152 : if (r2->out.rids == NULL) {
370 0 : status = NT_STATUS_NO_MEMORY;
371 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
372 0 : goto fail;
373 : }
374 :
375 152 : r2->out.result = _samr_GetAliasMembership(p, r2);
376 152 : break;
377 : }
378 71 : case 17: { /* samr_LookupNames */
379 71 : struct samr_LookupNames *r2 = (struct samr_LookupNames *)r;
380 71 : if (DEBUGLEVEL >= 10) {
381 0 : NDR_PRINT_FUNCTION_DEBUG(samr_LookupNames, NDR_IN, r2);
382 : }
383 71 : NDR_ZERO_STRUCT(r2->out);
384 71 : r2->out.rids = talloc_zero(r2, struct samr_Ids);
385 71 : if (r2->out.rids == NULL) {
386 0 : status = NT_STATUS_NO_MEMORY;
387 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
388 0 : goto fail;
389 : }
390 :
391 71 : r2->out.types = talloc_zero(r2, struct samr_Ids);
392 71 : if (r2->out.types == NULL) {
393 0 : status = NT_STATUS_NO_MEMORY;
394 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
395 0 : goto fail;
396 : }
397 :
398 71 : r2->out.result = _samr_LookupNames(p, r2);
399 71 : break;
400 : }
401 5 : case 18: { /* samr_LookupRids */
402 5 : struct samr_LookupRids *r2 = (struct samr_LookupRids *)r;
403 5 : if (DEBUGLEVEL >= 10) {
404 0 : NDR_PRINT_FUNCTION_DEBUG(samr_LookupRids, NDR_IN, r2);
405 : }
406 5 : NDR_ZERO_STRUCT(r2->out);
407 5 : r2->out.names = talloc_zero(r2, struct lsa_Strings);
408 5 : if (r2->out.names == NULL) {
409 0 : status = NT_STATUS_NO_MEMORY;
410 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
411 0 : goto fail;
412 : }
413 :
414 5 : r2->out.types = talloc_zero(r2, struct samr_Ids);
415 5 : if (r2->out.types == NULL) {
416 0 : status = NT_STATUS_NO_MEMORY;
417 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
418 0 : goto fail;
419 : }
420 :
421 5 : r2->out.result = _samr_LookupRids(p, r2);
422 5 : break;
423 : }
424 0 : case 19: { /* samr_OpenGroup */
425 0 : struct samr_OpenGroup *r2 = (struct samr_OpenGroup *)r;
426 0 : if (DEBUGLEVEL >= 10) {
427 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenGroup, NDR_IN, r2);
428 : }
429 0 : NDR_ZERO_STRUCT(r2->out);
430 0 : r2->out.group_handle = talloc_zero(r2, struct policy_handle);
431 0 : if (r2->out.group_handle == NULL) {
432 0 : status = NT_STATUS_NO_MEMORY;
433 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
434 0 : goto fail;
435 : }
436 :
437 0 : r2->out.result = _samr_OpenGroup(p, r2);
438 0 : break;
439 : }
440 0 : case 20: { /* samr_QueryGroupInfo */
441 0 : struct samr_QueryGroupInfo *r2 = (struct samr_QueryGroupInfo *)r;
442 0 : if (DEBUGLEVEL >= 10) {
443 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupInfo, NDR_IN, r2);
444 : }
445 0 : NDR_ZERO_STRUCT(r2->out);
446 0 : r2->out.info = talloc_zero(r2, union samr_GroupInfo *);
447 0 : if (r2->out.info == NULL) {
448 0 : status = NT_STATUS_NO_MEMORY;
449 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
450 0 : goto fail;
451 : }
452 :
453 0 : r2->out.result = _samr_QueryGroupInfo(p, r2);
454 0 : break;
455 : }
456 0 : case 21: { /* samr_SetGroupInfo */
457 0 : struct samr_SetGroupInfo *r2 = (struct samr_SetGroupInfo *)r;
458 0 : if (DEBUGLEVEL >= 10) {
459 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetGroupInfo, NDR_IN, r2);
460 : }
461 0 : r2->out.result = _samr_SetGroupInfo(p, r2);
462 0 : break;
463 : }
464 0 : case 22: { /* samr_AddGroupMember */
465 0 : struct samr_AddGroupMember *r2 = (struct samr_AddGroupMember *)r;
466 0 : if (DEBUGLEVEL >= 10) {
467 0 : NDR_PRINT_FUNCTION_DEBUG(samr_AddGroupMember, NDR_IN, r2);
468 : }
469 0 : r2->out.result = _samr_AddGroupMember(p, r2);
470 0 : break;
471 : }
472 0 : case 23: { /* samr_DeleteDomainGroup */
473 0 : struct samr_DeleteDomainGroup *r2 = (struct samr_DeleteDomainGroup *)r;
474 0 : if (DEBUGLEVEL >= 10) {
475 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomainGroup, NDR_IN, r2);
476 : }
477 0 : NDR_ZERO_STRUCT(r2->out);
478 0 : r2->out.group_handle = r2->in.group_handle;
479 0 : r2->out.result = _samr_DeleteDomainGroup(p, r2);
480 0 : break;
481 : }
482 0 : case 24: { /* samr_DeleteGroupMember */
483 0 : struct samr_DeleteGroupMember *r2 = (struct samr_DeleteGroupMember *)r;
484 0 : if (DEBUGLEVEL >= 10) {
485 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteGroupMember, NDR_IN, r2);
486 : }
487 0 : r2->out.result = _samr_DeleteGroupMember(p, r2);
488 0 : break;
489 : }
490 0 : case 25: { /* samr_QueryGroupMember */
491 0 : struct samr_QueryGroupMember *r2 = (struct samr_QueryGroupMember *)r;
492 0 : if (DEBUGLEVEL >= 10) {
493 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupMember, NDR_IN, r2);
494 : }
495 0 : NDR_ZERO_STRUCT(r2->out);
496 0 : r2->out.rids = talloc_zero(r2, struct samr_RidAttrArray *);
497 0 : if (r2->out.rids == NULL) {
498 0 : status = NT_STATUS_NO_MEMORY;
499 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
500 0 : goto fail;
501 : }
502 :
503 0 : r2->out.result = _samr_QueryGroupMember(p, r2);
504 0 : break;
505 : }
506 0 : case 26: { /* samr_SetMemberAttributesOfGroup */
507 0 : struct samr_SetMemberAttributesOfGroup *r2 = (struct samr_SetMemberAttributesOfGroup *)r;
508 0 : if (DEBUGLEVEL >= 10) {
509 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetMemberAttributesOfGroup, NDR_IN, r2);
510 : }
511 0 : r2->out.result = _samr_SetMemberAttributesOfGroup(p, r2);
512 0 : break;
513 : }
514 0 : case 27: { /* samr_OpenAlias */
515 0 : struct samr_OpenAlias *r2 = (struct samr_OpenAlias *)r;
516 0 : if (DEBUGLEVEL >= 10) {
517 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenAlias, NDR_IN, r2);
518 : }
519 0 : NDR_ZERO_STRUCT(r2->out);
520 0 : r2->out.alias_handle = talloc_zero(r2, struct policy_handle);
521 0 : if (r2->out.alias_handle == NULL) {
522 0 : status = NT_STATUS_NO_MEMORY;
523 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
524 0 : goto fail;
525 : }
526 :
527 0 : r2->out.result = _samr_OpenAlias(p, r2);
528 0 : break;
529 : }
530 0 : case 28: { /* samr_QueryAliasInfo */
531 0 : struct samr_QueryAliasInfo *r2 = (struct samr_QueryAliasInfo *)r;
532 0 : if (DEBUGLEVEL >= 10) {
533 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryAliasInfo, NDR_IN, r2);
534 : }
535 0 : NDR_ZERO_STRUCT(r2->out);
536 0 : r2->out.info = talloc_zero(r2, union samr_AliasInfo *);
537 0 : if (r2->out.info == NULL) {
538 0 : status = NT_STATUS_NO_MEMORY;
539 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
540 0 : goto fail;
541 : }
542 :
543 0 : r2->out.result = _samr_QueryAliasInfo(p, r2);
544 0 : break;
545 : }
546 0 : case 29: { /* samr_SetAliasInfo */
547 0 : struct samr_SetAliasInfo *r2 = (struct samr_SetAliasInfo *)r;
548 0 : if (DEBUGLEVEL >= 10) {
549 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetAliasInfo, NDR_IN, r2);
550 : }
551 0 : r2->out.result = _samr_SetAliasInfo(p, r2);
552 0 : break;
553 : }
554 0 : case 30: { /* samr_DeleteDomAlias */
555 0 : struct samr_DeleteDomAlias *r2 = (struct samr_DeleteDomAlias *)r;
556 0 : if (DEBUGLEVEL >= 10) {
557 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomAlias, NDR_IN, r2);
558 : }
559 0 : NDR_ZERO_STRUCT(r2->out);
560 0 : r2->out.alias_handle = r2->in.alias_handle;
561 0 : r2->out.result = _samr_DeleteDomAlias(p, r2);
562 0 : break;
563 : }
564 0 : case 31: { /* samr_AddAliasMember */
565 0 : struct samr_AddAliasMember *r2 = (struct samr_AddAliasMember *)r;
566 0 : if (DEBUGLEVEL >= 10) {
567 0 : NDR_PRINT_FUNCTION_DEBUG(samr_AddAliasMember, NDR_IN, r2);
568 : }
569 0 : r2->out.result = _samr_AddAliasMember(p, r2);
570 0 : break;
571 : }
572 0 : case 32: { /* samr_DeleteAliasMember */
573 0 : struct samr_DeleteAliasMember *r2 = (struct samr_DeleteAliasMember *)r;
574 0 : if (DEBUGLEVEL >= 10) {
575 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteAliasMember, NDR_IN, r2);
576 : }
577 0 : r2->out.result = _samr_DeleteAliasMember(p, r2);
578 0 : break;
579 : }
580 0 : case 33: { /* samr_GetMembersInAlias */
581 0 : struct samr_GetMembersInAlias *r2 = (struct samr_GetMembersInAlias *)r;
582 0 : if (DEBUGLEVEL >= 10) {
583 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetMembersInAlias, NDR_IN, r2);
584 : }
585 0 : NDR_ZERO_STRUCT(r2->out);
586 0 : r2->out.sids = talloc_zero(r2, struct lsa_SidArray);
587 0 : if (r2->out.sids == NULL) {
588 0 : status = NT_STATUS_NO_MEMORY;
589 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
590 0 : goto fail;
591 : }
592 :
593 0 : r2->out.result = _samr_GetMembersInAlias(p, r2);
594 0 : break;
595 : }
596 15 : case 34: { /* samr_OpenUser */
597 15 : struct samr_OpenUser *r2 = (struct samr_OpenUser *)r;
598 15 : if (DEBUGLEVEL >= 10) {
599 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenUser, NDR_IN, r2);
600 : }
601 15 : NDR_ZERO_STRUCT(r2->out);
602 15 : r2->out.user_handle = talloc_zero(r2, struct policy_handle);
603 15 : if (r2->out.user_handle == NULL) {
604 0 : status = NT_STATUS_NO_MEMORY;
605 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
606 0 : goto fail;
607 : }
608 :
609 15 : r2->out.result = _samr_OpenUser(p, r2);
610 15 : break;
611 : }
612 2 : case 35: { /* samr_DeleteUser */
613 2 : struct samr_DeleteUser *r2 = (struct samr_DeleteUser *)r;
614 2 : if (DEBUGLEVEL >= 10) {
615 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteUser, NDR_IN, r2);
616 : }
617 2 : NDR_ZERO_STRUCT(r2->out);
618 2 : r2->out.user_handle = r2->in.user_handle;
619 2 : r2->out.result = _samr_DeleteUser(p, r2);
620 2 : break;
621 : }
622 2 : case 36: { /* samr_QueryUserInfo */
623 2 : struct samr_QueryUserInfo *r2 = (struct samr_QueryUserInfo *)r;
624 2 : if (DEBUGLEVEL >= 10) {
625 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo, NDR_IN, r2);
626 : }
627 2 : NDR_ZERO_STRUCT(r2->out);
628 2 : r2->out.info = talloc_zero(r2, union samr_UserInfo *);
629 2 : if (r2->out.info == NULL) {
630 0 : status = NT_STATUS_NO_MEMORY;
631 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
632 0 : goto fail;
633 : }
634 :
635 2 : r2->out.result = _samr_QueryUserInfo(p, r2);
636 2 : break;
637 : }
638 0 : case 37: { /* samr_SetUserInfo */
639 0 : struct samr_SetUserInfo *r2 = (struct samr_SetUserInfo *)r;
640 0 : if (DEBUGLEVEL >= 10) {
641 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo, NDR_IN, r2);
642 : }
643 0 : r2->out.result = _samr_SetUserInfo(p, r2);
644 0 : break;
645 : }
646 0 : case 38: { /* samr_ChangePasswordUser */
647 0 : struct samr_ChangePasswordUser *r2 = (struct samr_ChangePasswordUser *)r;
648 0 : if (DEBUGLEVEL >= 10) {
649 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser, NDR_IN, r2);
650 : }
651 0 : r2->out.result = _samr_ChangePasswordUser(p, r2);
652 0 : break;
653 : }
654 2 : case 39: { /* samr_GetGroupsForUser */
655 2 : struct samr_GetGroupsForUser *r2 = (struct samr_GetGroupsForUser *)r;
656 2 : if (DEBUGLEVEL >= 10) {
657 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetGroupsForUser, NDR_IN, r2);
658 : }
659 2 : NDR_ZERO_STRUCT(r2->out);
660 2 : r2->out.rids = talloc_zero(r2, struct samr_RidWithAttributeArray *);
661 2 : if (r2->out.rids == NULL) {
662 0 : status = NT_STATUS_NO_MEMORY;
663 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
664 0 : goto fail;
665 : }
666 :
667 2 : r2->out.result = _samr_GetGroupsForUser(p, r2);
668 2 : break;
669 : }
670 0 : case 40: { /* samr_QueryDisplayInfo */
671 0 : struct samr_QueryDisplayInfo *r2 = (struct samr_QueryDisplayInfo *)r;
672 0 : if (DEBUGLEVEL >= 10) {
673 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo, NDR_IN, r2);
674 : }
675 0 : NDR_ZERO_STRUCT(r2->out);
676 0 : r2->out.total_size = talloc_zero(r2, uint32_t);
677 0 : if (r2->out.total_size == NULL) {
678 0 : status = NT_STATUS_NO_MEMORY;
679 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
680 0 : goto fail;
681 : }
682 :
683 0 : r2->out.returned_size = talloc_zero(r2, uint32_t);
684 0 : if (r2->out.returned_size == NULL) {
685 0 : status = NT_STATUS_NO_MEMORY;
686 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
687 0 : goto fail;
688 : }
689 :
690 0 : r2->out.info = talloc_zero(r2, union samr_DispInfo);
691 0 : if (r2->out.info == NULL) {
692 0 : status = NT_STATUS_NO_MEMORY;
693 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
694 0 : goto fail;
695 : }
696 :
697 0 : r2->out.result = _samr_QueryDisplayInfo(p, r2);
698 0 : break;
699 : }
700 0 : case 41: { /* samr_GetDisplayEnumerationIndex */
701 0 : struct samr_GetDisplayEnumerationIndex *r2 = (struct samr_GetDisplayEnumerationIndex *)r;
702 0 : if (DEBUGLEVEL >= 10) {
703 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex, NDR_IN, r2);
704 : }
705 0 : NDR_ZERO_STRUCT(r2->out);
706 0 : r2->out.idx = talloc_zero(r2, uint32_t);
707 0 : if (r2->out.idx == NULL) {
708 0 : status = NT_STATUS_NO_MEMORY;
709 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
710 0 : goto fail;
711 : }
712 :
713 0 : r2->out.result = _samr_GetDisplayEnumerationIndex(p, r2);
714 0 : break;
715 : }
716 0 : case 42: { /* samr_TestPrivateFunctionsDomain */
717 0 : struct samr_TestPrivateFunctionsDomain *r2 = (struct samr_TestPrivateFunctionsDomain *)r;
718 0 : if (DEBUGLEVEL >= 10) {
719 0 : NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsDomain, NDR_IN, r2);
720 : }
721 0 : r2->out.result = _samr_TestPrivateFunctionsDomain(p, r2);
722 0 : break;
723 : }
724 0 : case 43: { /* samr_TestPrivateFunctionsUser */
725 0 : struct samr_TestPrivateFunctionsUser *r2 = (struct samr_TestPrivateFunctionsUser *)r;
726 0 : if (DEBUGLEVEL >= 10) {
727 0 : NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsUser, NDR_IN, r2);
728 : }
729 0 : r2->out.result = _samr_TestPrivateFunctionsUser(p, r2);
730 0 : break;
731 : }
732 2 : case 44: { /* samr_GetUserPwInfo */
733 2 : struct samr_GetUserPwInfo *r2 = (struct samr_GetUserPwInfo *)r;
734 2 : if (DEBUGLEVEL >= 10) {
735 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetUserPwInfo, NDR_IN, r2);
736 : }
737 2 : NDR_ZERO_STRUCT(r2->out);
738 2 : r2->out.info = talloc_zero(r2, struct samr_PwInfo);
739 2 : if (r2->out.info == NULL) {
740 0 : status = NT_STATUS_NO_MEMORY;
741 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
742 0 : goto fail;
743 : }
744 :
745 2 : r2->out.result = _samr_GetUserPwInfo(p, r2);
746 2 : break;
747 : }
748 2 : case 45: { /* samr_RemoveMemberFromForeignDomain */
749 2 : struct samr_RemoveMemberFromForeignDomain *r2 = (struct samr_RemoveMemberFromForeignDomain *)r;
750 2 : if (DEBUGLEVEL >= 10) {
751 0 : NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMemberFromForeignDomain, NDR_IN, r2);
752 : }
753 2 : r2->out.result = _samr_RemoveMemberFromForeignDomain(p, r2);
754 2 : break;
755 : }
756 0 : case 46: { /* samr_QueryDomainInfo2 */
757 0 : struct samr_QueryDomainInfo2 *r2 = (struct samr_QueryDomainInfo2 *)r;
758 0 : if (DEBUGLEVEL >= 10) {
759 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo2, NDR_IN, r2);
760 : }
761 0 : NDR_ZERO_STRUCT(r2->out);
762 0 : r2->out.info = talloc_zero(r2, union samr_DomainInfo *);
763 0 : if (r2->out.info == NULL) {
764 0 : status = NT_STATUS_NO_MEMORY;
765 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
766 0 : goto fail;
767 : }
768 :
769 0 : r2->out.result = _samr_QueryDomainInfo2(p, r2);
770 0 : break;
771 : }
772 18 : case 47: { /* samr_QueryUserInfo2 */
773 18 : struct samr_QueryUserInfo2 *r2 = (struct samr_QueryUserInfo2 *)r;
774 18 : if (DEBUGLEVEL >= 10) {
775 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo2, NDR_IN, r2);
776 : }
777 18 : NDR_ZERO_STRUCT(r2->out);
778 18 : r2->out.info = talloc_zero(r2, union samr_UserInfo *);
779 18 : if (r2->out.info == NULL) {
780 0 : status = NT_STATUS_NO_MEMORY;
781 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
782 0 : goto fail;
783 : }
784 :
785 18 : r2->out.result = _samr_QueryUserInfo2(p, r2);
786 18 : break;
787 : }
788 0 : case 48: { /* samr_QueryDisplayInfo2 */
789 0 : struct samr_QueryDisplayInfo2 *r2 = (struct samr_QueryDisplayInfo2 *)r;
790 0 : if (DEBUGLEVEL >= 10) {
791 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo2, NDR_IN, r2);
792 : }
793 0 : NDR_ZERO_STRUCT(r2->out);
794 0 : r2->out.total_size = talloc_zero(r2, uint32_t);
795 0 : if (r2->out.total_size == NULL) {
796 0 : status = NT_STATUS_NO_MEMORY;
797 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
798 0 : goto fail;
799 : }
800 :
801 0 : r2->out.returned_size = talloc_zero(r2, uint32_t);
802 0 : if (r2->out.returned_size == NULL) {
803 0 : status = NT_STATUS_NO_MEMORY;
804 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
805 0 : goto fail;
806 : }
807 :
808 0 : r2->out.info = talloc_zero(r2, union samr_DispInfo);
809 0 : if (r2->out.info == NULL) {
810 0 : status = NT_STATUS_NO_MEMORY;
811 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
812 0 : goto fail;
813 : }
814 :
815 0 : r2->out.result = _samr_QueryDisplayInfo2(p, r2);
816 0 : break;
817 : }
818 0 : case 49: { /* samr_GetDisplayEnumerationIndex2 */
819 0 : struct samr_GetDisplayEnumerationIndex2 *r2 = (struct samr_GetDisplayEnumerationIndex2 *)r;
820 0 : if (DEBUGLEVEL >= 10) {
821 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex2, NDR_IN, r2);
822 : }
823 0 : NDR_ZERO_STRUCT(r2->out);
824 0 : r2->out.idx = talloc_zero(r2, uint32_t);
825 0 : if (r2->out.idx == NULL) {
826 0 : status = NT_STATUS_NO_MEMORY;
827 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
828 0 : goto fail;
829 : }
830 :
831 0 : r2->out.result = _samr_GetDisplayEnumerationIndex2(p, r2);
832 0 : break;
833 : }
834 3 : case 50: { /* samr_CreateUser2 */
835 3 : struct samr_CreateUser2 *r2 = (struct samr_CreateUser2 *)r;
836 3 : if (DEBUGLEVEL >= 10) {
837 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser2, NDR_IN, r2);
838 : }
839 3 : NDR_ZERO_STRUCT(r2->out);
840 3 : r2->out.user_handle = talloc_zero(r2, struct policy_handle);
841 3 : if (r2->out.user_handle == NULL) {
842 0 : status = NT_STATUS_NO_MEMORY;
843 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
844 0 : goto fail;
845 : }
846 :
847 3 : r2->out.access_granted = talloc_zero(r2, uint32_t);
848 3 : if (r2->out.access_granted == NULL) {
849 0 : status = NT_STATUS_NO_MEMORY;
850 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
851 0 : goto fail;
852 : }
853 :
854 3 : r2->out.rid = talloc_zero(r2, uint32_t);
855 3 : if (r2->out.rid == NULL) {
856 0 : status = NT_STATUS_NO_MEMORY;
857 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
858 0 : goto fail;
859 : }
860 :
861 3 : r2->out.result = _samr_CreateUser2(p, r2);
862 3 : break;
863 : }
864 0 : case 51: { /* samr_QueryDisplayInfo3 */
865 0 : struct samr_QueryDisplayInfo3 *r2 = (struct samr_QueryDisplayInfo3 *)r;
866 0 : if (DEBUGLEVEL >= 10) {
867 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo3, NDR_IN, r2);
868 : }
869 0 : NDR_ZERO_STRUCT(r2->out);
870 0 : r2->out.total_size = talloc_zero(r2, uint32_t);
871 0 : if (r2->out.total_size == NULL) {
872 0 : status = NT_STATUS_NO_MEMORY;
873 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
874 0 : goto fail;
875 : }
876 :
877 0 : r2->out.returned_size = talloc_zero(r2, uint32_t);
878 0 : if (r2->out.returned_size == NULL) {
879 0 : status = NT_STATUS_NO_MEMORY;
880 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
881 0 : goto fail;
882 : }
883 :
884 0 : r2->out.info = talloc_zero(r2, union samr_DispInfo);
885 0 : if (r2->out.info == NULL) {
886 0 : status = NT_STATUS_NO_MEMORY;
887 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
888 0 : goto fail;
889 : }
890 :
891 0 : r2->out.result = _samr_QueryDisplayInfo3(p, r2);
892 0 : break;
893 : }
894 0 : case 52: { /* samr_AddMultipleMembersToAlias */
895 0 : struct samr_AddMultipleMembersToAlias *r2 = (struct samr_AddMultipleMembersToAlias *)r;
896 0 : if (DEBUGLEVEL >= 10) {
897 0 : NDR_PRINT_FUNCTION_DEBUG(samr_AddMultipleMembersToAlias, NDR_IN, r2);
898 : }
899 0 : r2->out.result = _samr_AddMultipleMembersToAlias(p, r2);
900 0 : break;
901 : }
902 0 : case 53: { /* samr_RemoveMultipleMembersFromAlias */
903 0 : struct samr_RemoveMultipleMembersFromAlias *r2 = (struct samr_RemoveMultipleMembersFromAlias *)r;
904 0 : if (DEBUGLEVEL >= 10) {
905 0 : NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMultipleMembersFromAlias, NDR_IN, r2);
906 : }
907 0 : r2->out.result = _samr_RemoveMultipleMembersFromAlias(p, r2);
908 0 : break;
909 : }
910 0 : case 54: { /* samr_OemChangePasswordUser2 */
911 0 : struct samr_OemChangePasswordUser2 *r2 = (struct samr_OemChangePasswordUser2 *)r;
912 0 : if (DEBUGLEVEL >= 10) {
913 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OemChangePasswordUser2, NDR_IN, r2);
914 : }
915 0 : r2->out.result = _samr_OemChangePasswordUser2(p, r2);
916 0 : break;
917 : }
918 4 : case 55: { /* samr_ChangePasswordUser2 */
919 4 : struct samr_ChangePasswordUser2 *r2 = (struct samr_ChangePasswordUser2 *)r;
920 4 : if (DEBUGLEVEL >= 10) {
921 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser2, NDR_IN, r2);
922 : }
923 4 : r2->out.result = _samr_ChangePasswordUser2(p, r2);
924 4 : break;
925 : }
926 0 : case 56: { /* samr_GetDomPwInfo */
927 0 : struct samr_GetDomPwInfo *r2 = (struct samr_GetDomPwInfo *)r;
928 0 : if (DEBUGLEVEL >= 10) {
929 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetDomPwInfo, NDR_IN, r2);
930 : }
931 0 : NDR_ZERO_STRUCT(r2->out);
932 0 : r2->out.info = talloc_zero(r2, struct samr_PwInfo);
933 0 : if (r2->out.info == NULL) {
934 0 : status = NT_STATUS_NO_MEMORY;
935 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
936 0 : goto fail;
937 : }
938 :
939 0 : r2->out.result = _samr_GetDomPwInfo(p, r2);
940 0 : break;
941 : }
942 50 : case 57: { /* samr_Connect2 */
943 50 : struct samr_Connect2 *r2 = (struct samr_Connect2 *)r;
944 50 : if (DEBUGLEVEL >= 10) {
945 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect2, NDR_IN, r2);
946 : }
947 50 : NDR_ZERO_STRUCT(r2->out);
948 50 : r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
949 50 : if (r2->out.connect_handle == NULL) {
950 0 : status = NT_STATUS_NO_MEMORY;
951 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
952 0 : goto fail;
953 : }
954 :
955 50 : r2->out.result = _samr_Connect2(p, r2);
956 50 : break;
957 : }
958 6 : case 58: { /* samr_SetUserInfo2 */
959 6 : struct samr_SetUserInfo2 *r2 = (struct samr_SetUserInfo2 *)r;
960 6 : if (DEBUGLEVEL >= 10) {
961 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo2, NDR_IN, r2);
962 : }
963 6 : r2->out.result = _samr_SetUserInfo2(p, r2);
964 6 : break;
965 : }
966 0 : case 59: { /* samr_SetBootKeyInformation */
967 0 : struct samr_SetBootKeyInformation *r2 = (struct samr_SetBootKeyInformation *)r;
968 0 : if (DEBUGLEVEL >= 10) {
969 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetBootKeyInformation, NDR_IN, r2);
970 : }
971 0 : r2->out.result = _samr_SetBootKeyInformation(p, r2);
972 0 : break;
973 : }
974 0 : case 60: { /* samr_GetBootKeyInformation */
975 0 : struct samr_GetBootKeyInformation *r2 = (struct samr_GetBootKeyInformation *)r;
976 0 : if (DEBUGLEVEL >= 10) {
977 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetBootKeyInformation, NDR_IN, r2);
978 : }
979 0 : NDR_ZERO_STRUCT(r2->out);
980 0 : r2->out.unknown = talloc_zero(r2, uint32_t);
981 0 : if (r2->out.unknown == NULL) {
982 0 : status = NT_STATUS_NO_MEMORY;
983 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
984 0 : goto fail;
985 : }
986 :
987 0 : r2->out.result = _samr_GetBootKeyInformation(p, r2);
988 0 : break;
989 : }
990 0 : case 61: { /* samr_Connect3 */
991 0 : struct samr_Connect3 *r2 = (struct samr_Connect3 *)r;
992 0 : if (DEBUGLEVEL >= 10) {
993 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect3, NDR_IN, r2);
994 : }
995 0 : NDR_ZERO_STRUCT(r2->out);
996 0 : r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
997 0 : if (r2->out.connect_handle == NULL) {
998 0 : status = NT_STATUS_NO_MEMORY;
999 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1000 0 : goto fail;
1001 : }
1002 :
1003 0 : r2->out.result = _samr_Connect3(p, r2);
1004 0 : break;
1005 : }
1006 0 : case 62: { /* samr_Connect4 */
1007 0 : struct samr_Connect4 *r2 = (struct samr_Connect4 *)r;
1008 0 : if (DEBUGLEVEL >= 10) {
1009 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect4, NDR_IN, r2);
1010 : }
1011 0 : NDR_ZERO_STRUCT(r2->out);
1012 0 : r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
1013 0 : if (r2->out.connect_handle == NULL) {
1014 0 : status = NT_STATUS_NO_MEMORY;
1015 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1016 0 : goto fail;
1017 : }
1018 :
1019 0 : r2->out.result = _samr_Connect4(p, r2);
1020 0 : break;
1021 : }
1022 0 : case 63: { /* samr_ChangePasswordUser3 */
1023 0 : struct samr_ChangePasswordUser3 *r2 = (struct samr_ChangePasswordUser3 *)r;
1024 0 : if (DEBUGLEVEL >= 10) {
1025 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser3, NDR_IN, r2);
1026 : }
1027 0 : NDR_ZERO_STRUCT(r2->out);
1028 0 : r2->out.dominfo = talloc_zero(r2, struct samr_DomInfo1 *);
1029 0 : if (r2->out.dominfo == NULL) {
1030 0 : status = NT_STATUS_NO_MEMORY;
1031 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1032 0 : goto fail;
1033 : }
1034 :
1035 0 : r2->out.reject = talloc_zero(r2, struct userPwdChangeFailureInformation *);
1036 0 : if (r2->out.reject == NULL) {
1037 0 : status = NT_STATUS_NO_MEMORY;
1038 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1039 0 : goto fail;
1040 : }
1041 :
1042 0 : r2->out.result = _samr_ChangePasswordUser3(p, r2);
1043 0 : break;
1044 : }
1045 4 : case 64: { /* samr_Connect5 */
1046 4 : struct samr_Connect5 *r2 = (struct samr_Connect5 *)r;
1047 4 : if (DEBUGLEVEL >= 10) {
1048 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect5, NDR_IN, r2);
1049 : }
1050 4 : NDR_ZERO_STRUCT(r2->out);
1051 4 : r2->out.level_out = talloc_zero(r2, uint32_t);
1052 4 : if (r2->out.level_out == NULL) {
1053 0 : status = NT_STATUS_NO_MEMORY;
1054 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1055 0 : goto fail;
1056 : }
1057 :
1058 4 : r2->out.info_out = talloc_zero(r2, union samr_ConnectInfo);
1059 4 : if (r2->out.info_out == NULL) {
1060 0 : status = NT_STATUS_NO_MEMORY;
1061 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1062 0 : goto fail;
1063 : }
1064 :
1065 4 : r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
1066 4 : if (r2->out.connect_handle == NULL) {
1067 0 : status = NT_STATUS_NO_MEMORY;
1068 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1069 0 : goto fail;
1070 : }
1071 :
1072 4 : r2->out.result = _samr_Connect5(p, r2);
1073 4 : break;
1074 : }
1075 0 : case 65: { /* samr_RidToSid */
1076 0 : struct samr_RidToSid *r2 = (struct samr_RidToSid *)r;
1077 0 : if (DEBUGLEVEL >= 10) {
1078 0 : NDR_PRINT_FUNCTION_DEBUG(samr_RidToSid, NDR_IN, r2);
1079 : }
1080 0 : NDR_ZERO_STRUCT(r2->out);
1081 0 : r2->out.sid = talloc_zero(r2, struct dom_sid2 *);
1082 0 : if (r2->out.sid == NULL) {
1083 0 : status = NT_STATUS_NO_MEMORY;
1084 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1085 0 : goto fail;
1086 : }
1087 :
1088 0 : r2->out.result = _samr_RidToSid(p, r2);
1089 0 : break;
1090 : }
1091 0 : case 66: { /* samr_SetDsrmPassword */
1092 0 : struct samr_SetDsrmPassword *r2 = (struct samr_SetDsrmPassword *)r;
1093 0 : if (DEBUGLEVEL >= 10) {
1094 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetDsrmPassword, NDR_IN, r2);
1095 : }
1096 0 : r2->out.result = _samr_SetDsrmPassword(p, r2);
1097 0 : break;
1098 : }
1099 0 : case 67: { /* samr_ValidatePassword */
1100 0 : struct samr_ValidatePassword *r2 = (struct samr_ValidatePassword *)r;
1101 0 : if (DEBUGLEVEL >= 10) {
1102 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ValidatePassword, NDR_IN, r2);
1103 : }
1104 0 : NDR_ZERO_STRUCT(r2->out);
1105 0 : r2->out.rep = talloc_zero(r2, union samr_ValidatePasswordRep *);
1106 0 : if (r2->out.rep == NULL) {
1107 0 : status = NT_STATUS_NO_MEMORY;
1108 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1109 0 : goto fail;
1110 : }
1111 :
1112 0 : r2->out.result = _samr_ValidatePassword(p, r2);
1113 0 : break;
1114 : }
1115 0 : case 68: { /* samr_Opnum68NotUsedOnWire */
1116 0 : struct samr_Opnum68NotUsedOnWire *r2 = (struct samr_Opnum68NotUsedOnWire *)r;
1117 0 : if (DEBUGLEVEL >= 10) {
1118 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Opnum68NotUsedOnWire, NDR_IN, r2);
1119 : }
1120 0 : _samr_Opnum68NotUsedOnWire(p, r2);
1121 0 : break;
1122 : }
1123 0 : case 69: { /* samr_Opnum69NotUsedOnWire */
1124 0 : struct samr_Opnum69NotUsedOnWire *r2 = (struct samr_Opnum69NotUsedOnWire *)r;
1125 0 : if (DEBUGLEVEL >= 10) {
1126 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Opnum69NotUsedOnWire, NDR_IN, r2);
1127 : }
1128 0 : _samr_Opnum69NotUsedOnWire(p, r2);
1129 0 : break;
1130 : }
1131 0 : case 70: { /* samr_Opnum70NotUsedOnWire */
1132 0 : struct samr_Opnum70NotUsedOnWire *r2 = (struct samr_Opnum70NotUsedOnWire *)r;
1133 0 : if (DEBUGLEVEL >= 10) {
1134 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Opnum70NotUsedOnWire, NDR_IN, r2);
1135 : }
1136 0 : _samr_Opnum70NotUsedOnWire(p, r2);
1137 0 : break;
1138 : }
1139 0 : case 71: { /* samr_Opnum71NotUsedOnWire */
1140 0 : struct samr_Opnum71NotUsedOnWire *r2 = (struct samr_Opnum71NotUsedOnWire *)r;
1141 0 : if (DEBUGLEVEL >= 10) {
1142 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Opnum71NotUsedOnWire, NDR_IN, r2);
1143 : }
1144 0 : _samr_Opnum71NotUsedOnWire(p, r2);
1145 0 : break;
1146 : }
1147 0 : case 72: { /* samr_Opnum72NotUsedOnWire */
1148 0 : struct samr_Opnum72NotUsedOnWire *r2 = (struct samr_Opnum72NotUsedOnWire *)r;
1149 0 : if (DEBUGLEVEL >= 10) {
1150 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Opnum72NotUsedOnWire, NDR_IN, r2);
1151 : }
1152 0 : _samr_Opnum72NotUsedOnWire(p, r2);
1153 0 : break;
1154 : }
1155 1 : case 73: { /* samr_ChangePasswordUser4 */
1156 1 : struct samr_ChangePasswordUser4 *r2 = (struct samr_ChangePasswordUser4 *)r;
1157 1 : if (DEBUGLEVEL >= 10) {
1158 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser4, NDR_IN, r2);
1159 : }
1160 1 : r2->out.result = _samr_ChangePasswordUser4(p, r2);
1161 1 : break;
1162 : }
1163 0 : default:
1164 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
1165 0 : break;
1166 : }
1167 :
1168 471 : fail:
1169 : /* Unimpersonate */
1170 471 : if (impersonated) {
1171 471 : unbecome_authenticated_pipe_user();
1172 : }
1173 :
1174 471 : p->dce_call = NULL;
1175 471 : p->mem_ctx = NULL;
1176 : /* Check pipes struct fault state */
1177 471 : if (p->fault_state != 0) {
1178 0 : dce_call->fault_code = p->fault_state;
1179 : }
1180 471 : if (dce_call->fault_code != 0) {
1181 0 : status = NT_STATUS_NET_WRITE_FAULT;
1182 : }
1183 :
1184 471 : return status;
1185 : }
1186 :
1187 471 : NTSTATUS samr__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
1188 : {
1189 471 : return samr__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_EXTERNAL);
1190 : }
1191 :
1192 471 : NTSTATUS samr__op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
1193 : {
1194 471 : uint16_t opnum = dce_call->pkt.u.request.opnum;
1195 :
1196 471 : switch (opnum) {
1197 0 : case 0: { /* samr_Connect */
1198 0 : struct samr_Connect *r2 = (struct samr_Connect *)r;
1199 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1200 0 : DEBUG(5,("function samr_Connect replied async\n"));
1201 : }
1202 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1203 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect, NDR_OUT | NDR_SET_VALUES, r2);
1204 : }
1205 0 : if (dce_call->fault_code != 0) {
1206 0 : DBG_WARNING("dcerpc_fault %s in samr_Connect\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1207 : }
1208 0 : break;
1209 : }
1210 50 : case 1: { /* samr_Close */
1211 50 : struct samr_Close *r2 = (struct samr_Close *)r;
1212 50 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1213 0 : DEBUG(5,("function samr_Close replied async\n"));
1214 : }
1215 50 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1216 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Close, NDR_OUT | NDR_SET_VALUES, r2);
1217 : }
1218 50 : if (dce_call->fault_code != 0) {
1219 0 : DBG_WARNING("dcerpc_fault %s in samr_Close\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1220 : }
1221 50 : break;
1222 : }
1223 0 : case 2: { /* samr_SetSecurity */
1224 0 : struct samr_SetSecurity *r2 = (struct samr_SetSecurity *)r;
1225 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1226 0 : DEBUG(5,("function samr_SetSecurity replied async\n"));
1227 : }
1228 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1229 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetSecurity, NDR_OUT | NDR_SET_VALUES, r2);
1230 : }
1231 0 : if (dce_call->fault_code != 0) {
1232 0 : DBG_WARNING("dcerpc_fault %s in samr_SetSecurity\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1233 : }
1234 0 : break;
1235 : }
1236 0 : case 3: { /* samr_QuerySecurity */
1237 0 : struct samr_QuerySecurity *r2 = (struct samr_QuerySecurity *)r;
1238 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1239 0 : DEBUG(5,("function samr_QuerySecurity replied async\n"));
1240 : }
1241 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1242 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QuerySecurity, NDR_OUT | NDR_SET_VALUES, r2);
1243 : }
1244 0 : if (dce_call->fault_code != 0) {
1245 0 : DBG_WARNING("dcerpc_fault %s in samr_QuerySecurity\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1246 : }
1247 0 : break;
1248 : }
1249 0 : case 4: { /* samr_Shutdown */
1250 0 : struct samr_Shutdown *r2 = (struct samr_Shutdown *)r;
1251 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1252 0 : DEBUG(5,("function samr_Shutdown replied async\n"));
1253 : }
1254 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1255 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Shutdown, NDR_OUT | NDR_SET_VALUES, r2);
1256 : }
1257 0 : if (dce_call->fault_code != 0) {
1258 0 : DBG_WARNING("dcerpc_fault %s in samr_Shutdown\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1259 : }
1260 0 : break;
1261 : }
1262 14 : case 5: { /* samr_LookupDomain */
1263 14 : struct samr_LookupDomain *r2 = (struct samr_LookupDomain *)r;
1264 14 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1265 0 : DEBUG(5,("function samr_LookupDomain replied async\n"));
1266 : }
1267 14 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1268 0 : NDR_PRINT_FUNCTION_DEBUG(samr_LookupDomain, NDR_OUT | NDR_SET_VALUES, r2);
1269 : }
1270 14 : if (dce_call->fault_code != 0) {
1271 0 : DBG_WARNING("dcerpc_fault %s in samr_LookupDomain\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1272 : }
1273 14 : break;
1274 : }
1275 4 : case 6: { /* samr_EnumDomains */
1276 4 : struct samr_EnumDomains *r2 = (struct samr_EnumDomains *)r;
1277 4 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1278 0 : DEBUG(5,("function samr_EnumDomains replied async\n"));
1279 : }
1280 4 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1281 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomains, NDR_OUT | NDR_SET_VALUES, r2);
1282 : }
1283 4 : if (dce_call->fault_code != 0) {
1284 0 : DBG_WARNING("dcerpc_fault %s in samr_EnumDomains\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1285 : }
1286 4 : break;
1287 : }
1288 56 : case 7: { /* samr_OpenDomain */
1289 56 : struct samr_OpenDomain *r2 = (struct samr_OpenDomain *)r;
1290 56 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1291 0 : DEBUG(5,("function samr_OpenDomain replied async\n"));
1292 : }
1293 56 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1294 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenDomain, NDR_OUT | NDR_SET_VALUES, r2);
1295 : }
1296 56 : if (dce_call->fault_code != 0) {
1297 0 : DBG_WARNING("dcerpc_fault %s in samr_OpenDomain\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1298 : }
1299 56 : break;
1300 : }
1301 0 : case 8: { /* samr_QueryDomainInfo */
1302 0 : struct samr_QueryDomainInfo *r2 = (struct samr_QueryDomainInfo *)r;
1303 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1304 0 : DEBUG(5,("function samr_QueryDomainInfo replied async\n"));
1305 : }
1306 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1307 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo, NDR_OUT | NDR_SET_VALUES, r2);
1308 : }
1309 0 : if (dce_call->fault_code != 0) {
1310 0 : DBG_WARNING("dcerpc_fault %s in samr_QueryDomainInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1311 : }
1312 0 : break;
1313 : }
1314 0 : case 9: { /* samr_SetDomainInfo */
1315 0 : struct samr_SetDomainInfo *r2 = (struct samr_SetDomainInfo *)r;
1316 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1317 0 : DEBUG(5,("function samr_SetDomainInfo replied async\n"));
1318 : }
1319 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1320 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetDomainInfo, NDR_OUT | NDR_SET_VALUES, r2);
1321 : }
1322 0 : if (dce_call->fault_code != 0) {
1323 0 : DBG_WARNING("dcerpc_fault %s in samr_SetDomainInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1324 : }
1325 0 : break;
1326 : }
1327 0 : case 10: { /* samr_CreateDomainGroup */
1328 0 : struct samr_CreateDomainGroup *r2 = (struct samr_CreateDomainGroup *)r;
1329 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1330 0 : DEBUG(5,("function samr_CreateDomainGroup replied async\n"));
1331 : }
1332 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1333 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomainGroup, NDR_OUT | NDR_SET_VALUES, r2);
1334 : }
1335 0 : if (dce_call->fault_code != 0) {
1336 0 : DBG_WARNING("dcerpc_fault %s in samr_CreateDomainGroup\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1337 : }
1338 0 : break;
1339 : }
1340 4 : case 11: { /* samr_EnumDomainGroups */
1341 4 : struct samr_EnumDomainGroups *r2 = (struct samr_EnumDomainGroups *)r;
1342 4 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1343 0 : DEBUG(5,("function samr_EnumDomainGroups replied async\n"));
1344 : }
1345 4 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1346 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainGroups, NDR_OUT | NDR_SET_VALUES, r2);
1347 : }
1348 4 : if (dce_call->fault_code != 0) {
1349 0 : DBG_WARNING("dcerpc_fault %s in samr_EnumDomainGroups\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1350 : }
1351 4 : break;
1352 : }
1353 0 : case 12: { /* samr_CreateUser */
1354 0 : struct samr_CreateUser *r2 = (struct samr_CreateUser *)r;
1355 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1356 0 : DEBUG(5,("function samr_CreateUser replied async\n"));
1357 : }
1358 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1359 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser, NDR_OUT | NDR_SET_VALUES, r2);
1360 : }
1361 0 : if (dce_call->fault_code != 0) {
1362 0 : DBG_WARNING("dcerpc_fault %s in samr_CreateUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1363 : }
1364 0 : break;
1365 : }
1366 4 : case 13: { /* samr_EnumDomainUsers */
1367 4 : struct samr_EnumDomainUsers *r2 = (struct samr_EnumDomainUsers *)r;
1368 4 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1369 0 : DEBUG(5,("function samr_EnumDomainUsers replied async\n"));
1370 : }
1371 4 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1372 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainUsers, NDR_OUT | NDR_SET_VALUES, r2);
1373 : }
1374 4 : if (dce_call->fault_code != 0) {
1375 0 : DBG_WARNING("dcerpc_fault %s in samr_EnumDomainUsers\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1376 : }
1377 4 : break;
1378 : }
1379 0 : case 14: { /* samr_CreateDomAlias */
1380 0 : struct samr_CreateDomAlias *r2 = (struct samr_CreateDomAlias *)r;
1381 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1382 0 : DEBUG(5,("function samr_CreateDomAlias replied async\n"));
1383 : }
1384 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1385 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomAlias, NDR_OUT | NDR_SET_VALUES, r2);
1386 : }
1387 0 : if (dce_call->fault_code != 0) {
1388 0 : DBG_WARNING("dcerpc_fault %s in samr_CreateDomAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1389 : }
1390 0 : break;
1391 : }
1392 0 : case 15: { /* samr_EnumDomainAliases */
1393 0 : struct samr_EnumDomainAliases *r2 = (struct samr_EnumDomainAliases *)r;
1394 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1395 0 : DEBUG(5,("function samr_EnumDomainAliases replied async\n"));
1396 : }
1397 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1398 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainAliases, NDR_OUT | NDR_SET_VALUES, r2);
1399 : }
1400 0 : if (dce_call->fault_code != 0) {
1401 0 : DBG_WARNING("dcerpc_fault %s in samr_EnumDomainAliases\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1402 : }
1403 0 : break;
1404 : }
1405 152 : case 16: { /* samr_GetAliasMembership */
1406 152 : struct samr_GetAliasMembership *r2 = (struct samr_GetAliasMembership *)r;
1407 152 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1408 0 : DEBUG(5,("function samr_GetAliasMembership replied async\n"));
1409 : }
1410 152 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1411 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetAliasMembership, NDR_OUT | NDR_SET_VALUES, r2);
1412 : }
1413 152 : if (dce_call->fault_code != 0) {
1414 0 : DBG_WARNING("dcerpc_fault %s in samr_GetAliasMembership\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1415 : }
1416 152 : break;
1417 : }
1418 71 : case 17: { /* samr_LookupNames */
1419 71 : struct samr_LookupNames *r2 = (struct samr_LookupNames *)r;
1420 71 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1421 0 : DEBUG(5,("function samr_LookupNames replied async\n"));
1422 : }
1423 71 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1424 0 : NDR_PRINT_FUNCTION_DEBUG(samr_LookupNames, NDR_OUT | NDR_SET_VALUES, r2);
1425 : }
1426 71 : if (dce_call->fault_code != 0) {
1427 0 : DBG_WARNING("dcerpc_fault %s in samr_LookupNames\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1428 : }
1429 71 : break;
1430 : }
1431 5 : case 18: { /* samr_LookupRids */
1432 5 : struct samr_LookupRids *r2 = (struct samr_LookupRids *)r;
1433 5 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1434 0 : DEBUG(5,("function samr_LookupRids replied async\n"));
1435 : }
1436 5 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1437 0 : NDR_PRINT_FUNCTION_DEBUG(samr_LookupRids, NDR_OUT | NDR_SET_VALUES, r2);
1438 : }
1439 5 : if (dce_call->fault_code != 0) {
1440 0 : DBG_WARNING("dcerpc_fault %s in samr_LookupRids\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1441 : }
1442 5 : break;
1443 : }
1444 0 : case 19: { /* samr_OpenGroup */
1445 0 : struct samr_OpenGroup *r2 = (struct samr_OpenGroup *)r;
1446 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1447 0 : DEBUG(5,("function samr_OpenGroup replied async\n"));
1448 : }
1449 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1450 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenGroup, NDR_OUT | NDR_SET_VALUES, r2);
1451 : }
1452 0 : if (dce_call->fault_code != 0) {
1453 0 : DBG_WARNING("dcerpc_fault %s in samr_OpenGroup\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1454 : }
1455 0 : break;
1456 : }
1457 0 : case 20: { /* samr_QueryGroupInfo */
1458 0 : struct samr_QueryGroupInfo *r2 = (struct samr_QueryGroupInfo *)r;
1459 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1460 0 : DEBUG(5,("function samr_QueryGroupInfo replied async\n"));
1461 : }
1462 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1463 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupInfo, NDR_OUT | NDR_SET_VALUES, r2);
1464 : }
1465 0 : if (dce_call->fault_code != 0) {
1466 0 : DBG_WARNING("dcerpc_fault %s in samr_QueryGroupInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1467 : }
1468 0 : break;
1469 : }
1470 0 : case 21: { /* samr_SetGroupInfo */
1471 0 : struct samr_SetGroupInfo *r2 = (struct samr_SetGroupInfo *)r;
1472 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1473 0 : DEBUG(5,("function samr_SetGroupInfo replied async\n"));
1474 : }
1475 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1476 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetGroupInfo, NDR_OUT | NDR_SET_VALUES, r2);
1477 : }
1478 0 : if (dce_call->fault_code != 0) {
1479 0 : DBG_WARNING("dcerpc_fault %s in samr_SetGroupInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1480 : }
1481 0 : break;
1482 : }
1483 0 : case 22: { /* samr_AddGroupMember */
1484 0 : struct samr_AddGroupMember *r2 = (struct samr_AddGroupMember *)r;
1485 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1486 0 : DEBUG(5,("function samr_AddGroupMember replied async\n"));
1487 : }
1488 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1489 0 : NDR_PRINT_FUNCTION_DEBUG(samr_AddGroupMember, NDR_OUT | NDR_SET_VALUES, r2);
1490 : }
1491 0 : if (dce_call->fault_code != 0) {
1492 0 : DBG_WARNING("dcerpc_fault %s in samr_AddGroupMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1493 : }
1494 0 : break;
1495 : }
1496 0 : case 23: { /* samr_DeleteDomainGroup */
1497 0 : struct samr_DeleteDomainGroup *r2 = (struct samr_DeleteDomainGroup *)r;
1498 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1499 0 : DEBUG(5,("function samr_DeleteDomainGroup replied async\n"));
1500 : }
1501 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1502 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomainGroup, NDR_OUT | NDR_SET_VALUES, r2);
1503 : }
1504 0 : if (dce_call->fault_code != 0) {
1505 0 : DBG_WARNING("dcerpc_fault %s in samr_DeleteDomainGroup\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1506 : }
1507 0 : break;
1508 : }
1509 0 : case 24: { /* samr_DeleteGroupMember */
1510 0 : struct samr_DeleteGroupMember *r2 = (struct samr_DeleteGroupMember *)r;
1511 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1512 0 : DEBUG(5,("function samr_DeleteGroupMember replied async\n"));
1513 : }
1514 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1515 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteGroupMember, NDR_OUT | NDR_SET_VALUES, r2);
1516 : }
1517 0 : if (dce_call->fault_code != 0) {
1518 0 : DBG_WARNING("dcerpc_fault %s in samr_DeleteGroupMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1519 : }
1520 0 : break;
1521 : }
1522 0 : case 25: { /* samr_QueryGroupMember */
1523 0 : struct samr_QueryGroupMember *r2 = (struct samr_QueryGroupMember *)r;
1524 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1525 0 : DEBUG(5,("function samr_QueryGroupMember replied async\n"));
1526 : }
1527 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1528 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupMember, NDR_OUT | NDR_SET_VALUES, r2);
1529 : }
1530 0 : if (dce_call->fault_code != 0) {
1531 0 : DBG_WARNING("dcerpc_fault %s in samr_QueryGroupMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1532 : }
1533 0 : break;
1534 : }
1535 0 : case 26: { /* samr_SetMemberAttributesOfGroup */
1536 0 : struct samr_SetMemberAttributesOfGroup *r2 = (struct samr_SetMemberAttributesOfGroup *)r;
1537 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1538 0 : DEBUG(5,("function samr_SetMemberAttributesOfGroup replied async\n"));
1539 : }
1540 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1541 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetMemberAttributesOfGroup, NDR_OUT | NDR_SET_VALUES, r2);
1542 : }
1543 0 : if (dce_call->fault_code != 0) {
1544 0 : DBG_WARNING("dcerpc_fault %s in samr_SetMemberAttributesOfGroup\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1545 : }
1546 0 : break;
1547 : }
1548 0 : case 27: { /* samr_OpenAlias */
1549 0 : struct samr_OpenAlias *r2 = (struct samr_OpenAlias *)r;
1550 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1551 0 : DEBUG(5,("function samr_OpenAlias replied async\n"));
1552 : }
1553 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1554 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenAlias, NDR_OUT | NDR_SET_VALUES, r2);
1555 : }
1556 0 : if (dce_call->fault_code != 0) {
1557 0 : DBG_WARNING("dcerpc_fault %s in samr_OpenAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1558 : }
1559 0 : break;
1560 : }
1561 0 : case 28: { /* samr_QueryAliasInfo */
1562 0 : struct samr_QueryAliasInfo *r2 = (struct samr_QueryAliasInfo *)r;
1563 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1564 0 : DEBUG(5,("function samr_QueryAliasInfo replied async\n"));
1565 : }
1566 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1567 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryAliasInfo, NDR_OUT | NDR_SET_VALUES, r2);
1568 : }
1569 0 : if (dce_call->fault_code != 0) {
1570 0 : DBG_WARNING("dcerpc_fault %s in samr_QueryAliasInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1571 : }
1572 0 : break;
1573 : }
1574 0 : case 29: { /* samr_SetAliasInfo */
1575 0 : struct samr_SetAliasInfo *r2 = (struct samr_SetAliasInfo *)r;
1576 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1577 0 : DEBUG(5,("function samr_SetAliasInfo replied async\n"));
1578 : }
1579 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1580 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetAliasInfo, NDR_OUT | NDR_SET_VALUES, r2);
1581 : }
1582 0 : if (dce_call->fault_code != 0) {
1583 0 : DBG_WARNING("dcerpc_fault %s in samr_SetAliasInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1584 : }
1585 0 : break;
1586 : }
1587 0 : case 30: { /* samr_DeleteDomAlias */
1588 0 : struct samr_DeleteDomAlias *r2 = (struct samr_DeleteDomAlias *)r;
1589 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1590 0 : DEBUG(5,("function samr_DeleteDomAlias replied async\n"));
1591 : }
1592 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1593 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomAlias, NDR_OUT | NDR_SET_VALUES, r2);
1594 : }
1595 0 : if (dce_call->fault_code != 0) {
1596 0 : DBG_WARNING("dcerpc_fault %s in samr_DeleteDomAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1597 : }
1598 0 : break;
1599 : }
1600 0 : case 31: { /* samr_AddAliasMember */
1601 0 : struct samr_AddAliasMember *r2 = (struct samr_AddAliasMember *)r;
1602 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1603 0 : DEBUG(5,("function samr_AddAliasMember replied async\n"));
1604 : }
1605 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1606 0 : NDR_PRINT_FUNCTION_DEBUG(samr_AddAliasMember, NDR_OUT | NDR_SET_VALUES, r2);
1607 : }
1608 0 : if (dce_call->fault_code != 0) {
1609 0 : DBG_WARNING("dcerpc_fault %s in samr_AddAliasMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1610 : }
1611 0 : break;
1612 : }
1613 0 : case 32: { /* samr_DeleteAliasMember */
1614 0 : struct samr_DeleteAliasMember *r2 = (struct samr_DeleteAliasMember *)r;
1615 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1616 0 : DEBUG(5,("function samr_DeleteAliasMember replied async\n"));
1617 : }
1618 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1619 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteAliasMember, NDR_OUT | NDR_SET_VALUES, r2);
1620 : }
1621 0 : if (dce_call->fault_code != 0) {
1622 0 : DBG_WARNING("dcerpc_fault %s in samr_DeleteAliasMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1623 : }
1624 0 : break;
1625 : }
1626 0 : case 33: { /* samr_GetMembersInAlias */
1627 0 : struct samr_GetMembersInAlias *r2 = (struct samr_GetMembersInAlias *)r;
1628 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1629 0 : DEBUG(5,("function samr_GetMembersInAlias replied async\n"));
1630 : }
1631 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1632 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetMembersInAlias, NDR_OUT | NDR_SET_VALUES, r2);
1633 : }
1634 0 : if (dce_call->fault_code != 0) {
1635 0 : DBG_WARNING("dcerpc_fault %s in samr_GetMembersInAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1636 : }
1637 0 : break;
1638 : }
1639 15 : case 34: { /* samr_OpenUser */
1640 15 : struct samr_OpenUser *r2 = (struct samr_OpenUser *)r;
1641 15 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1642 0 : DEBUG(5,("function samr_OpenUser replied async\n"));
1643 : }
1644 15 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1645 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenUser, NDR_OUT | NDR_SET_VALUES, r2);
1646 : }
1647 15 : if (dce_call->fault_code != 0) {
1648 0 : DBG_WARNING("dcerpc_fault %s in samr_OpenUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1649 : }
1650 15 : break;
1651 : }
1652 2 : case 35: { /* samr_DeleteUser */
1653 2 : struct samr_DeleteUser *r2 = (struct samr_DeleteUser *)r;
1654 2 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1655 0 : DEBUG(5,("function samr_DeleteUser replied async\n"));
1656 : }
1657 2 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1658 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteUser, NDR_OUT | NDR_SET_VALUES, r2);
1659 : }
1660 2 : if (dce_call->fault_code != 0) {
1661 0 : DBG_WARNING("dcerpc_fault %s in samr_DeleteUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1662 : }
1663 2 : break;
1664 : }
1665 2 : case 36: { /* samr_QueryUserInfo */
1666 2 : struct samr_QueryUserInfo *r2 = (struct samr_QueryUserInfo *)r;
1667 2 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1668 0 : DEBUG(5,("function samr_QueryUserInfo replied async\n"));
1669 : }
1670 2 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1671 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo, NDR_OUT | NDR_SET_VALUES, r2);
1672 : }
1673 2 : if (dce_call->fault_code != 0) {
1674 0 : DBG_WARNING("dcerpc_fault %s in samr_QueryUserInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1675 : }
1676 2 : break;
1677 : }
1678 0 : case 37: { /* samr_SetUserInfo */
1679 0 : struct samr_SetUserInfo *r2 = (struct samr_SetUserInfo *)r;
1680 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1681 0 : DEBUG(5,("function samr_SetUserInfo replied async\n"));
1682 : }
1683 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1684 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo, NDR_OUT | NDR_SET_VALUES, r2);
1685 : }
1686 0 : if (dce_call->fault_code != 0) {
1687 0 : DBG_WARNING("dcerpc_fault %s in samr_SetUserInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1688 : }
1689 0 : break;
1690 : }
1691 0 : case 38: { /* samr_ChangePasswordUser */
1692 0 : struct samr_ChangePasswordUser *r2 = (struct samr_ChangePasswordUser *)r;
1693 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1694 0 : DEBUG(5,("function samr_ChangePasswordUser replied async\n"));
1695 : }
1696 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1697 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser, NDR_OUT | NDR_SET_VALUES, r2);
1698 : }
1699 0 : if (dce_call->fault_code != 0) {
1700 0 : DBG_WARNING("dcerpc_fault %s in samr_ChangePasswordUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1701 : }
1702 0 : break;
1703 : }
1704 2 : case 39: { /* samr_GetGroupsForUser */
1705 2 : struct samr_GetGroupsForUser *r2 = (struct samr_GetGroupsForUser *)r;
1706 2 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1707 0 : DEBUG(5,("function samr_GetGroupsForUser replied async\n"));
1708 : }
1709 2 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1710 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetGroupsForUser, NDR_OUT | NDR_SET_VALUES, r2);
1711 : }
1712 2 : if (dce_call->fault_code != 0) {
1713 0 : DBG_WARNING("dcerpc_fault %s in samr_GetGroupsForUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1714 : }
1715 2 : break;
1716 : }
1717 0 : case 40: { /* samr_QueryDisplayInfo */
1718 0 : struct samr_QueryDisplayInfo *r2 = (struct samr_QueryDisplayInfo *)r;
1719 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1720 0 : DEBUG(5,("function samr_QueryDisplayInfo replied async\n"));
1721 : }
1722 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1723 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo, NDR_OUT | NDR_SET_VALUES, r2);
1724 : }
1725 0 : if (dce_call->fault_code != 0) {
1726 0 : DBG_WARNING("dcerpc_fault %s in samr_QueryDisplayInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1727 : }
1728 0 : break;
1729 : }
1730 0 : case 41: { /* samr_GetDisplayEnumerationIndex */
1731 0 : struct samr_GetDisplayEnumerationIndex *r2 = (struct samr_GetDisplayEnumerationIndex *)r;
1732 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1733 0 : DEBUG(5,("function samr_GetDisplayEnumerationIndex replied async\n"));
1734 : }
1735 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1736 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex, NDR_OUT | NDR_SET_VALUES, r2);
1737 : }
1738 0 : if (dce_call->fault_code != 0) {
1739 0 : DBG_WARNING("dcerpc_fault %s in samr_GetDisplayEnumerationIndex\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1740 : }
1741 0 : break;
1742 : }
1743 0 : case 42: { /* samr_TestPrivateFunctionsDomain */
1744 0 : struct samr_TestPrivateFunctionsDomain *r2 = (struct samr_TestPrivateFunctionsDomain *)r;
1745 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1746 0 : DEBUG(5,("function samr_TestPrivateFunctionsDomain replied async\n"));
1747 : }
1748 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1749 0 : NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsDomain, NDR_OUT | NDR_SET_VALUES, r2);
1750 : }
1751 0 : if (dce_call->fault_code != 0) {
1752 0 : DBG_WARNING("dcerpc_fault %s in samr_TestPrivateFunctionsDomain\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1753 : }
1754 0 : break;
1755 : }
1756 0 : case 43: { /* samr_TestPrivateFunctionsUser */
1757 0 : struct samr_TestPrivateFunctionsUser *r2 = (struct samr_TestPrivateFunctionsUser *)r;
1758 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1759 0 : DEBUG(5,("function samr_TestPrivateFunctionsUser replied async\n"));
1760 : }
1761 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1762 0 : NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsUser, NDR_OUT | NDR_SET_VALUES, r2);
1763 : }
1764 0 : if (dce_call->fault_code != 0) {
1765 0 : DBG_WARNING("dcerpc_fault %s in samr_TestPrivateFunctionsUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1766 : }
1767 0 : break;
1768 : }
1769 2 : case 44: { /* samr_GetUserPwInfo */
1770 2 : struct samr_GetUserPwInfo *r2 = (struct samr_GetUserPwInfo *)r;
1771 2 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1772 0 : DEBUG(5,("function samr_GetUserPwInfo replied async\n"));
1773 : }
1774 2 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1775 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetUserPwInfo, NDR_OUT | NDR_SET_VALUES, r2);
1776 : }
1777 2 : if (dce_call->fault_code != 0) {
1778 0 : DBG_WARNING("dcerpc_fault %s in samr_GetUserPwInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1779 : }
1780 2 : break;
1781 : }
1782 2 : case 45: { /* samr_RemoveMemberFromForeignDomain */
1783 2 : struct samr_RemoveMemberFromForeignDomain *r2 = (struct samr_RemoveMemberFromForeignDomain *)r;
1784 2 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1785 0 : DEBUG(5,("function samr_RemoveMemberFromForeignDomain replied async\n"));
1786 : }
1787 2 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1788 0 : NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMemberFromForeignDomain, NDR_OUT | NDR_SET_VALUES, r2);
1789 : }
1790 2 : if (dce_call->fault_code != 0) {
1791 0 : DBG_WARNING("dcerpc_fault %s in samr_RemoveMemberFromForeignDomain\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1792 : }
1793 2 : break;
1794 : }
1795 0 : case 46: { /* samr_QueryDomainInfo2 */
1796 0 : struct samr_QueryDomainInfo2 *r2 = (struct samr_QueryDomainInfo2 *)r;
1797 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1798 0 : DEBUG(5,("function samr_QueryDomainInfo2 replied async\n"));
1799 : }
1800 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1801 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo2, NDR_OUT | NDR_SET_VALUES, r2);
1802 : }
1803 0 : if (dce_call->fault_code != 0) {
1804 0 : DBG_WARNING("dcerpc_fault %s in samr_QueryDomainInfo2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1805 : }
1806 0 : break;
1807 : }
1808 18 : case 47: { /* samr_QueryUserInfo2 */
1809 18 : struct samr_QueryUserInfo2 *r2 = (struct samr_QueryUserInfo2 *)r;
1810 18 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1811 0 : DEBUG(5,("function samr_QueryUserInfo2 replied async\n"));
1812 : }
1813 18 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1814 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo2, NDR_OUT | NDR_SET_VALUES, r2);
1815 : }
1816 18 : if (dce_call->fault_code != 0) {
1817 0 : DBG_WARNING("dcerpc_fault %s in samr_QueryUserInfo2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1818 : }
1819 18 : break;
1820 : }
1821 0 : case 48: { /* samr_QueryDisplayInfo2 */
1822 0 : struct samr_QueryDisplayInfo2 *r2 = (struct samr_QueryDisplayInfo2 *)r;
1823 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1824 0 : DEBUG(5,("function samr_QueryDisplayInfo2 replied async\n"));
1825 : }
1826 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1827 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo2, NDR_OUT | NDR_SET_VALUES, r2);
1828 : }
1829 0 : if (dce_call->fault_code != 0) {
1830 0 : DBG_WARNING("dcerpc_fault %s in samr_QueryDisplayInfo2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1831 : }
1832 0 : break;
1833 : }
1834 0 : case 49: { /* samr_GetDisplayEnumerationIndex2 */
1835 0 : struct samr_GetDisplayEnumerationIndex2 *r2 = (struct samr_GetDisplayEnumerationIndex2 *)r;
1836 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1837 0 : DEBUG(5,("function samr_GetDisplayEnumerationIndex2 replied async\n"));
1838 : }
1839 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1840 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex2, NDR_OUT | NDR_SET_VALUES, r2);
1841 : }
1842 0 : if (dce_call->fault_code != 0) {
1843 0 : DBG_WARNING("dcerpc_fault %s in samr_GetDisplayEnumerationIndex2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1844 : }
1845 0 : break;
1846 : }
1847 3 : case 50: { /* samr_CreateUser2 */
1848 3 : struct samr_CreateUser2 *r2 = (struct samr_CreateUser2 *)r;
1849 3 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1850 0 : DEBUG(5,("function samr_CreateUser2 replied async\n"));
1851 : }
1852 3 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1853 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser2, NDR_OUT | NDR_SET_VALUES, r2);
1854 : }
1855 3 : if (dce_call->fault_code != 0) {
1856 0 : DBG_WARNING("dcerpc_fault %s in samr_CreateUser2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1857 : }
1858 3 : break;
1859 : }
1860 0 : case 51: { /* samr_QueryDisplayInfo3 */
1861 0 : struct samr_QueryDisplayInfo3 *r2 = (struct samr_QueryDisplayInfo3 *)r;
1862 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1863 0 : DEBUG(5,("function samr_QueryDisplayInfo3 replied async\n"));
1864 : }
1865 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1866 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo3, NDR_OUT | NDR_SET_VALUES, r2);
1867 : }
1868 0 : if (dce_call->fault_code != 0) {
1869 0 : DBG_WARNING("dcerpc_fault %s in samr_QueryDisplayInfo3\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1870 : }
1871 0 : break;
1872 : }
1873 0 : case 52: { /* samr_AddMultipleMembersToAlias */
1874 0 : struct samr_AddMultipleMembersToAlias *r2 = (struct samr_AddMultipleMembersToAlias *)r;
1875 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1876 0 : DEBUG(5,("function samr_AddMultipleMembersToAlias replied async\n"));
1877 : }
1878 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1879 0 : NDR_PRINT_FUNCTION_DEBUG(samr_AddMultipleMembersToAlias, NDR_OUT | NDR_SET_VALUES, r2);
1880 : }
1881 0 : if (dce_call->fault_code != 0) {
1882 0 : DBG_WARNING("dcerpc_fault %s in samr_AddMultipleMembersToAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1883 : }
1884 0 : break;
1885 : }
1886 0 : case 53: { /* samr_RemoveMultipleMembersFromAlias */
1887 0 : struct samr_RemoveMultipleMembersFromAlias *r2 = (struct samr_RemoveMultipleMembersFromAlias *)r;
1888 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1889 0 : DEBUG(5,("function samr_RemoveMultipleMembersFromAlias replied async\n"));
1890 : }
1891 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1892 0 : NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMultipleMembersFromAlias, NDR_OUT | NDR_SET_VALUES, r2);
1893 : }
1894 0 : if (dce_call->fault_code != 0) {
1895 0 : DBG_WARNING("dcerpc_fault %s in samr_RemoveMultipleMembersFromAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1896 : }
1897 0 : break;
1898 : }
1899 0 : case 54: { /* samr_OemChangePasswordUser2 */
1900 0 : struct samr_OemChangePasswordUser2 *r2 = (struct samr_OemChangePasswordUser2 *)r;
1901 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1902 0 : DEBUG(5,("function samr_OemChangePasswordUser2 replied async\n"));
1903 : }
1904 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1905 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OemChangePasswordUser2, NDR_OUT | NDR_SET_VALUES, r2);
1906 : }
1907 0 : if (dce_call->fault_code != 0) {
1908 0 : DBG_WARNING("dcerpc_fault %s in samr_OemChangePasswordUser2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1909 : }
1910 0 : break;
1911 : }
1912 4 : case 55: { /* samr_ChangePasswordUser2 */
1913 4 : struct samr_ChangePasswordUser2 *r2 = (struct samr_ChangePasswordUser2 *)r;
1914 4 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1915 0 : DEBUG(5,("function samr_ChangePasswordUser2 replied async\n"));
1916 : }
1917 4 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1918 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser2, NDR_OUT | NDR_SET_VALUES, r2);
1919 : }
1920 4 : if (dce_call->fault_code != 0) {
1921 0 : DBG_WARNING("dcerpc_fault %s in samr_ChangePasswordUser2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1922 : }
1923 4 : break;
1924 : }
1925 0 : case 56: { /* samr_GetDomPwInfo */
1926 0 : struct samr_GetDomPwInfo *r2 = (struct samr_GetDomPwInfo *)r;
1927 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1928 0 : DEBUG(5,("function samr_GetDomPwInfo replied async\n"));
1929 : }
1930 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1931 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetDomPwInfo, NDR_OUT | NDR_SET_VALUES, r2);
1932 : }
1933 0 : if (dce_call->fault_code != 0) {
1934 0 : DBG_WARNING("dcerpc_fault %s in samr_GetDomPwInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1935 : }
1936 0 : break;
1937 : }
1938 50 : case 57: { /* samr_Connect2 */
1939 50 : struct samr_Connect2 *r2 = (struct samr_Connect2 *)r;
1940 50 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1941 0 : DEBUG(5,("function samr_Connect2 replied async\n"));
1942 : }
1943 50 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1944 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect2, NDR_OUT | NDR_SET_VALUES, r2);
1945 : }
1946 50 : if (dce_call->fault_code != 0) {
1947 0 : DBG_WARNING("dcerpc_fault %s in samr_Connect2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1948 : }
1949 50 : break;
1950 : }
1951 6 : case 58: { /* samr_SetUserInfo2 */
1952 6 : struct samr_SetUserInfo2 *r2 = (struct samr_SetUserInfo2 *)r;
1953 6 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1954 0 : DEBUG(5,("function samr_SetUserInfo2 replied async\n"));
1955 : }
1956 6 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1957 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo2, NDR_OUT | NDR_SET_VALUES, r2);
1958 : }
1959 6 : if (dce_call->fault_code != 0) {
1960 0 : DBG_WARNING("dcerpc_fault %s in samr_SetUserInfo2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1961 : }
1962 6 : break;
1963 : }
1964 0 : case 59: { /* samr_SetBootKeyInformation */
1965 0 : struct samr_SetBootKeyInformation *r2 = (struct samr_SetBootKeyInformation *)r;
1966 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1967 0 : DEBUG(5,("function samr_SetBootKeyInformation replied async\n"));
1968 : }
1969 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1970 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetBootKeyInformation, NDR_OUT | NDR_SET_VALUES, r2);
1971 : }
1972 0 : if (dce_call->fault_code != 0) {
1973 0 : DBG_WARNING("dcerpc_fault %s in samr_SetBootKeyInformation\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1974 : }
1975 0 : break;
1976 : }
1977 0 : case 60: { /* samr_GetBootKeyInformation */
1978 0 : struct samr_GetBootKeyInformation *r2 = (struct samr_GetBootKeyInformation *)r;
1979 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1980 0 : DEBUG(5,("function samr_GetBootKeyInformation replied async\n"));
1981 : }
1982 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1983 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetBootKeyInformation, NDR_OUT | NDR_SET_VALUES, r2);
1984 : }
1985 0 : if (dce_call->fault_code != 0) {
1986 0 : DBG_WARNING("dcerpc_fault %s in samr_GetBootKeyInformation\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1987 : }
1988 0 : break;
1989 : }
1990 0 : case 61: { /* samr_Connect3 */
1991 0 : struct samr_Connect3 *r2 = (struct samr_Connect3 *)r;
1992 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1993 0 : DEBUG(5,("function samr_Connect3 replied async\n"));
1994 : }
1995 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1996 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect3, NDR_OUT | NDR_SET_VALUES, r2);
1997 : }
1998 0 : if (dce_call->fault_code != 0) {
1999 0 : DBG_WARNING("dcerpc_fault %s in samr_Connect3\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2000 : }
2001 0 : break;
2002 : }
2003 0 : case 62: { /* samr_Connect4 */
2004 0 : struct samr_Connect4 *r2 = (struct samr_Connect4 *)r;
2005 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2006 0 : DEBUG(5,("function samr_Connect4 replied async\n"));
2007 : }
2008 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2009 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect4, NDR_OUT | NDR_SET_VALUES, r2);
2010 : }
2011 0 : if (dce_call->fault_code != 0) {
2012 0 : DBG_WARNING("dcerpc_fault %s in samr_Connect4\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2013 : }
2014 0 : break;
2015 : }
2016 0 : case 63: { /* samr_ChangePasswordUser3 */
2017 0 : struct samr_ChangePasswordUser3 *r2 = (struct samr_ChangePasswordUser3 *)r;
2018 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2019 0 : DEBUG(5,("function samr_ChangePasswordUser3 replied async\n"));
2020 : }
2021 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2022 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser3, NDR_OUT | NDR_SET_VALUES, r2);
2023 : }
2024 0 : if (dce_call->fault_code != 0) {
2025 0 : DBG_WARNING("dcerpc_fault %s in samr_ChangePasswordUser3\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2026 : }
2027 0 : break;
2028 : }
2029 4 : case 64: { /* samr_Connect5 */
2030 4 : struct samr_Connect5 *r2 = (struct samr_Connect5 *)r;
2031 4 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2032 0 : DEBUG(5,("function samr_Connect5 replied async\n"));
2033 : }
2034 4 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2035 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect5, NDR_OUT | NDR_SET_VALUES, r2);
2036 : }
2037 4 : if (dce_call->fault_code != 0) {
2038 0 : DBG_WARNING("dcerpc_fault %s in samr_Connect5\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2039 : }
2040 4 : break;
2041 : }
2042 0 : case 65: { /* samr_RidToSid */
2043 0 : struct samr_RidToSid *r2 = (struct samr_RidToSid *)r;
2044 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2045 0 : DEBUG(5,("function samr_RidToSid replied async\n"));
2046 : }
2047 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2048 0 : NDR_PRINT_FUNCTION_DEBUG(samr_RidToSid, NDR_OUT | NDR_SET_VALUES, r2);
2049 : }
2050 0 : if (dce_call->fault_code != 0) {
2051 0 : DBG_WARNING("dcerpc_fault %s in samr_RidToSid\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2052 : }
2053 0 : break;
2054 : }
2055 0 : case 66: { /* samr_SetDsrmPassword */
2056 0 : struct samr_SetDsrmPassword *r2 = (struct samr_SetDsrmPassword *)r;
2057 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2058 0 : DEBUG(5,("function samr_SetDsrmPassword replied async\n"));
2059 : }
2060 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2061 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetDsrmPassword, NDR_OUT | NDR_SET_VALUES, r2);
2062 : }
2063 0 : if (dce_call->fault_code != 0) {
2064 0 : DBG_WARNING("dcerpc_fault %s in samr_SetDsrmPassword\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2065 : }
2066 0 : break;
2067 : }
2068 0 : case 67: { /* samr_ValidatePassword */
2069 0 : struct samr_ValidatePassword *r2 = (struct samr_ValidatePassword *)r;
2070 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2071 0 : DEBUG(5,("function samr_ValidatePassword replied async\n"));
2072 : }
2073 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2074 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ValidatePassword, NDR_OUT | NDR_SET_VALUES, r2);
2075 : }
2076 0 : if (dce_call->fault_code != 0) {
2077 0 : DBG_WARNING("dcerpc_fault %s in samr_ValidatePassword\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2078 : }
2079 0 : break;
2080 : }
2081 0 : case 68: { /* samr_Opnum68NotUsedOnWire */
2082 0 : struct samr_Opnum68NotUsedOnWire *r2 = (struct samr_Opnum68NotUsedOnWire *)r;
2083 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2084 0 : DEBUG(5,("function samr_Opnum68NotUsedOnWire replied async\n"));
2085 : }
2086 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2087 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Opnum68NotUsedOnWire, NDR_OUT | NDR_SET_VALUES, r2);
2088 : }
2089 0 : if (dce_call->fault_code != 0) {
2090 0 : DBG_WARNING("dcerpc_fault %s in samr_Opnum68NotUsedOnWire\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2091 : }
2092 0 : break;
2093 : }
2094 0 : case 69: { /* samr_Opnum69NotUsedOnWire */
2095 0 : struct samr_Opnum69NotUsedOnWire *r2 = (struct samr_Opnum69NotUsedOnWire *)r;
2096 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2097 0 : DEBUG(5,("function samr_Opnum69NotUsedOnWire replied async\n"));
2098 : }
2099 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2100 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Opnum69NotUsedOnWire, NDR_OUT | NDR_SET_VALUES, r2);
2101 : }
2102 0 : if (dce_call->fault_code != 0) {
2103 0 : DBG_WARNING("dcerpc_fault %s in samr_Opnum69NotUsedOnWire\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2104 : }
2105 0 : break;
2106 : }
2107 0 : case 70: { /* samr_Opnum70NotUsedOnWire */
2108 0 : struct samr_Opnum70NotUsedOnWire *r2 = (struct samr_Opnum70NotUsedOnWire *)r;
2109 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2110 0 : DEBUG(5,("function samr_Opnum70NotUsedOnWire replied async\n"));
2111 : }
2112 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2113 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Opnum70NotUsedOnWire, NDR_OUT | NDR_SET_VALUES, r2);
2114 : }
2115 0 : if (dce_call->fault_code != 0) {
2116 0 : DBG_WARNING("dcerpc_fault %s in samr_Opnum70NotUsedOnWire\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2117 : }
2118 0 : break;
2119 : }
2120 0 : case 71: { /* samr_Opnum71NotUsedOnWire */
2121 0 : struct samr_Opnum71NotUsedOnWire *r2 = (struct samr_Opnum71NotUsedOnWire *)r;
2122 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2123 0 : DEBUG(5,("function samr_Opnum71NotUsedOnWire replied async\n"));
2124 : }
2125 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2126 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Opnum71NotUsedOnWire, NDR_OUT | NDR_SET_VALUES, r2);
2127 : }
2128 0 : if (dce_call->fault_code != 0) {
2129 0 : DBG_WARNING("dcerpc_fault %s in samr_Opnum71NotUsedOnWire\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2130 : }
2131 0 : break;
2132 : }
2133 0 : case 72: { /* samr_Opnum72NotUsedOnWire */
2134 0 : struct samr_Opnum72NotUsedOnWire *r2 = (struct samr_Opnum72NotUsedOnWire *)r;
2135 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2136 0 : DEBUG(5,("function samr_Opnum72NotUsedOnWire replied async\n"));
2137 : }
2138 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2139 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Opnum72NotUsedOnWire, NDR_OUT | NDR_SET_VALUES, r2);
2140 : }
2141 0 : if (dce_call->fault_code != 0) {
2142 0 : DBG_WARNING("dcerpc_fault %s in samr_Opnum72NotUsedOnWire\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2143 : }
2144 0 : break;
2145 : }
2146 1 : case 73: { /* samr_ChangePasswordUser4 */
2147 1 : struct samr_ChangePasswordUser4 *r2 = (struct samr_ChangePasswordUser4 *)r;
2148 1 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2149 0 : DEBUG(5,("function samr_ChangePasswordUser4 replied async\n"));
2150 : }
2151 1 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2152 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser4, NDR_OUT | NDR_SET_VALUES, r2);
2153 : }
2154 1 : if (dce_call->fault_code != 0) {
2155 0 : DBG_WARNING("dcerpc_fault %s in samr_ChangePasswordUser4\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2156 : }
2157 1 : break;
2158 : }
2159 0 : default:
2160 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
2161 0 : break;
2162 : }
2163 :
2164 471 : if (dce_call->fault_code != 0) {
2165 0 : return NT_STATUS_NET_WRITE_FAULT;
2166 : }
2167 :
2168 471 : return NT_STATUS_OK;
2169 : }
2170 :
2171 471 : NTSTATUS samr__op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
2172 : {
2173 : enum ndr_err_code ndr_err;
2174 471 : uint16_t opnum = dce_call->pkt.u.request.opnum;
2175 :
2176 471 : ndr_err = ndr_table_samr.calls[opnum].ndr_push(push, NDR_OUT, r);
2177 471 : if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2178 0 : dce_call->fault_code = DCERPC_FAULT_NDR;
2179 0 : return NT_STATUS_NET_WRITE_FAULT;
2180 : }
2181 :
2182 471 : return NT_STATUS_OK;
2183 : }
2184 :
2185 0 : NTSTATUS samr__op_local(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
2186 : {
2187 0 : return samr__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_INTERNAL);
2188 : }
2189 :
2190 : static const struct dcesrv_interface dcesrv_samr_interface = {
2191 : .name = "samr",
2192 : .syntax_id = {{0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xac}},1.0},
2193 : .bind = samr__op_bind,
2194 : .unbind = samr__op_unbind,
2195 : .ndr_pull = samr__op_ndr_pull,
2196 : .dispatch = samr__op_dispatch,
2197 : .reply = samr__op_reply,
2198 : .ndr_push = samr__op_ndr_push,
2199 : .local = samr__op_local,
2200 : #ifdef DCESRV_INTERFACE_SAMR_FLAGS
2201 : .flags = DCESRV_INTERFACE_SAMR_FLAGS
2202 : #else
2203 : .flags = 0
2204 : #endif
2205 : };
2206 :
2207 59 : static NTSTATUS samr__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
2208 : {
2209 : uint32_t i;
2210 : NTSTATUS ret;
2211 :
2212 : #ifdef DCESRV_INTERFACE_SAMR_NCACN_NP_SECONDARY_ENDPOINT
2213 : const char *ncacn_np_secondary_endpoint = DCESRV_INTERFACE_SAMR_NCACN_NP_SECONDARY_ENDPOINT;
2214 : #else
2215 59 : const char *ncacn_np_secondary_endpoint = NULL;
2216 : #endif
2217 :
2218 236 : for (i=0;i<ndr_table_samr.endpoints->count;i++) {
2219 177 : const char *name = ndr_table_samr.endpoints->names[i];
2220 :
2221 177 : ret = dcesrv_interface_register(dce_ctx, name, ncacn_np_secondary_endpoint, &dcesrv_samr_interface, NULL);
2222 177 : if (!NT_STATUS_IS_OK(ret)) {
2223 0 : DBG_ERR("Failed to register endpoint '%s'\n",name);
2224 0 : return ret;
2225 : }
2226 : }
2227 :
2228 59 : return NT_STATUS_OK;
2229 : }
2230 :
2231 59 : static NTSTATUS samr__op_shutdown_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
2232 : {
2233 59 : return NT_STATUS_OK;
2234 : }
2235 :
2236 0 : static bool samr__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
2237 : {
2238 0 : if (dcesrv_samr_interface.syntax_id.if_version == if_version && GUID_equal(&dcesrv_samr_interface.syntax_id.uuid, uuid)) {
2239 0 : memcpy(iface,&dcesrv_samr_interface, sizeof(*iface));
2240 0 : return true;
2241 : }
2242 :
2243 0 : return false;
2244 : }
2245 :
2246 0 : static bool samr__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
2247 : {
2248 0 : if (strcmp(dcesrv_samr_interface.name, name)==0) {
2249 0 : memcpy(iface, &dcesrv_samr_interface, sizeof(*iface));
2250 0 : return true;
2251 : }
2252 :
2253 0 : return false;
2254 : }
2255 :
2256 : static const struct dcesrv_endpoint_server samr_ep_server = {
2257 : /* fill in our name */
2258 : .name = "samr",
2259 :
2260 : /* Initialization flag */
2261 : .initialized = false,
2262 :
2263 : /* fill in all the operations */
2264 : #ifdef DCESRV_INTERFACE_SAMR_INIT_SERVER
2265 : .init_server = DCESRV_INTERFACE_SAMR_INIT_SERVER,
2266 : #else
2267 : .init_server = samr__op_init_server,
2268 : #endif
2269 : #ifdef DCESRV_INTERFACE_SAMR_SHUTDOWN_SERVER
2270 : .shutdown_server = DCESRV_INTERFACE_SAMR_SHUTDOWN_SERVER,
2271 : #else
2272 : .shutdown_server = samr__op_shutdown_server,
2273 : #endif
2274 : .interface_by_uuid = samr__op_interface_by_uuid,
2275 : .interface_by_name = samr__op_interface_by_name
2276 : };
2277 :
2278 59 : const struct dcesrv_endpoint_server *samr_get_ep_server(void)
2279 : {
2280 59 : return &samr_ep_server;
2281 : }
|