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 536 : 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 536 : return NT_STATUS_OK;
21 : #endif
22 : }
23 :
24 535 : 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 535 : return;
30 : #endif
31 : }
32 :
33 25515 : NTSTATUS samr__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
34 : {
35 0 : enum ndr_err_code ndr_err;
36 25515 : uint16_t opnum = dce_call->pkt.u.request.opnum;
37 :
38 25515 : dce_call->fault_code = 0;
39 :
40 25515 : 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 25515 : *r = talloc_named(mem_ctx, ndr_table_samr.calls[opnum].struct_size, "struct %s", ndr_table_samr.calls[opnum].name);
46 25515 : NT_STATUS_HAVE_NO_MEMORY(*r);
47 :
48 : /* unravel the NDR for the packet */
49 25515 : ndr_err = ndr_table_samr.calls[opnum].ndr_pull(pull, NDR_IN, *r);
50 25515 : 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 25515 : return NT_STATUS_OK;
56 : }
57 :
58 25515 : 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 25515 : uint16_t opnum = dce_call->pkt.u.request.opnum;
61 25515 : struct pipes_struct *p = NULL;
62 25515 : NTSTATUS status = NT_STATUS_OK;
63 25515 : bool impersonated = false;
64 :
65 : /* Retrieve pipes struct */
66 25515 : p = dcesrv_get_pipes_struct(dce_call->conn);
67 25515 : p->dce_call = dce_call;
68 25515 : p->mem_ctx = mem_ctx;
69 : /* Reset pipes struct fault state */
70 25515 : p->fault_state = 0;
71 :
72 : /* Impersonate */
73 25515 : if (dispatch == S3COMPAT_RPC_DISPATCH_EXTERNAL) {
74 25515 : impersonated = become_authenticated_pipe_user(dce_call->auth_state->session_info);
75 25515 : 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 25515 : switch (opnum) {
83 229 : case 0: { /* samr_Connect */
84 229 : struct samr_Connect *r2 = (struct samr_Connect *)r;
85 229 : if (DEBUGLEVEL >= 10) {
86 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect, NDR_IN, r2);
87 : }
88 229 : NDR_ZERO_STRUCT(r2->out);
89 229 : r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
90 229 : 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 229 : r2->out.result = _samr_Connect(p, r2);
97 229 : break;
98 : }
99 5211 : case 1: { /* samr_Close */
100 5211 : struct samr_Close *r2 = (struct samr_Close *)r;
101 5211 : if (DEBUGLEVEL >= 10) {
102 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Close, NDR_IN, r2);
103 : }
104 5211 : NDR_ZERO_STRUCT(r2->out);
105 5211 : r2->out.handle = r2->in.handle;
106 5211 : r2->out.result = _samr_Close(p, r2);
107 5211 : break;
108 : }
109 2 : case 2: { /* samr_SetSecurity */
110 2 : struct samr_SetSecurity *r2 = (struct samr_SetSecurity *)r;
111 2 : if (DEBUGLEVEL >= 10) {
112 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetSecurity, NDR_IN, r2);
113 : }
114 2 : r2->out.result = _samr_SetSecurity(p, r2);
115 2 : break;
116 : }
117 4 : case 3: { /* samr_QuerySecurity */
118 4 : struct samr_QuerySecurity *r2 = (struct samr_QuerySecurity *)r;
119 4 : if (DEBUGLEVEL >= 10) {
120 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QuerySecurity, NDR_IN, r2);
121 : }
122 4 : NDR_ZERO_STRUCT(r2->out);
123 4 : r2->out.sdbuf = talloc_zero(r2, struct sec_desc_buf *);
124 4 : 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 4 : r2->out.result = _samr_QuerySecurity(p, r2);
131 4 : 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 370 : case 5: { /* samr_LookupDomain */
142 370 : struct samr_LookupDomain *r2 = (struct samr_LookupDomain *)r;
143 370 : if (DEBUGLEVEL >= 10) {
144 0 : NDR_PRINT_FUNCTION_DEBUG(samr_LookupDomain, NDR_IN, r2);
145 : }
146 370 : NDR_ZERO_STRUCT(r2->out);
147 370 : r2->out.sid = talloc_zero(r2, struct dom_sid2 *);
148 370 : 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 370 : r2->out.result = _samr_LookupDomain(p, r2);
155 370 : break;
156 : }
157 60 : case 6: { /* samr_EnumDomains */
158 60 : struct samr_EnumDomains *r2 = (struct samr_EnumDomains *)r;
159 60 : if (DEBUGLEVEL >= 10) {
160 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomains, NDR_IN, r2);
161 : }
162 60 : NDR_ZERO_STRUCT(r2->out);
163 60 : r2->out.resume_handle = r2->in.resume_handle;
164 60 : r2->out.sam = talloc_zero(r2, struct samr_SamArray *);
165 60 : 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 60 : r2->out.num_entries = talloc_zero(r2, uint32_t);
172 60 : 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 60 : r2->out.result = _samr_EnumDomains(p, r2);
179 60 : break;
180 : }
181 538 : case 7: { /* samr_OpenDomain */
182 538 : struct samr_OpenDomain *r2 = (struct samr_OpenDomain *)r;
183 538 : if (DEBUGLEVEL >= 10) {
184 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenDomain, NDR_IN, r2);
185 : }
186 538 : NDR_ZERO_STRUCT(r2->out);
187 538 : r2->out.domain_handle = talloc_zero(r2, struct policy_handle);
188 538 : 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 538 : r2->out.result = _samr_OpenDomain(p, r2);
195 538 : break;
196 : }
197 68 : case 8: { /* samr_QueryDomainInfo */
198 68 : struct samr_QueryDomainInfo *r2 = (struct samr_QueryDomainInfo *)r;
199 68 : if (DEBUGLEVEL >= 10) {
200 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo, NDR_IN, r2);
201 : }
202 68 : NDR_ZERO_STRUCT(r2->out);
203 68 : r2->out.info = talloc_zero(r2, union samr_DomainInfo *);
204 68 : 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 68 : r2->out.result = _samr_QueryDomainInfo(p, r2);
211 68 : break;
212 : }
213 62 : case 9: { /* samr_SetDomainInfo */
214 62 : struct samr_SetDomainInfo *r2 = (struct samr_SetDomainInfo *)r;
215 62 : if (DEBUGLEVEL >= 10) {
216 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetDomainInfo, NDR_IN, r2);
217 : }
218 62 : r2->out.result = _samr_SetDomainInfo(p, r2);
219 62 : break;
220 : }
221 602 : case 10: { /* samr_CreateDomainGroup */
222 602 : struct samr_CreateDomainGroup *r2 = (struct samr_CreateDomainGroup *)r;
223 602 : if (DEBUGLEVEL >= 10) {
224 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomainGroup, NDR_IN, r2);
225 : }
226 602 : NDR_ZERO_STRUCT(r2->out);
227 602 : r2->out.group_handle = talloc_zero(r2, struct policy_handle);
228 602 : 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 602 : r2->out.rid = talloc_zero(r2, uint32_t);
235 602 : 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 602 : r2->out.result = _samr_CreateDomainGroup(p, r2);
242 602 : break;
243 : }
244 15 : case 11: { /* samr_EnumDomainGroups */
245 15 : struct samr_EnumDomainGroups *r2 = (struct samr_EnumDomainGroups *)r;
246 15 : if (DEBUGLEVEL >= 10) {
247 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainGroups, NDR_IN, r2);
248 : }
249 15 : NDR_ZERO_STRUCT(r2->out);
250 15 : r2->out.resume_handle = r2->in.resume_handle;
251 15 : r2->out.sam = talloc_zero(r2, struct samr_SamArray *);
252 15 : 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 15 : r2->out.num_entries = talloc_zero(r2, uint32_t);
259 15 : 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 15 : r2->out.result = _samr_EnumDomainGroups(p, r2);
266 15 : break;
267 : }
268 624 : case 12: { /* samr_CreateUser */
269 624 : struct samr_CreateUser *r2 = (struct samr_CreateUser *)r;
270 624 : if (DEBUGLEVEL >= 10) {
271 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser, NDR_IN, r2);
272 : }
273 624 : NDR_ZERO_STRUCT(r2->out);
274 624 : r2->out.user_handle = talloc_zero(r2, struct policy_handle);
275 624 : 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 624 : r2->out.rid = talloc_zero(r2, uint32_t);
282 624 : 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 624 : r2->out.result = _samr_CreateUser(p, r2);
289 624 : break;
290 : }
291 37 : case 13: { /* samr_EnumDomainUsers */
292 37 : struct samr_EnumDomainUsers *r2 = (struct samr_EnumDomainUsers *)r;
293 37 : if (DEBUGLEVEL >= 10) {
294 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainUsers, NDR_IN, r2);
295 : }
296 37 : NDR_ZERO_STRUCT(r2->out);
297 37 : r2->out.resume_handle = r2->in.resume_handle;
298 37 : r2->out.sam = talloc_zero(r2, struct samr_SamArray *);
299 37 : 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 37 : r2->out.num_entries = talloc_zero(r2, uint32_t);
306 37 : 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 37 : r2->out.result = _samr_EnumDomainUsers(p, r2);
313 37 : break;
314 : }
315 602 : case 14: { /* samr_CreateDomAlias */
316 602 : struct samr_CreateDomAlias *r2 = (struct samr_CreateDomAlias *)r;
317 602 : if (DEBUGLEVEL >= 10) {
318 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomAlias, NDR_IN, r2);
319 : }
320 602 : NDR_ZERO_STRUCT(r2->out);
321 602 : r2->out.alias_handle = talloc_zero(r2, struct policy_handle);
322 602 : 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 602 : r2->out.rid = talloc_zero(r2, uint32_t);
329 602 : 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 602 : r2->out.result = _samr_CreateDomAlias(p, r2);
336 602 : break;
337 : }
338 40 : case 15: { /* samr_EnumDomainAliases */
339 40 : struct samr_EnumDomainAliases *r2 = (struct samr_EnumDomainAliases *)r;
340 40 : if (DEBUGLEVEL >= 10) {
341 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainAliases, NDR_IN, r2);
342 : }
343 40 : NDR_ZERO_STRUCT(r2->out);
344 40 : r2->out.resume_handle = r2->in.resume_handle;
345 40 : r2->out.sam = talloc_zero(r2, struct samr_SamArray *);
346 40 : 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 40 : r2->out.num_entries = talloc_zero(r2, uint32_t);
353 40 : 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 40 : r2->out.result = _samr_EnumDomainAliases(p, r2);
360 40 : break;
361 : }
362 3862 : case 16: { /* samr_GetAliasMembership */
363 3862 : struct samr_GetAliasMembership *r2 = (struct samr_GetAliasMembership *)r;
364 3862 : if (DEBUGLEVEL >= 10) {
365 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetAliasMembership, NDR_IN, r2);
366 : }
367 3862 : NDR_ZERO_STRUCT(r2->out);
368 3862 : r2->out.rids = talloc_zero(r2, struct samr_Ids);
369 3862 : 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 3862 : r2->out.result = _samr_GetAliasMembership(p, r2);
376 3862 : break;
377 : }
378 1046 : case 17: { /* samr_LookupNames */
379 1046 : struct samr_LookupNames *r2 = (struct samr_LookupNames *)r;
380 1046 : if (DEBUGLEVEL >= 10) {
381 0 : NDR_PRINT_FUNCTION_DEBUG(samr_LookupNames, NDR_IN, r2);
382 : }
383 1046 : NDR_ZERO_STRUCT(r2->out);
384 1046 : r2->out.rids = talloc_zero(r2, struct samr_Ids);
385 1046 : 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 1046 : r2->out.types = talloc_zero(r2, struct samr_Ids);
392 1046 : 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 1046 : r2->out.result = _samr_LookupNames(p, r2);
399 1046 : break;
400 : }
401 1265 : case 18: { /* samr_LookupRids */
402 1265 : struct samr_LookupRids *r2 = (struct samr_LookupRids *)r;
403 1265 : if (DEBUGLEVEL >= 10) {
404 0 : NDR_PRINT_FUNCTION_DEBUG(samr_LookupRids, NDR_IN, r2);
405 : }
406 1265 : NDR_ZERO_STRUCT(r2->out);
407 1265 : r2->out.names = talloc_zero(r2, struct lsa_Strings);
408 1265 : 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 1265 : r2->out.types = talloc_zero(r2, struct samr_Ids);
415 1265 : 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 1265 : r2->out.result = _samr_LookupRids(p, r2);
422 1265 : break;
423 : }
424 311 : case 19: { /* samr_OpenGroup */
425 311 : struct samr_OpenGroup *r2 = (struct samr_OpenGroup *)r;
426 311 : if (DEBUGLEVEL >= 10) {
427 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenGroup, NDR_IN, r2);
428 : }
429 311 : NDR_ZERO_STRUCT(r2->out);
430 311 : r2->out.group_handle = talloc_zero(r2, struct policy_handle);
431 311 : 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 311 : r2->out.result = _samr_OpenGroup(p, r2);
438 311 : break;
439 : }
440 19 : case 20: { /* samr_QueryGroupInfo */
441 19 : struct samr_QueryGroupInfo *r2 = (struct samr_QueryGroupInfo *)r;
442 19 : if (DEBUGLEVEL >= 10) {
443 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupInfo, NDR_IN, r2);
444 : }
445 19 : NDR_ZERO_STRUCT(r2->out);
446 19 : r2->out.info = talloc_zero(r2, union samr_GroupInfo *);
447 19 : 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 19 : r2->out.result = _samr_QueryGroupInfo(p, r2);
454 19 : break;
455 : }
456 4 : case 21: { /* samr_SetGroupInfo */
457 4 : struct samr_SetGroupInfo *r2 = (struct samr_SetGroupInfo *)r;
458 4 : if (DEBUGLEVEL >= 10) {
459 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetGroupInfo, NDR_IN, r2);
460 : }
461 4 : r2->out.result = _samr_SetGroupInfo(p, r2);
462 4 : break;
463 : }
464 3 : case 22: { /* samr_AddGroupMember */
465 3 : struct samr_AddGroupMember *r2 = (struct samr_AddGroupMember *)r;
466 3 : if (DEBUGLEVEL >= 10) {
467 0 : NDR_PRINT_FUNCTION_DEBUG(samr_AddGroupMember, NDR_IN, r2);
468 : }
469 3 : r2->out.result = _samr_AddGroupMember(p, r2);
470 3 : break;
471 : }
472 1 : case 23: { /* samr_DeleteDomainGroup */
473 1 : struct samr_DeleteDomainGroup *r2 = (struct samr_DeleteDomainGroup *)r;
474 1 : if (DEBUGLEVEL >= 10) {
475 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomainGroup, NDR_IN, r2);
476 : }
477 1 : NDR_ZERO_STRUCT(r2->out);
478 1 : r2->out.group_handle = r2->in.group_handle;
479 1 : r2->out.result = _samr_DeleteDomainGroup(p, r2);
480 1 : break;
481 : }
482 2 : case 24: { /* samr_DeleteGroupMember */
483 2 : struct samr_DeleteGroupMember *r2 = (struct samr_DeleteGroupMember *)r;
484 2 : if (DEBUGLEVEL >= 10) {
485 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteGroupMember, NDR_IN, r2);
486 : }
487 2 : r2->out.result = _samr_DeleteGroupMember(p, r2);
488 2 : break;
489 : }
490 311 : case 25: { /* samr_QueryGroupMember */
491 311 : struct samr_QueryGroupMember *r2 = (struct samr_QueryGroupMember *)r;
492 311 : if (DEBUGLEVEL >= 10) {
493 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupMember, NDR_IN, r2);
494 : }
495 311 : NDR_ZERO_STRUCT(r2->out);
496 311 : r2->out.rids = talloc_zero(r2, struct samr_RidAttrArray *);
497 311 : 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 311 : r2->out.result = _samr_QueryGroupMember(p, r2);
504 311 : 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 618 : case 27: { /* samr_OpenAlias */
515 618 : struct samr_OpenAlias *r2 = (struct samr_OpenAlias *)r;
516 618 : if (DEBUGLEVEL >= 10) {
517 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenAlias, NDR_IN, r2);
518 : }
519 618 : NDR_ZERO_STRUCT(r2->out);
520 618 : r2->out.alias_handle = talloc_zero(r2, struct policy_handle);
521 618 : 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 618 : r2->out.result = _samr_OpenAlias(p, r2);
528 618 : break;
529 : }
530 17 : case 28: { /* samr_QueryAliasInfo */
531 17 : struct samr_QueryAliasInfo *r2 = (struct samr_QueryAliasInfo *)r;
532 17 : if (DEBUGLEVEL >= 10) {
533 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryAliasInfo, NDR_IN, r2);
534 : }
535 17 : NDR_ZERO_STRUCT(r2->out);
536 17 : r2->out.info = talloc_zero(r2, union samr_AliasInfo *);
537 17 : 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 17 : r2->out.result = _samr_QueryAliasInfo(p, r2);
544 17 : break;
545 : }
546 2 : case 29: { /* samr_SetAliasInfo */
547 2 : struct samr_SetAliasInfo *r2 = (struct samr_SetAliasInfo *)r;
548 2 : if (DEBUGLEVEL >= 10) {
549 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetAliasInfo, NDR_IN, r2);
550 : }
551 2 : r2->out.result = _samr_SetAliasInfo(p, r2);
552 2 : break;
553 : }
554 1 : case 30: { /* samr_DeleteDomAlias */
555 1 : struct samr_DeleteDomAlias *r2 = (struct samr_DeleteDomAlias *)r;
556 1 : if (DEBUGLEVEL >= 10) {
557 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomAlias, NDR_IN, r2);
558 : }
559 1 : NDR_ZERO_STRUCT(r2->out);
560 1 : r2->out.alias_handle = r2->in.alias_handle;
561 1 : r2->out.result = _samr_DeleteDomAlias(p, r2);
562 1 : break;
563 : }
564 1 : case 31: { /* samr_AddAliasMember */
565 1 : struct samr_AddAliasMember *r2 = (struct samr_AddAliasMember *)r;
566 1 : if (DEBUGLEVEL >= 10) {
567 0 : NDR_PRINT_FUNCTION_DEBUG(samr_AddAliasMember, NDR_IN, r2);
568 : }
569 1 : r2->out.result = _samr_AddAliasMember(p, r2);
570 1 : break;
571 : }
572 1 : case 32: { /* samr_DeleteAliasMember */
573 1 : struct samr_DeleteAliasMember *r2 = (struct samr_DeleteAliasMember *)r;
574 1 : if (DEBUGLEVEL >= 10) {
575 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteAliasMember, NDR_IN, r2);
576 : }
577 1 : r2->out.result = _samr_DeleteAliasMember(p, r2);
578 1 : break;
579 : }
580 618 : case 33: { /* samr_GetMembersInAlias */
581 618 : struct samr_GetMembersInAlias *r2 = (struct samr_GetMembersInAlias *)r;
582 618 : if (DEBUGLEVEL >= 10) {
583 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetMembersInAlias, NDR_IN, r2);
584 : }
585 618 : NDR_ZERO_STRUCT(r2->out);
586 618 : r2->out.sids = talloc_zero(r2, struct lsa_SidArray);
587 618 : 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 618 : r2->out.result = _samr_GetMembersInAlias(p, r2);
594 618 : break;
595 : }
596 2556 : case 34: { /* samr_OpenUser */
597 2556 : struct samr_OpenUser *r2 = (struct samr_OpenUser *)r;
598 2556 : if (DEBUGLEVEL >= 10) {
599 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenUser, NDR_IN, r2);
600 : }
601 2556 : NDR_ZERO_STRUCT(r2->out);
602 2556 : r2->out.user_handle = talloc_zero(r2, struct policy_handle);
603 2556 : 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 2556 : r2->out.result = _samr_OpenUser(p, r2);
610 2556 : break;
611 : }
612 74 : case 35: { /* samr_DeleteUser */
613 74 : struct samr_DeleteUser *r2 = (struct samr_DeleteUser *)r;
614 74 : if (DEBUGLEVEL >= 10) {
615 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteUser, NDR_IN, r2);
616 : }
617 74 : NDR_ZERO_STRUCT(r2->out);
618 74 : r2->out.user_handle = r2->in.user_handle;
619 74 : r2->out.result = _samr_DeleteUser(p, r2);
620 74 : break;
621 : }
622 1533 : case 36: { /* samr_QueryUserInfo */
623 1533 : struct samr_QueryUserInfo *r2 = (struct samr_QueryUserInfo *)r;
624 1533 : if (DEBUGLEVEL >= 10) {
625 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo, NDR_IN, r2);
626 : }
627 1533 : NDR_ZERO_STRUCT(r2->out);
628 1533 : r2->out.info = talloc_zero(r2, union samr_UserInfo *);
629 1533 : 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 1533 : r2->out.result = _samr_QueryUserInfo(p, r2);
636 1533 : break;
637 : }
638 447 : case 37: { /* samr_SetUserInfo */
639 447 : struct samr_SetUserInfo *r2 = (struct samr_SetUserInfo *)r;
640 447 : if (DEBUGLEVEL >= 10) {
641 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo, NDR_IN, r2);
642 : }
643 447 : r2->out.result = _samr_SetUserInfo(p, r2);
644 447 : break;
645 : }
646 2 : case 38: { /* samr_ChangePasswordUser */
647 2 : struct samr_ChangePasswordUser *r2 = (struct samr_ChangePasswordUser *)r;
648 2 : if (DEBUGLEVEL >= 10) {
649 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser, NDR_IN, r2);
650 : }
651 2 : r2->out.result = _samr_ChangePasswordUser(p, r2);
652 2 : break;
653 : }
654 2289 : case 39: { /* samr_GetGroupsForUser */
655 2289 : struct samr_GetGroupsForUser *r2 = (struct samr_GetGroupsForUser *)r;
656 2289 : if (DEBUGLEVEL >= 10) {
657 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetGroupsForUser, NDR_IN, r2);
658 : }
659 2289 : NDR_ZERO_STRUCT(r2->out);
660 2289 : r2->out.rids = talloc_zero(r2, struct samr_RidWithAttributeArray *);
661 2289 : 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 2289 : r2->out.result = _samr_GetGroupsForUser(p, r2);
668 2289 : break;
669 : }
670 47 : case 40: { /* samr_QueryDisplayInfo */
671 47 : struct samr_QueryDisplayInfo *r2 = (struct samr_QueryDisplayInfo *)r;
672 47 : if (DEBUGLEVEL >= 10) {
673 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo, NDR_IN, r2);
674 : }
675 47 : NDR_ZERO_STRUCT(r2->out);
676 47 : r2->out.total_size = talloc_zero(r2, uint32_t);
677 47 : 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 47 : r2->out.returned_size = talloc_zero(r2, uint32_t);
684 47 : 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 47 : r2->out.info = talloc_zero(r2, union samr_DispInfo);
691 47 : 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 47 : r2->out.result = _samr_QueryDisplayInfo(p, r2);
698 47 : break;
699 : }
700 20 : case 41: { /* samr_GetDisplayEnumerationIndex */
701 20 : struct samr_GetDisplayEnumerationIndex *r2 = (struct samr_GetDisplayEnumerationIndex *)r;
702 20 : if (DEBUGLEVEL >= 10) {
703 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex, NDR_IN, r2);
704 : }
705 20 : NDR_ZERO_STRUCT(r2->out);
706 20 : r2->out.idx = talloc_zero(r2, uint32_t);
707 20 : 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 20 : r2->out.result = _samr_GetDisplayEnumerationIndex(p, r2);
714 20 : break;
715 : }
716 2 : case 42: { /* samr_TestPrivateFunctionsDomain */
717 2 : struct samr_TestPrivateFunctionsDomain *r2 = (struct samr_TestPrivateFunctionsDomain *)r;
718 2 : if (DEBUGLEVEL >= 10) {
719 0 : NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsDomain, NDR_IN, r2);
720 : }
721 2 : r2->out.result = _samr_TestPrivateFunctionsDomain(p, r2);
722 2 : break;
723 : }
724 1 : case 43: { /* samr_TestPrivateFunctionsUser */
725 1 : struct samr_TestPrivateFunctionsUser *r2 = (struct samr_TestPrivateFunctionsUser *)r;
726 1 : if (DEBUGLEVEL >= 10) {
727 0 : NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsUser, NDR_IN, r2);
728 : }
729 1 : r2->out.result = _samr_TestPrivateFunctionsUser(p, r2);
730 1 : break;
731 : }
732 322 : case 44: { /* samr_GetUserPwInfo */
733 322 : struct samr_GetUserPwInfo *r2 = (struct samr_GetUserPwInfo *)r;
734 322 : if (DEBUGLEVEL >= 10) {
735 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetUserPwInfo, NDR_IN, r2);
736 : }
737 322 : NDR_ZERO_STRUCT(r2->out);
738 322 : r2->out.info = talloc_zero(r2, struct samr_PwInfo);
739 322 : 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 322 : r2->out.result = _samr_GetUserPwInfo(p, r2);
746 322 : break;
747 : }
748 3 : case 45: { /* samr_RemoveMemberFromForeignDomain */
749 3 : struct samr_RemoveMemberFromForeignDomain *r2 = (struct samr_RemoveMemberFromForeignDomain *)r;
750 3 : if (DEBUGLEVEL >= 10) {
751 0 : NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMemberFromForeignDomain, NDR_IN, r2);
752 : }
753 3 : r2->out.result = _samr_RemoveMemberFromForeignDomain(p, r2);
754 3 : break;
755 : }
756 44 : case 46: { /* samr_QueryDomainInfo2 */
757 44 : struct samr_QueryDomainInfo2 *r2 = (struct samr_QueryDomainInfo2 *)r;
758 44 : if (DEBUGLEVEL >= 10) {
759 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo2, NDR_IN, r2);
760 : }
761 44 : NDR_ZERO_STRUCT(r2->out);
762 44 : r2->out.info = talloc_zero(r2, union samr_DomainInfo *);
763 44 : 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 44 : r2->out.result = _samr_QueryDomainInfo2(p, r2);
770 44 : break;
771 : }
772 335 : case 47: { /* samr_QueryUserInfo2 */
773 335 : struct samr_QueryUserInfo2 *r2 = (struct samr_QueryUserInfo2 *)r;
774 335 : if (DEBUGLEVEL >= 10) {
775 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo2, NDR_IN, r2);
776 : }
777 335 : NDR_ZERO_STRUCT(r2->out);
778 335 : r2->out.info = talloc_zero(r2, union samr_UserInfo *);
779 335 : 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 335 : r2->out.result = _samr_QueryUserInfo2(p, r2);
786 335 : break;
787 : }
788 10 : case 48: { /* samr_QueryDisplayInfo2 */
789 10 : struct samr_QueryDisplayInfo2 *r2 = (struct samr_QueryDisplayInfo2 *)r;
790 10 : if (DEBUGLEVEL >= 10) {
791 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo2, NDR_IN, r2);
792 : }
793 10 : NDR_ZERO_STRUCT(r2->out);
794 10 : r2->out.total_size = talloc_zero(r2, uint32_t);
795 10 : 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 10 : r2->out.returned_size = talloc_zero(r2, uint32_t);
802 10 : 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 10 : r2->out.info = talloc_zero(r2, union samr_DispInfo);
809 10 : 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 10 : r2->out.result = _samr_QueryDisplayInfo2(p, r2);
816 10 : break;
817 : }
818 20 : case 49: { /* samr_GetDisplayEnumerationIndex2 */
819 20 : struct samr_GetDisplayEnumerationIndex2 *r2 = (struct samr_GetDisplayEnumerationIndex2 *)r;
820 20 : if (DEBUGLEVEL >= 10) {
821 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex2, NDR_IN, r2);
822 : }
823 20 : NDR_ZERO_STRUCT(r2->out);
824 20 : r2->out.idx = talloc_zero(r2, uint32_t);
825 20 : 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 20 : r2->out.result = _samr_GetDisplayEnumerationIndex2(p, r2);
832 20 : break;
833 : }
834 78 : case 50: { /* samr_CreateUser2 */
835 78 : struct samr_CreateUser2 *r2 = (struct samr_CreateUser2 *)r;
836 78 : if (DEBUGLEVEL >= 10) {
837 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser2, NDR_IN, r2);
838 : }
839 78 : NDR_ZERO_STRUCT(r2->out);
840 78 : r2->out.user_handle = talloc_zero(r2, struct policy_handle);
841 78 : 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 78 : r2->out.access_granted = talloc_zero(r2, uint32_t);
848 78 : 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 78 : r2->out.rid = talloc_zero(r2, uint32_t);
855 78 : 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 78 : r2->out.result = _samr_CreateUser2(p, r2);
862 78 : break;
863 : }
864 10 : case 51: { /* samr_QueryDisplayInfo3 */
865 10 : struct samr_QueryDisplayInfo3 *r2 = (struct samr_QueryDisplayInfo3 *)r;
866 10 : if (DEBUGLEVEL >= 10) {
867 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo3, NDR_IN, r2);
868 : }
869 10 : NDR_ZERO_STRUCT(r2->out);
870 10 : r2->out.total_size = talloc_zero(r2, uint32_t);
871 10 : 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 10 : r2->out.returned_size = talloc_zero(r2, uint32_t);
878 10 : 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 10 : r2->out.info = talloc_zero(r2, union samr_DispInfo);
885 10 : 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 10 : r2->out.result = _samr_QueryDisplayInfo3(p, r2);
892 10 : 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 16 : case 54: { /* samr_OemChangePasswordUser2 */
911 16 : struct samr_OemChangePasswordUser2 *r2 = (struct samr_OemChangePasswordUser2 *)r;
912 16 : if (DEBUGLEVEL >= 10) {
913 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OemChangePasswordUser2, NDR_IN, r2);
914 : }
915 16 : r2->out.result = _samr_OemChangePasswordUser2(p, r2);
916 16 : break;
917 : }
918 11 : case 55: { /* samr_ChangePasswordUser2 */
919 11 : struct samr_ChangePasswordUser2 *r2 = (struct samr_ChangePasswordUser2 *)r;
920 11 : if (DEBUGLEVEL >= 10) {
921 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser2, NDR_IN, r2);
922 : }
923 11 : r2->out.result = _samr_ChangePasswordUser2(p, r2);
924 11 : break;
925 : }
926 344 : case 56: { /* samr_GetDomPwInfo */
927 344 : struct samr_GetDomPwInfo *r2 = (struct samr_GetDomPwInfo *)r;
928 344 : if (DEBUGLEVEL >= 10) {
929 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetDomPwInfo, NDR_IN, r2);
930 : }
931 344 : NDR_ZERO_STRUCT(r2->out);
932 344 : r2->out.info = talloc_zero(r2, struct samr_PwInfo);
933 344 : 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 344 : r2->out.result = _samr_GetDomPwInfo(p, r2);
940 344 : break;
941 : }
942 365 : case 57: { /* samr_Connect2 */
943 365 : struct samr_Connect2 *r2 = (struct samr_Connect2 *)r;
944 365 : if (DEBUGLEVEL >= 10) {
945 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect2, NDR_IN, r2);
946 : }
947 365 : NDR_ZERO_STRUCT(r2->out);
948 365 : r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
949 365 : 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 365 : r2->out.result = _samr_Connect2(p, r2);
956 365 : break;
957 : }
958 156 : case 58: { /* samr_SetUserInfo2 */
959 156 : struct samr_SetUserInfo2 *r2 = (struct samr_SetUserInfo2 *)r;
960 156 : if (DEBUGLEVEL >= 10) {
961 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo2, NDR_IN, r2);
962 : }
963 156 : r2->out.result = _samr_SetUserInfo2(p, r2);
964 156 : 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 2 : case 60: { /* samr_GetBootKeyInformation */
975 2 : struct samr_GetBootKeyInformation *r2 = (struct samr_GetBootKeyInformation *)r;
976 2 : if (DEBUGLEVEL >= 10) {
977 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetBootKeyInformation, NDR_IN, r2);
978 : }
979 2 : NDR_ZERO_STRUCT(r2->out);
980 2 : r2->out.unknown = talloc_zero(r2, uint32_t);
981 2 : 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 2 : r2->out.result = _samr_GetBootKeyInformation(p, r2);
988 2 : break;
989 : }
990 51 : case 61: { /* samr_Connect3 */
991 51 : struct samr_Connect3 *r2 = (struct samr_Connect3 *)r;
992 51 : if (DEBUGLEVEL >= 10) {
993 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect3, NDR_IN, r2);
994 : }
995 51 : NDR_ZERO_STRUCT(r2->out);
996 51 : r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
997 51 : 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 51 : r2->out.result = _samr_Connect3(p, r2);
1004 51 : break;
1005 : }
1006 51 : case 62: { /* samr_Connect4 */
1007 51 : struct samr_Connect4 *r2 = (struct samr_Connect4 *)r;
1008 51 : if (DEBUGLEVEL >= 10) {
1009 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect4, NDR_IN, r2);
1010 : }
1011 51 : NDR_ZERO_STRUCT(r2->out);
1012 51 : r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
1013 51 : 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 51 : r2->out.result = _samr_Connect4(p, r2);
1020 51 : break;
1021 : }
1022 104 : case 63: { /* samr_ChangePasswordUser3 */
1023 104 : struct samr_ChangePasswordUser3 *r2 = (struct samr_ChangePasswordUser3 *)r;
1024 104 : if (DEBUGLEVEL >= 10) {
1025 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser3, NDR_IN, r2);
1026 : }
1027 104 : NDR_ZERO_STRUCT(r2->out);
1028 104 : r2->out.dominfo = talloc_zero(r2, struct samr_DomInfo1 *);
1029 104 : 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 104 : r2->out.reject = talloc_zero(r2, struct userPwdChangeFailureInformation *);
1036 104 : 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 104 : r2->out.result = _samr_ChangePasswordUser3(p, r2);
1043 104 : break;
1044 : }
1045 57 : case 64: { /* samr_Connect5 */
1046 57 : struct samr_Connect5 *r2 = (struct samr_Connect5 *)r;
1047 57 : if (DEBUGLEVEL >= 10) {
1048 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect5, NDR_IN, r2);
1049 : }
1050 57 : NDR_ZERO_STRUCT(r2->out);
1051 57 : r2->out.level_out = talloc_zero(r2, uint32_t);
1052 57 : 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 57 : r2->out.info_out = talloc_zero(r2, union samr_ConnectInfo);
1059 57 : 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 57 : r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
1066 57 : 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 57 : r2->out.result = _samr_Connect5(p, r2);
1073 57 : break;
1074 : }
1075 8 : case 65: { /* samr_RidToSid */
1076 8 : struct samr_RidToSid *r2 = (struct samr_RidToSid *)r;
1077 8 : if (DEBUGLEVEL >= 10) {
1078 0 : NDR_PRINT_FUNCTION_DEBUG(samr_RidToSid, NDR_IN, r2);
1079 : }
1080 8 : NDR_ZERO_STRUCT(r2->out);
1081 8 : r2->out.sid = talloc_zero(r2, struct dom_sid2 *);
1082 8 : 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 8 : r2->out.result = _samr_RidToSid(p, r2);
1089 8 : 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 3 : case 67: { /* samr_ValidatePassword */
1100 3 : struct samr_ValidatePassword *r2 = (struct samr_ValidatePassword *)r;
1101 3 : if (DEBUGLEVEL >= 10) {
1102 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ValidatePassword, NDR_IN, r2);
1103 : }
1104 3 : NDR_ZERO_STRUCT(r2->out);
1105 3 : r2->out.rep = talloc_zero(r2, union samr_ValidatePasswordRep *);
1106 3 : 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 3 : r2->out.result = _samr_ValidatePassword(p, r2);
1113 3 : 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 8 : case 73: { /* samr_ChangePasswordUser4 */
1156 8 : struct samr_ChangePasswordUser4 *r2 = (struct samr_ChangePasswordUser4 *)r;
1157 8 : if (DEBUGLEVEL >= 10) {
1158 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser4, NDR_IN, r2);
1159 : }
1160 8 : r2->out.result = _samr_ChangePasswordUser4(p, r2);
1161 8 : break;
1162 : }
1163 0 : default:
1164 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
1165 0 : break;
1166 : }
1167 :
1168 25515 : fail:
1169 : /* Unimpersonate */
1170 25515 : if (impersonated) {
1171 25515 : unbecome_authenticated_pipe_user();
1172 : }
1173 :
1174 25515 : p->dce_call = NULL;
1175 25515 : p->mem_ctx = NULL;
1176 : /* Check pipes struct fault state */
1177 25515 : if (p->fault_state != 0) {
1178 9 : dce_call->fault_code = p->fault_state;
1179 : }
1180 25515 : if (dce_call->fault_code != 0) {
1181 9 : status = NT_STATUS_NET_WRITE_FAULT;
1182 : }
1183 :
1184 25515 : return status;
1185 : }
1186 :
1187 25515 : NTSTATUS samr__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
1188 : {
1189 25515 : return samr__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_EXTERNAL);
1190 : }
1191 :
1192 25506 : NTSTATUS samr__op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
1193 : {
1194 25506 : uint16_t opnum = dce_call->pkt.u.request.opnum;
1195 :
1196 25506 : switch (opnum) {
1197 229 : case 0: { /* samr_Connect */
1198 229 : struct samr_Connect *r2 = (struct samr_Connect *)r;
1199 229 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1200 0 : DEBUG(5,("function samr_Connect replied async\n"));
1201 : }
1202 229 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1203 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect, NDR_OUT | NDR_SET_VALUES, r2);
1204 : }
1205 229 : 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 229 : break;
1209 : }
1210 5211 : case 1: { /* samr_Close */
1211 5211 : struct samr_Close *r2 = (struct samr_Close *)r;
1212 5211 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1213 0 : DEBUG(5,("function samr_Close replied async\n"));
1214 : }
1215 5211 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1216 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Close, NDR_OUT | NDR_SET_VALUES, r2);
1217 : }
1218 5211 : 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 5211 : break;
1222 : }
1223 2 : case 2: { /* samr_SetSecurity */
1224 2 : struct samr_SetSecurity *r2 = (struct samr_SetSecurity *)r;
1225 2 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1226 0 : DEBUG(5,("function samr_SetSecurity replied async\n"));
1227 : }
1228 2 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1229 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetSecurity, NDR_OUT | NDR_SET_VALUES, r2);
1230 : }
1231 2 : 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 2 : break;
1235 : }
1236 4 : case 3: { /* samr_QuerySecurity */
1237 4 : struct samr_QuerySecurity *r2 = (struct samr_QuerySecurity *)r;
1238 4 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1239 0 : DEBUG(5,("function samr_QuerySecurity replied async\n"));
1240 : }
1241 4 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1242 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QuerySecurity, NDR_OUT | NDR_SET_VALUES, r2);
1243 : }
1244 4 : 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 4 : 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 370 : case 5: { /* samr_LookupDomain */
1263 370 : struct samr_LookupDomain *r2 = (struct samr_LookupDomain *)r;
1264 370 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1265 0 : DEBUG(5,("function samr_LookupDomain replied async\n"));
1266 : }
1267 370 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1268 0 : NDR_PRINT_FUNCTION_DEBUG(samr_LookupDomain, NDR_OUT | NDR_SET_VALUES, r2);
1269 : }
1270 370 : 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 370 : break;
1274 : }
1275 60 : case 6: { /* samr_EnumDomains */
1276 60 : struct samr_EnumDomains *r2 = (struct samr_EnumDomains *)r;
1277 60 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1278 0 : DEBUG(5,("function samr_EnumDomains replied async\n"));
1279 : }
1280 60 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1281 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomains, NDR_OUT | NDR_SET_VALUES, r2);
1282 : }
1283 60 : 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 60 : break;
1287 : }
1288 536 : case 7: { /* samr_OpenDomain */
1289 536 : struct samr_OpenDomain *r2 = (struct samr_OpenDomain *)r;
1290 536 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1291 0 : DEBUG(5,("function samr_OpenDomain replied async\n"));
1292 : }
1293 536 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1294 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenDomain, NDR_OUT | NDR_SET_VALUES, r2);
1295 : }
1296 536 : 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 536 : break;
1300 : }
1301 68 : case 8: { /* samr_QueryDomainInfo */
1302 68 : struct samr_QueryDomainInfo *r2 = (struct samr_QueryDomainInfo *)r;
1303 68 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1304 0 : DEBUG(5,("function samr_QueryDomainInfo replied async\n"));
1305 : }
1306 68 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1307 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo, NDR_OUT | NDR_SET_VALUES, r2);
1308 : }
1309 68 : 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 68 : break;
1313 : }
1314 62 : case 9: { /* samr_SetDomainInfo */
1315 62 : struct samr_SetDomainInfo *r2 = (struct samr_SetDomainInfo *)r;
1316 62 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1317 0 : DEBUG(5,("function samr_SetDomainInfo replied async\n"));
1318 : }
1319 62 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1320 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetDomainInfo, NDR_OUT | NDR_SET_VALUES, r2);
1321 : }
1322 62 : 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 62 : break;
1326 : }
1327 602 : case 10: { /* samr_CreateDomainGroup */
1328 602 : struct samr_CreateDomainGroup *r2 = (struct samr_CreateDomainGroup *)r;
1329 602 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1330 0 : DEBUG(5,("function samr_CreateDomainGroup replied async\n"));
1331 : }
1332 602 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1333 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomainGroup, NDR_OUT | NDR_SET_VALUES, r2);
1334 : }
1335 602 : 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 602 : break;
1339 : }
1340 15 : case 11: { /* samr_EnumDomainGroups */
1341 15 : struct samr_EnumDomainGroups *r2 = (struct samr_EnumDomainGroups *)r;
1342 15 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1343 0 : DEBUG(5,("function samr_EnumDomainGroups replied async\n"));
1344 : }
1345 15 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1346 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainGroups, NDR_OUT | NDR_SET_VALUES, r2);
1347 : }
1348 15 : 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 15 : break;
1352 : }
1353 624 : case 12: { /* samr_CreateUser */
1354 624 : struct samr_CreateUser *r2 = (struct samr_CreateUser *)r;
1355 624 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1356 0 : DEBUG(5,("function samr_CreateUser replied async\n"));
1357 : }
1358 624 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1359 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser, NDR_OUT | NDR_SET_VALUES, r2);
1360 : }
1361 624 : 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 624 : break;
1365 : }
1366 37 : case 13: { /* samr_EnumDomainUsers */
1367 37 : struct samr_EnumDomainUsers *r2 = (struct samr_EnumDomainUsers *)r;
1368 37 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1369 0 : DEBUG(5,("function samr_EnumDomainUsers replied async\n"));
1370 : }
1371 37 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1372 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainUsers, NDR_OUT | NDR_SET_VALUES, r2);
1373 : }
1374 37 : 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 37 : break;
1378 : }
1379 602 : case 14: { /* samr_CreateDomAlias */
1380 602 : struct samr_CreateDomAlias *r2 = (struct samr_CreateDomAlias *)r;
1381 602 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1382 0 : DEBUG(5,("function samr_CreateDomAlias replied async\n"));
1383 : }
1384 602 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1385 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomAlias, NDR_OUT | NDR_SET_VALUES, r2);
1386 : }
1387 602 : 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 602 : break;
1391 : }
1392 40 : case 15: { /* samr_EnumDomainAliases */
1393 40 : struct samr_EnumDomainAliases *r2 = (struct samr_EnumDomainAliases *)r;
1394 40 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1395 0 : DEBUG(5,("function samr_EnumDomainAliases replied async\n"));
1396 : }
1397 40 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1398 0 : NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainAliases, NDR_OUT | NDR_SET_VALUES, r2);
1399 : }
1400 40 : 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 40 : break;
1404 : }
1405 3862 : case 16: { /* samr_GetAliasMembership */
1406 3862 : struct samr_GetAliasMembership *r2 = (struct samr_GetAliasMembership *)r;
1407 3862 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1408 0 : DEBUG(5,("function samr_GetAliasMembership replied async\n"));
1409 : }
1410 3862 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1411 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetAliasMembership, NDR_OUT | NDR_SET_VALUES, r2);
1412 : }
1413 3862 : 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 3862 : break;
1417 : }
1418 1046 : case 17: { /* samr_LookupNames */
1419 1046 : struct samr_LookupNames *r2 = (struct samr_LookupNames *)r;
1420 1046 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1421 0 : DEBUG(5,("function samr_LookupNames replied async\n"));
1422 : }
1423 1046 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1424 0 : NDR_PRINT_FUNCTION_DEBUG(samr_LookupNames, NDR_OUT | NDR_SET_VALUES, r2);
1425 : }
1426 1046 : 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 1046 : break;
1430 : }
1431 1265 : case 18: { /* samr_LookupRids */
1432 1265 : struct samr_LookupRids *r2 = (struct samr_LookupRids *)r;
1433 1265 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1434 0 : DEBUG(5,("function samr_LookupRids replied async\n"));
1435 : }
1436 1265 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1437 0 : NDR_PRINT_FUNCTION_DEBUG(samr_LookupRids, NDR_OUT | NDR_SET_VALUES, r2);
1438 : }
1439 1265 : 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 1265 : break;
1443 : }
1444 310 : case 19: { /* samr_OpenGroup */
1445 310 : struct samr_OpenGroup *r2 = (struct samr_OpenGroup *)r;
1446 310 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1447 0 : DEBUG(5,("function samr_OpenGroup replied async\n"));
1448 : }
1449 310 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1450 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenGroup, NDR_OUT | NDR_SET_VALUES, r2);
1451 : }
1452 310 : 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 310 : break;
1456 : }
1457 19 : case 20: { /* samr_QueryGroupInfo */
1458 19 : struct samr_QueryGroupInfo *r2 = (struct samr_QueryGroupInfo *)r;
1459 19 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1460 0 : DEBUG(5,("function samr_QueryGroupInfo replied async\n"));
1461 : }
1462 19 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1463 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupInfo, NDR_OUT | NDR_SET_VALUES, r2);
1464 : }
1465 19 : 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 19 : break;
1469 : }
1470 4 : case 21: { /* samr_SetGroupInfo */
1471 4 : struct samr_SetGroupInfo *r2 = (struct samr_SetGroupInfo *)r;
1472 4 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1473 0 : DEBUG(5,("function samr_SetGroupInfo replied async\n"));
1474 : }
1475 4 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1476 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetGroupInfo, NDR_OUT | NDR_SET_VALUES, r2);
1477 : }
1478 4 : 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 4 : break;
1482 : }
1483 3 : case 22: { /* samr_AddGroupMember */
1484 3 : struct samr_AddGroupMember *r2 = (struct samr_AddGroupMember *)r;
1485 3 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1486 0 : DEBUG(5,("function samr_AddGroupMember replied async\n"));
1487 : }
1488 3 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1489 0 : NDR_PRINT_FUNCTION_DEBUG(samr_AddGroupMember, NDR_OUT | NDR_SET_VALUES, r2);
1490 : }
1491 3 : 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 3 : break;
1495 : }
1496 1 : case 23: { /* samr_DeleteDomainGroup */
1497 1 : struct samr_DeleteDomainGroup *r2 = (struct samr_DeleteDomainGroup *)r;
1498 1 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1499 0 : DEBUG(5,("function samr_DeleteDomainGroup replied async\n"));
1500 : }
1501 1 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1502 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomainGroup, NDR_OUT | NDR_SET_VALUES, r2);
1503 : }
1504 1 : 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 1 : break;
1508 : }
1509 2 : case 24: { /* samr_DeleteGroupMember */
1510 2 : struct samr_DeleteGroupMember *r2 = (struct samr_DeleteGroupMember *)r;
1511 2 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1512 0 : DEBUG(5,("function samr_DeleteGroupMember replied async\n"));
1513 : }
1514 2 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1515 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteGroupMember, NDR_OUT | NDR_SET_VALUES, r2);
1516 : }
1517 2 : 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 2 : break;
1521 : }
1522 311 : case 25: { /* samr_QueryGroupMember */
1523 311 : struct samr_QueryGroupMember *r2 = (struct samr_QueryGroupMember *)r;
1524 311 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1525 0 : DEBUG(5,("function samr_QueryGroupMember replied async\n"));
1526 : }
1527 311 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1528 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupMember, NDR_OUT | NDR_SET_VALUES, r2);
1529 : }
1530 311 : 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 311 : 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 618 : case 27: { /* samr_OpenAlias */
1549 618 : struct samr_OpenAlias *r2 = (struct samr_OpenAlias *)r;
1550 618 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1551 0 : DEBUG(5,("function samr_OpenAlias replied async\n"));
1552 : }
1553 618 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1554 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenAlias, NDR_OUT | NDR_SET_VALUES, r2);
1555 : }
1556 618 : 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 618 : break;
1560 : }
1561 17 : case 28: { /* samr_QueryAliasInfo */
1562 17 : struct samr_QueryAliasInfo *r2 = (struct samr_QueryAliasInfo *)r;
1563 17 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1564 0 : DEBUG(5,("function samr_QueryAliasInfo replied async\n"));
1565 : }
1566 17 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1567 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryAliasInfo, NDR_OUT | NDR_SET_VALUES, r2);
1568 : }
1569 17 : 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 17 : break;
1573 : }
1574 2 : case 29: { /* samr_SetAliasInfo */
1575 2 : struct samr_SetAliasInfo *r2 = (struct samr_SetAliasInfo *)r;
1576 2 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1577 0 : DEBUG(5,("function samr_SetAliasInfo replied async\n"));
1578 : }
1579 2 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1580 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetAliasInfo, NDR_OUT | NDR_SET_VALUES, r2);
1581 : }
1582 2 : 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 2 : break;
1586 : }
1587 1 : case 30: { /* samr_DeleteDomAlias */
1588 1 : struct samr_DeleteDomAlias *r2 = (struct samr_DeleteDomAlias *)r;
1589 1 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1590 0 : DEBUG(5,("function samr_DeleteDomAlias replied async\n"));
1591 : }
1592 1 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1593 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomAlias, NDR_OUT | NDR_SET_VALUES, r2);
1594 : }
1595 1 : 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 1 : break;
1599 : }
1600 1 : case 31: { /* samr_AddAliasMember */
1601 1 : struct samr_AddAliasMember *r2 = (struct samr_AddAliasMember *)r;
1602 1 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1603 0 : DEBUG(5,("function samr_AddAliasMember replied async\n"));
1604 : }
1605 1 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1606 0 : NDR_PRINT_FUNCTION_DEBUG(samr_AddAliasMember, NDR_OUT | NDR_SET_VALUES, r2);
1607 : }
1608 1 : 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 1 : break;
1612 : }
1613 1 : case 32: { /* samr_DeleteAliasMember */
1614 1 : struct samr_DeleteAliasMember *r2 = (struct samr_DeleteAliasMember *)r;
1615 1 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1616 0 : DEBUG(5,("function samr_DeleteAliasMember replied async\n"));
1617 : }
1618 1 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1619 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteAliasMember, NDR_OUT | NDR_SET_VALUES, r2);
1620 : }
1621 1 : 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 1 : break;
1625 : }
1626 618 : case 33: { /* samr_GetMembersInAlias */
1627 618 : struct samr_GetMembersInAlias *r2 = (struct samr_GetMembersInAlias *)r;
1628 618 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1629 0 : DEBUG(5,("function samr_GetMembersInAlias replied async\n"));
1630 : }
1631 618 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1632 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetMembersInAlias, NDR_OUT | NDR_SET_VALUES, r2);
1633 : }
1634 618 : 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 618 : break;
1638 : }
1639 2555 : case 34: { /* samr_OpenUser */
1640 2555 : struct samr_OpenUser *r2 = (struct samr_OpenUser *)r;
1641 2555 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1642 0 : DEBUG(5,("function samr_OpenUser replied async\n"));
1643 : }
1644 2555 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1645 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OpenUser, NDR_OUT | NDR_SET_VALUES, r2);
1646 : }
1647 2555 : 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 2555 : break;
1651 : }
1652 74 : case 35: { /* samr_DeleteUser */
1653 74 : struct samr_DeleteUser *r2 = (struct samr_DeleteUser *)r;
1654 74 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1655 0 : DEBUG(5,("function samr_DeleteUser replied async\n"));
1656 : }
1657 74 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1658 0 : NDR_PRINT_FUNCTION_DEBUG(samr_DeleteUser, NDR_OUT | NDR_SET_VALUES, r2);
1659 : }
1660 74 : 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 74 : break;
1664 : }
1665 1533 : case 36: { /* samr_QueryUserInfo */
1666 1533 : struct samr_QueryUserInfo *r2 = (struct samr_QueryUserInfo *)r;
1667 1533 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1668 0 : DEBUG(5,("function samr_QueryUserInfo replied async\n"));
1669 : }
1670 1533 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1671 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo, NDR_OUT | NDR_SET_VALUES, r2);
1672 : }
1673 1533 : 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 1533 : break;
1677 : }
1678 447 : case 37: { /* samr_SetUserInfo */
1679 447 : struct samr_SetUserInfo *r2 = (struct samr_SetUserInfo *)r;
1680 447 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1681 0 : DEBUG(5,("function samr_SetUserInfo replied async\n"));
1682 : }
1683 447 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1684 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo, NDR_OUT | NDR_SET_VALUES, r2);
1685 : }
1686 447 : 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 447 : break;
1690 : }
1691 2 : case 38: { /* samr_ChangePasswordUser */
1692 2 : struct samr_ChangePasswordUser *r2 = (struct samr_ChangePasswordUser *)r;
1693 2 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1694 0 : DEBUG(5,("function samr_ChangePasswordUser replied async\n"));
1695 : }
1696 2 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1697 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser, NDR_OUT | NDR_SET_VALUES, r2);
1698 : }
1699 2 : 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 2 : break;
1703 : }
1704 2289 : case 39: { /* samr_GetGroupsForUser */
1705 2289 : struct samr_GetGroupsForUser *r2 = (struct samr_GetGroupsForUser *)r;
1706 2289 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1707 0 : DEBUG(5,("function samr_GetGroupsForUser replied async\n"));
1708 : }
1709 2289 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1710 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetGroupsForUser, NDR_OUT | NDR_SET_VALUES, r2);
1711 : }
1712 2289 : 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 2289 : break;
1716 : }
1717 47 : case 40: { /* samr_QueryDisplayInfo */
1718 47 : struct samr_QueryDisplayInfo *r2 = (struct samr_QueryDisplayInfo *)r;
1719 47 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1720 0 : DEBUG(5,("function samr_QueryDisplayInfo replied async\n"));
1721 : }
1722 47 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1723 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo, NDR_OUT | NDR_SET_VALUES, r2);
1724 : }
1725 47 : 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 47 : break;
1729 : }
1730 20 : case 41: { /* samr_GetDisplayEnumerationIndex */
1731 20 : struct samr_GetDisplayEnumerationIndex *r2 = (struct samr_GetDisplayEnumerationIndex *)r;
1732 20 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1733 0 : DEBUG(5,("function samr_GetDisplayEnumerationIndex replied async\n"));
1734 : }
1735 20 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1736 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex, NDR_OUT | NDR_SET_VALUES, r2);
1737 : }
1738 20 : 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 20 : 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 322 : case 44: { /* samr_GetUserPwInfo */
1770 322 : struct samr_GetUserPwInfo *r2 = (struct samr_GetUserPwInfo *)r;
1771 322 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1772 0 : DEBUG(5,("function samr_GetUserPwInfo replied async\n"));
1773 : }
1774 322 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1775 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetUserPwInfo, NDR_OUT | NDR_SET_VALUES, r2);
1776 : }
1777 322 : 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 322 : break;
1781 : }
1782 3 : case 45: { /* samr_RemoveMemberFromForeignDomain */
1783 3 : struct samr_RemoveMemberFromForeignDomain *r2 = (struct samr_RemoveMemberFromForeignDomain *)r;
1784 3 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1785 0 : DEBUG(5,("function samr_RemoveMemberFromForeignDomain replied async\n"));
1786 : }
1787 3 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1788 0 : NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMemberFromForeignDomain, NDR_OUT | NDR_SET_VALUES, r2);
1789 : }
1790 3 : 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 3 : break;
1794 : }
1795 44 : case 46: { /* samr_QueryDomainInfo2 */
1796 44 : struct samr_QueryDomainInfo2 *r2 = (struct samr_QueryDomainInfo2 *)r;
1797 44 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1798 0 : DEBUG(5,("function samr_QueryDomainInfo2 replied async\n"));
1799 : }
1800 44 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1801 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo2, NDR_OUT | NDR_SET_VALUES, r2);
1802 : }
1803 44 : 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 44 : break;
1807 : }
1808 335 : case 47: { /* samr_QueryUserInfo2 */
1809 335 : struct samr_QueryUserInfo2 *r2 = (struct samr_QueryUserInfo2 *)r;
1810 335 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1811 0 : DEBUG(5,("function samr_QueryUserInfo2 replied async\n"));
1812 : }
1813 335 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1814 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo2, NDR_OUT | NDR_SET_VALUES, r2);
1815 : }
1816 335 : 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 335 : break;
1820 : }
1821 10 : case 48: { /* samr_QueryDisplayInfo2 */
1822 10 : struct samr_QueryDisplayInfo2 *r2 = (struct samr_QueryDisplayInfo2 *)r;
1823 10 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1824 0 : DEBUG(5,("function samr_QueryDisplayInfo2 replied async\n"));
1825 : }
1826 10 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1827 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo2, NDR_OUT | NDR_SET_VALUES, r2);
1828 : }
1829 10 : 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 10 : break;
1833 : }
1834 20 : case 49: { /* samr_GetDisplayEnumerationIndex2 */
1835 20 : struct samr_GetDisplayEnumerationIndex2 *r2 = (struct samr_GetDisplayEnumerationIndex2 *)r;
1836 20 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1837 0 : DEBUG(5,("function samr_GetDisplayEnumerationIndex2 replied async\n"));
1838 : }
1839 20 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1840 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex2, NDR_OUT | NDR_SET_VALUES, r2);
1841 : }
1842 20 : 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 20 : break;
1846 : }
1847 78 : case 50: { /* samr_CreateUser2 */
1848 78 : struct samr_CreateUser2 *r2 = (struct samr_CreateUser2 *)r;
1849 78 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1850 0 : DEBUG(5,("function samr_CreateUser2 replied async\n"));
1851 : }
1852 78 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1853 0 : NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser2, NDR_OUT | NDR_SET_VALUES, r2);
1854 : }
1855 78 : 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 78 : break;
1859 : }
1860 10 : case 51: { /* samr_QueryDisplayInfo3 */
1861 10 : struct samr_QueryDisplayInfo3 *r2 = (struct samr_QueryDisplayInfo3 *)r;
1862 10 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1863 0 : DEBUG(5,("function samr_QueryDisplayInfo3 replied async\n"));
1864 : }
1865 10 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1866 0 : NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo3, NDR_OUT | NDR_SET_VALUES, r2);
1867 : }
1868 10 : 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 10 : 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 16 : case 54: { /* samr_OemChangePasswordUser2 */
1900 16 : struct samr_OemChangePasswordUser2 *r2 = (struct samr_OemChangePasswordUser2 *)r;
1901 16 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1902 0 : DEBUG(5,("function samr_OemChangePasswordUser2 replied async\n"));
1903 : }
1904 16 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1905 0 : NDR_PRINT_FUNCTION_DEBUG(samr_OemChangePasswordUser2, NDR_OUT | NDR_SET_VALUES, r2);
1906 : }
1907 16 : 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 16 : break;
1911 : }
1912 11 : case 55: { /* samr_ChangePasswordUser2 */
1913 11 : struct samr_ChangePasswordUser2 *r2 = (struct samr_ChangePasswordUser2 *)r;
1914 11 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1915 0 : DEBUG(5,("function samr_ChangePasswordUser2 replied async\n"));
1916 : }
1917 11 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1918 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser2, NDR_OUT | NDR_SET_VALUES, r2);
1919 : }
1920 11 : 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 11 : break;
1924 : }
1925 344 : case 56: { /* samr_GetDomPwInfo */
1926 344 : struct samr_GetDomPwInfo *r2 = (struct samr_GetDomPwInfo *)r;
1927 344 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1928 0 : DEBUG(5,("function samr_GetDomPwInfo replied async\n"));
1929 : }
1930 344 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1931 0 : NDR_PRINT_FUNCTION_DEBUG(samr_GetDomPwInfo, NDR_OUT | NDR_SET_VALUES, r2);
1932 : }
1933 344 : 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 344 : break;
1937 : }
1938 365 : case 57: { /* samr_Connect2 */
1939 365 : struct samr_Connect2 *r2 = (struct samr_Connect2 *)r;
1940 365 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1941 0 : DEBUG(5,("function samr_Connect2 replied async\n"));
1942 : }
1943 365 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1944 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect2, NDR_OUT | NDR_SET_VALUES, r2);
1945 : }
1946 365 : 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 365 : break;
1950 : }
1951 156 : case 58: { /* samr_SetUserInfo2 */
1952 156 : struct samr_SetUserInfo2 *r2 = (struct samr_SetUserInfo2 *)r;
1953 156 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1954 0 : DEBUG(5,("function samr_SetUserInfo2 replied async\n"));
1955 : }
1956 156 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1957 0 : NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo2, NDR_OUT | NDR_SET_VALUES, r2);
1958 : }
1959 156 : 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 156 : 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 51 : case 61: { /* samr_Connect3 */
1991 51 : struct samr_Connect3 *r2 = (struct samr_Connect3 *)r;
1992 51 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1993 0 : DEBUG(5,("function samr_Connect3 replied async\n"));
1994 : }
1995 51 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1996 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect3, NDR_OUT | NDR_SET_VALUES, r2);
1997 : }
1998 51 : 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 51 : break;
2002 : }
2003 51 : case 62: { /* samr_Connect4 */
2004 51 : struct samr_Connect4 *r2 = (struct samr_Connect4 *)r;
2005 51 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2006 0 : DEBUG(5,("function samr_Connect4 replied async\n"));
2007 : }
2008 51 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2009 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect4, NDR_OUT | NDR_SET_VALUES, r2);
2010 : }
2011 51 : 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 51 : break;
2015 : }
2016 104 : case 63: { /* samr_ChangePasswordUser3 */
2017 104 : struct samr_ChangePasswordUser3 *r2 = (struct samr_ChangePasswordUser3 *)r;
2018 104 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2019 0 : DEBUG(5,("function samr_ChangePasswordUser3 replied async\n"));
2020 : }
2021 104 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2022 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser3, NDR_OUT | NDR_SET_VALUES, r2);
2023 : }
2024 104 : 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 104 : break;
2028 : }
2029 57 : case 64: { /* samr_Connect5 */
2030 57 : struct samr_Connect5 *r2 = (struct samr_Connect5 *)r;
2031 57 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2032 0 : DEBUG(5,("function samr_Connect5 replied async\n"));
2033 : }
2034 57 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2035 0 : NDR_PRINT_FUNCTION_DEBUG(samr_Connect5, NDR_OUT | NDR_SET_VALUES, r2);
2036 : }
2037 57 : 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 57 : break;
2041 : }
2042 8 : case 65: { /* samr_RidToSid */
2043 8 : struct samr_RidToSid *r2 = (struct samr_RidToSid *)r;
2044 8 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2045 0 : DEBUG(5,("function samr_RidToSid replied async\n"));
2046 : }
2047 8 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2048 0 : NDR_PRINT_FUNCTION_DEBUG(samr_RidToSid, NDR_OUT | NDR_SET_VALUES, r2);
2049 : }
2050 8 : 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 8 : 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 3 : case 67: { /* samr_ValidatePassword */
2069 3 : struct samr_ValidatePassword *r2 = (struct samr_ValidatePassword *)r;
2070 3 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2071 0 : DEBUG(5,("function samr_ValidatePassword replied async\n"));
2072 : }
2073 3 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2074 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ValidatePassword, NDR_OUT | NDR_SET_VALUES, r2);
2075 : }
2076 3 : 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 3 : 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 8 : case 73: { /* samr_ChangePasswordUser4 */
2147 8 : struct samr_ChangePasswordUser4 *r2 = (struct samr_ChangePasswordUser4 *)r;
2148 8 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2149 0 : DEBUG(5,("function samr_ChangePasswordUser4 replied async\n"));
2150 : }
2151 8 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2152 0 : NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser4, NDR_OUT | NDR_SET_VALUES, r2);
2153 : }
2154 8 : 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 8 : break;
2158 : }
2159 0 : default:
2160 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
2161 0 : break;
2162 : }
2163 :
2164 25506 : if (dce_call->fault_code != 0) {
2165 0 : return NT_STATUS_NET_WRITE_FAULT;
2166 : }
2167 :
2168 25506 : return NT_STATUS_OK;
2169 : }
2170 :
2171 25506 : NTSTATUS samr__op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
2172 : {
2173 0 : enum ndr_err_code ndr_err;
2174 25506 : uint16_t opnum = dce_call->pkt.u.request.opnum;
2175 :
2176 25506 : ndr_err = ndr_table_samr.calls[opnum].ndr_push(push, NDR_OUT, r);
2177 25506 : 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 25506 : 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 204 : static NTSTATUS samr__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
2208 : {
2209 0 : uint32_t i;
2210 0 : 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 204 : const char *ncacn_np_secondary_endpoint = NULL;
2216 : #endif
2217 :
2218 816 : for (i=0;i<ndr_table_samr.endpoints->count;i++) {
2219 612 : const char *name = ndr_table_samr.endpoints->names[i];
2220 :
2221 612 : ret = dcesrv_interface_register(dce_ctx, name, ncacn_np_secondary_endpoint, &dcesrv_samr_interface, NULL);
2222 612 : 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 204 : return NT_STATUS_OK;
2229 : }
2230 :
2231 204 : static NTSTATUS samr__op_shutdown_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
2232 : {
2233 204 : 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 204 : const struct dcesrv_endpoint_server *samr_get_ep_server(void)
2279 : {
2280 204 : return &samr_ep_server;
2281 : }
|