1 /* server functions auto-generated by pidl */
2 #include "librpc/gen_ndr/ndr_winreg.h"
4 /* winreg - dcerpc server boilerplate generated by pidl */
7 static NTSTATUS winreg__op_bind(struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface, uint32_t if_version)
9 #ifdef DCESRV_INTERFACE_WINREG_BIND
10 return DCESRV_INTERFACE_WINREG_BIND(dce_call,iface);
16 static void winreg__op_unbind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
18 #ifdef DCESRV_INTERFACE_WINREG_UNBIND
19 DCESRV_INTERFACE_WINREG_UNBIND(context, iface);
25 static NTSTATUS winreg__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
27 enum ndr_err_code ndr_err;
28 uint16_t opnum = dce_call->pkt.u.request.opnum;
30 dce_call->fault_code = 0;
32 if (opnum >= ndr_table_winreg.num_calls) {
33 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
34 return NT_STATUS_NET_WRITE_FAULT;
37 *r = talloc_named(mem_ctx,
38 ndr_table_winreg.calls[opnum].struct_size,
40 ndr_table_winreg.calls[opnum].name);
41 NT_STATUS_HAVE_NO_MEMORY(*r);
43 /* unravel the NDR for the packet */
44 ndr_err = ndr_table_winreg.calls[opnum].ndr_pull(pull, NDR_IN, *r);
45 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
46 dcerpc_log_packet(dce_call->conn->packet_log_dir,
47 &ndr_table_winreg, opnum, NDR_IN,
48 &dce_call->pkt.u.request.stub_and_verifier);
49 dce_call->fault_code = DCERPC_FAULT_NDR;
50 return NT_STATUS_NET_WRITE_FAULT;
56 static NTSTATUS winreg__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
58 uint16_t opnum = dce_call->pkt.u.request.opnum;
62 struct winreg_OpenHKCR *r2 = (struct winreg_OpenHKCR *)r;
63 if (DEBUGLEVEL >= 10) {
64 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKCR, NDR_IN, r2);
66 r2->out.result = dcesrv_winreg_OpenHKCR(dce_call, mem_ctx, r2);
67 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
68 DEBUG(5,("function winreg_OpenHKCR will reply async\n"));
73 struct winreg_OpenHKCU *r2 = (struct winreg_OpenHKCU *)r;
74 if (DEBUGLEVEL >= 10) {
75 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKCU, NDR_IN, r2);
77 r2->out.result = dcesrv_winreg_OpenHKCU(dce_call, mem_ctx, r2);
78 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
79 DEBUG(5,("function winreg_OpenHKCU will reply async\n"));
84 struct winreg_OpenHKLM *r2 = (struct winreg_OpenHKLM *)r;
85 if (DEBUGLEVEL >= 10) {
86 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKLM, NDR_IN, r2);
88 r2->out.result = dcesrv_winreg_OpenHKLM(dce_call, mem_ctx, r2);
89 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
90 DEBUG(5,("function winreg_OpenHKLM will reply async\n"));
95 struct winreg_OpenHKPD *r2 = (struct winreg_OpenHKPD *)r;
96 if (DEBUGLEVEL >= 10) {
97 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKPD, NDR_IN, r2);
99 r2->out.result = dcesrv_winreg_OpenHKPD(dce_call, mem_ctx, r2);
100 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
101 DEBUG(5,("function winreg_OpenHKPD will reply async\n"));
106 struct winreg_OpenHKU *r2 = (struct winreg_OpenHKU *)r;
107 if (DEBUGLEVEL >= 10) {
108 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKU, NDR_IN, r2);
110 r2->out.result = dcesrv_winreg_OpenHKU(dce_call, mem_ctx, r2);
111 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
112 DEBUG(5,("function winreg_OpenHKU will reply async\n"));
117 struct winreg_CloseKey *r2 = (struct winreg_CloseKey *)r;
118 if (DEBUGLEVEL >= 10) {
119 NDR_PRINT_FUNCTION_DEBUG(winreg_CloseKey, NDR_IN, r2);
121 r2->out.result = dcesrv_winreg_CloseKey(dce_call, mem_ctx, r2);
122 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
123 DEBUG(5,("function winreg_CloseKey will reply async\n"));
128 struct winreg_CreateKey *r2 = (struct winreg_CreateKey *)r;
129 if (DEBUGLEVEL >= 10) {
130 NDR_PRINT_FUNCTION_DEBUG(winreg_CreateKey, NDR_IN, r2);
132 r2->out.result = dcesrv_winreg_CreateKey(dce_call, mem_ctx, r2);
133 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
134 DEBUG(5,("function winreg_CreateKey will reply async\n"));
139 struct winreg_DeleteKey *r2 = (struct winreg_DeleteKey *)r;
140 if (DEBUGLEVEL >= 10) {
141 NDR_PRINT_FUNCTION_DEBUG(winreg_DeleteKey, NDR_IN, r2);
143 r2->out.result = dcesrv_winreg_DeleteKey(dce_call, mem_ctx, r2);
144 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
145 DEBUG(5,("function winreg_DeleteKey will reply async\n"));
150 struct winreg_DeleteValue *r2 = (struct winreg_DeleteValue *)r;
151 if (DEBUGLEVEL >= 10) {
152 NDR_PRINT_FUNCTION_DEBUG(winreg_DeleteValue, NDR_IN, r2);
154 r2->out.result = dcesrv_winreg_DeleteValue(dce_call, mem_ctx, r2);
155 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
156 DEBUG(5,("function winreg_DeleteValue will reply async\n"));
161 struct winreg_EnumKey *r2 = (struct winreg_EnumKey *)r;
162 if (DEBUGLEVEL >= 10) {
163 NDR_PRINT_FUNCTION_DEBUG(winreg_EnumKey, NDR_IN, r2);
165 r2->out.result = dcesrv_winreg_EnumKey(dce_call, mem_ctx, r2);
166 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
167 DEBUG(5,("function winreg_EnumKey will reply async\n"));
172 struct winreg_EnumValue *r2 = (struct winreg_EnumValue *)r;
173 if (DEBUGLEVEL >= 10) {
174 NDR_PRINT_FUNCTION_DEBUG(winreg_EnumValue, NDR_IN, r2);
176 r2->out.result = dcesrv_winreg_EnumValue(dce_call, mem_ctx, r2);
177 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
178 DEBUG(5,("function winreg_EnumValue will reply async\n"));
183 struct winreg_FlushKey *r2 = (struct winreg_FlushKey *)r;
184 if (DEBUGLEVEL >= 10) {
185 NDR_PRINT_FUNCTION_DEBUG(winreg_FlushKey, NDR_IN, r2);
187 r2->out.result = dcesrv_winreg_FlushKey(dce_call, mem_ctx, r2);
188 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
189 DEBUG(5,("function winreg_FlushKey will reply async\n"));
194 struct winreg_GetKeySecurity *r2 = (struct winreg_GetKeySecurity *)r;
195 if (DEBUGLEVEL >= 10) {
196 NDR_PRINT_FUNCTION_DEBUG(winreg_GetKeySecurity, NDR_IN, r2);
198 r2->out.result = dcesrv_winreg_GetKeySecurity(dce_call, mem_ctx, r2);
199 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
200 DEBUG(5,("function winreg_GetKeySecurity will reply async\n"));
205 struct winreg_LoadKey *r2 = (struct winreg_LoadKey *)r;
206 if (DEBUGLEVEL >= 10) {
207 NDR_PRINT_FUNCTION_DEBUG(winreg_LoadKey, NDR_IN, r2);
209 r2->out.result = dcesrv_winreg_LoadKey(dce_call, mem_ctx, r2);
210 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
211 DEBUG(5,("function winreg_LoadKey will reply async\n"));
216 struct winreg_NotifyChangeKeyValue *r2 = (struct winreg_NotifyChangeKeyValue *)r;
217 if (DEBUGLEVEL >= 10) {
218 NDR_PRINT_FUNCTION_DEBUG(winreg_NotifyChangeKeyValue, NDR_IN, r2);
220 r2->out.result = dcesrv_winreg_NotifyChangeKeyValue(dce_call, mem_ctx, r2);
221 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
222 DEBUG(5,("function winreg_NotifyChangeKeyValue will reply async\n"));
227 struct winreg_OpenKey *r2 = (struct winreg_OpenKey *)r;
228 if (DEBUGLEVEL >= 10) {
229 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenKey, NDR_IN, r2);
231 r2->out.result = dcesrv_winreg_OpenKey(dce_call, mem_ctx, r2);
232 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
233 DEBUG(5,("function winreg_OpenKey will reply async\n"));
238 struct winreg_QueryInfoKey *r2 = (struct winreg_QueryInfoKey *)r;
239 if (DEBUGLEVEL >= 10) {
240 NDR_PRINT_FUNCTION_DEBUG(winreg_QueryInfoKey, NDR_IN, r2);
242 r2->out.result = dcesrv_winreg_QueryInfoKey(dce_call, mem_ctx, r2);
243 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
244 DEBUG(5,("function winreg_QueryInfoKey will reply async\n"));
249 struct winreg_QueryValue *r2 = (struct winreg_QueryValue *)r;
250 if (DEBUGLEVEL >= 10) {
251 NDR_PRINT_FUNCTION_DEBUG(winreg_QueryValue, NDR_IN, r2);
253 r2->out.result = dcesrv_winreg_QueryValue(dce_call, mem_ctx, r2);
254 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
255 DEBUG(5,("function winreg_QueryValue will reply async\n"));
260 struct winreg_ReplaceKey *r2 = (struct winreg_ReplaceKey *)r;
261 if (DEBUGLEVEL >= 10) {
262 NDR_PRINT_FUNCTION_DEBUG(winreg_ReplaceKey, NDR_IN, r2);
264 r2->out.result = dcesrv_winreg_ReplaceKey(dce_call, mem_ctx, r2);
265 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
266 DEBUG(5,("function winreg_ReplaceKey will reply async\n"));
271 struct winreg_RestoreKey *r2 = (struct winreg_RestoreKey *)r;
272 if (DEBUGLEVEL >= 10) {
273 NDR_PRINT_FUNCTION_DEBUG(winreg_RestoreKey, NDR_IN, r2);
275 r2->out.result = dcesrv_winreg_RestoreKey(dce_call, mem_ctx, r2);
276 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
277 DEBUG(5,("function winreg_RestoreKey will reply async\n"));
282 struct winreg_SaveKey *r2 = (struct winreg_SaveKey *)r;
283 if (DEBUGLEVEL >= 10) {
284 NDR_PRINT_FUNCTION_DEBUG(winreg_SaveKey, NDR_IN, r2);
286 r2->out.result = dcesrv_winreg_SaveKey(dce_call, mem_ctx, r2);
287 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
288 DEBUG(5,("function winreg_SaveKey will reply async\n"));
293 struct winreg_SetKeySecurity *r2 = (struct winreg_SetKeySecurity *)r;
294 if (DEBUGLEVEL >= 10) {
295 NDR_PRINT_FUNCTION_DEBUG(winreg_SetKeySecurity, NDR_IN, r2);
297 r2->out.result = dcesrv_winreg_SetKeySecurity(dce_call, mem_ctx, r2);
298 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
299 DEBUG(5,("function winreg_SetKeySecurity will reply async\n"));
304 struct winreg_SetValue *r2 = (struct winreg_SetValue *)r;
305 if (DEBUGLEVEL >= 10) {
306 NDR_PRINT_FUNCTION_DEBUG(winreg_SetValue, NDR_IN, r2);
308 r2->out.result = dcesrv_winreg_SetValue(dce_call, mem_ctx, r2);
309 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
310 DEBUG(5,("function winreg_SetValue will reply async\n"));
315 struct winreg_UnLoadKey *r2 = (struct winreg_UnLoadKey *)r;
316 if (DEBUGLEVEL >= 10) {
317 NDR_PRINT_FUNCTION_DEBUG(winreg_UnLoadKey, NDR_IN, r2);
319 r2->out.result = dcesrv_winreg_UnLoadKey(dce_call, mem_ctx, r2);
320 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
321 DEBUG(5,("function winreg_UnLoadKey will reply async\n"));
326 struct winreg_InitiateSystemShutdown *r2 = (struct winreg_InitiateSystemShutdown *)r;
327 if (DEBUGLEVEL >= 10) {
328 NDR_PRINT_FUNCTION_DEBUG(winreg_InitiateSystemShutdown, NDR_IN, r2);
330 r2->out.result = dcesrv_winreg_InitiateSystemShutdown(dce_call, mem_ctx, r2);
331 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
332 DEBUG(5,("function winreg_InitiateSystemShutdown will reply async\n"));
337 struct winreg_AbortSystemShutdown *r2 = (struct winreg_AbortSystemShutdown *)r;
338 if (DEBUGLEVEL >= 10) {
339 NDR_PRINT_FUNCTION_DEBUG(winreg_AbortSystemShutdown, NDR_IN, r2);
341 r2->out.result = dcesrv_winreg_AbortSystemShutdown(dce_call, mem_ctx, r2);
342 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
343 DEBUG(5,("function winreg_AbortSystemShutdown will reply async\n"));
348 struct winreg_GetVersion *r2 = (struct winreg_GetVersion *)r;
349 if (DEBUGLEVEL >= 10) {
350 NDR_PRINT_FUNCTION_DEBUG(winreg_GetVersion, NDR_IN, r2);
352 r2->out.result = dcesrv_winreg_GetVersion(dce_call, mem_ctx, r2);
353 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
354 DEBUG(5,("function winreg_GetVersion will reply async\n"));
359 struct winreg_OpenHKCC *r2 = (struct winreg_OpenHKCC *)r;
360 if (DEBUGLEVEL >= 10) {
361 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKCC, NDR_IN, r2);
363 r2->out.result = dcesrv_winreg_OpenHKCC(dce_call, mem_ctx, r2);
364 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
365 DEBUG(5,("function winreg_OpenHKCC will reply async\n"));
370 struct winreg_OpenHKDD *r2 = (struct winreg_OpenHKDD *)r;
371 if (DEBUGLEVEL >= 10) {
372 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKDD, NDR_IN, r2);
374 r2->out.result = dcesrv_winreg_OpenHKDD(dce_call, mem_ctx, r2);
375 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
376 DEBUG(5,("function winreg_OpenHKDD will reply async\n"));
381 struct winreg_QueryMultipleValues *r2 = (struct winreg_QueryMultipleValues *)r;
382 if (DEBUGLEVEL >= 10) {
383 NDR_PRINT_FUNCTION_DEBUG(winreg_QueryMultipleValues, NDR_IN, r2);
385 r2->out.result = dcesrv_winreg_QueryMultipleValues(dce_call, mem_ctx, r2);
386 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
387 DEBUG(5,("function winreg_QueryMultipleValues will reply async\n"));
392 struct winreg_InitiateSystemShutdownEx *r2 = (struct winreg_InitiateSystemShutdownEx *)r;
393 if (DEBUGLEVEL >= 10) {
394 NDR_PRINT_FUNCTION_DEBUG(winreg_InitiateSystemShutdownEx, NDR_IN, r2);
396 r2->out.result = dcesrv_winreg_InitiateSystemShutdownEx(dce_call, mem_ctx, r2);
397 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
398 DEBUG(5,("function winreg_InitiateSystemShutdownEx will reply async\n"));
403 struct winreg_SaveKeyEx *r2 = (struct winreg_SaveKeyEx *)r;
404 if (DEBUGLEVEL >= 10) {
405 NDR_PRINT_FUNCTION_DEBUG(winreg_SaveKeyEx, NDR_IN, r2);
407 r2->out.result = dcesrv_winreg_SaveKeyEx(dce_call, mem_ctx, r2);
408 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
409 DEBUG(5,("function winreg_SaveKeyEx will reply async\n"));
414 struct winreg_OpenHKPT *r2 = (struct winreg_OpenHKPT *)r;
415 if (DEBUGLEVEL >= 10) {
416 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKPT, NDR_IN, r2);
418 r2->out.result = dcesrv_winreg_OpenHKPT(dce_call, mem_ctx, r2);
419 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
420 DEBUG(5,("function winreg_OpenHKPT will reply async\n"));
425 struct winreg_OpenHKPN *r2 = (struct winreg_OpenHKPN *)r;
426 if (DEBUGLEVEL >= 10) {
427 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKPN, NDR_IN, r2);
429 r2->out.result = dcesrv_winreg_OpenHKPN(dce_call, mem_ctx, r2);
430 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
431 DEBUG(5,("function winreg_OpenHKPN will reply async\n"));
436 struct winreg_QueryMultipleValues2 *r2 = (struct winreg_QueryMultipleValues2 *)r;
437 if (DEBUGLEVEL >= 10) {
438 NDR_PRINT_FUNCTION_DEBUG(winreg_QueryMultipleValues2, NDR_IN, r2);
440 r2->out.result = dcesrv_winreg_QueryMultipleValues2(dce_call, mem_ctx, r2);
441 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
442 DEBUG(5,("function winreg_QueryMultipleValues2 will reply async\n"));
447 struct winreg_DeleteKeyEx *r2 = (struct winreg_DeleteKeyEx *)r;
448 if (DEBUGLEVEL >= 10) {
449 NDR_PRINT_FUNCTION_DEBUG(winreg_DeleteKeyEx, NDR_IN, r2);
451 r2->out.result = dcesrv_winreg_DeleteKeyEx(dce_call, mem_ctx, r2);
452 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
453 DEBUG(5,("function winreg_DeleteKeyEx will reply async\n"));
459 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
463 if (dce_call->fault_code != 0) {
464 dcerpc_log_packet(dce_call->conn->packet_log_dir,
465 &ndr_table_winreg, opnum, NDR_IN,
466 &dce_call->pkt.u.request.stub_and_verifier);
467 return NT_STATUS_NET_WRITE_FAULT;
473 static NTSTATUS winreg__op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
475 uint16_t opnum = dce_call->pkt.u.request.opnum;
479 struct winreg_OpenHKCR *r2 = (struct winreg_OpenHKCR *)r;
480 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
481 DEBUG(5,("function winreg_OpenHKCR replied async\n"));
483 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
484 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKCR, NDR_OUT | NDR_SET_VALUES, r2);
486 if (dce_call->fault_code != 0) {
487 DEBUG(2,("dcerpc_fault %s in winreg_OpenHKCR\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
492 struct winreg_OpenHKCU *r2 = (struct winreg_OpenHKCU *)r;
493 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
494 DEBUG(5,("function winreg_OpenHKCU replied async\n"));
496 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
497 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKCU, NDR_OUT | NDR_SET_VALUES, r2);
499 if (dce_call->fault_code != 0) {
500 DEBUG(2,("dcerpc_fault %s in winreg_OpenHKCU\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
505 struct winreg_OpenHKLM *r2 = (struct winreg_OpenHKLM *)r;
506 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
507 DEBUG(5,("function winreg_OpenHKLM replied async\n"));
509 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
510 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKLM, NDR_OUT | NDR_SET_VALUES, r2);
512 if (dce_call->fault_code != 0) {
513 DEBUG(2,("dcerpc_fault %s in winreg_OpenHKLM\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
518 struct winreg_OpenHKPD *r2 = (struct winreg_OpenHKPD *)r;
519 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
520 DEBUG(5,("function winreg_OpenHKPD replied async\n"));
522 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
523 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKPD, NDR_OUT | NDR_SET_VALUES, r2);
525 if (dce_call->fault_code != 0) {
526 DEBUG(2,("dcerpc_fault %s in winreg_OpenHKPD\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
531 struct winreg_OpenHKU *r2 = (struct winreg_OpenHKU *)r;
532 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
533 DEBUG(5,("function winreg_OpenHKU replied async\n"));
535 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
536 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKU, NDR_OUT | NDR_SET_VALUES, r2);
538 if (dce_call->fault_code != 0) {
539 DEBUG(2,("dcerpc_fault %s in winreg_OpenHKU\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
544 struct winreg_CloseKey *r2 = (struct winreg_CloseKey *)r;
545 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
546 DEBUG(5,("function winreg_CloseKey replied async\n"));
548 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
549 NDR_PRINT_FUNCTION_DEBUG(winreg_CloseKey, NDR_OUT | NDR_SET_VALUES, r2);
551 if (dce_call->fault_code != 0) {
552 DEBUG(2,("dcerpc_fault %s in winreg_CloseKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
557 struct winreg_CreateKey *r2 = (struct winreg_CreateKey *)r;
558 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
559 DEBUG(5,("function winreg_CreateKey replied async\n"));
561 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
562 NDR_PRINT_FUNCTION_DEBUG(winreg_CreateKey, NDR_OUT | NDR_SET_VALUES, r2);
564 if (dce_call->fault_code != 0) {
565 DEBUG(2,("dcerpc_fault %s in winreg_CreateKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
570 struct winreg_DeleteKey *r2 = (struct winreg_DeleteKey *)r;
571 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
572 DEBUG(5,("function winreg_DeleteKey replied async\n"));
574 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
575 NDR_PRINT_FUNCTION_DEBUG(winreg_DeleteKey, NDR_OUT | NDR_SET_VALUES, r2);
577 if (dce_call->fault_code != 0) {
578 DEBUG(2,("dcerpc_fault %s in winreg_DeleteKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
583 struct winreg_DeleteValue *r2 = (struct winreg_DeleteValue *)r;
584 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
585 DEBUG(5,("function winreg_DeleteValue replied async\n"));
587 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
588 NDR_PRINT_FUNCTION_DEBUG(winreg_DeleteValue, NDR_OUT | NDR_SET_VALUES, r2);
590 if (dce_call->fault_code != 0) {
591 DEBUG(2,("dcerpc_fault %s in winreg_DeleteValue\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
596 struct winreg_EnumKey *r2 = (struct winreg_EnumKey *)r;
597 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
598 DEBUG(5,("function winreg_EnumKey replied async\n"));
600 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
601 NDR_PRINT_FUNCTION_DEBUG(winreg_EnumKey, NDR_OUT | NDR_SET_VALUES, r2);
603 if (dce_call->fault_code != 0) {
604 DEBUG(2,("dcerpc_fault %s in winreg_EnumKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
609 struct winreg_EnumValue *r2 = (struct winreg_EnumValue *)r;
610 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
611 DEBUG(5,("function winreg_EnumValue replied async\n"));
613 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
614 NDR_PRINT_FUNCTION_DEBUG(winreg_EnumValue, NDR_OUT | NDR_SET_VALUES, r2);
616 if (dce_call->fault_code != 0) {
617 DEBUG(2,("dcerpc_fault %s in winreg_EnumValue\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
622 struct winreg_FlushKey *r2 = (struct winreg_FlushKey *)r;
623 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
624 DEBUG(5,("function winreg_FlushKey replied async\n"));
626 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
627 NDR_PRINT_FUNCTION_DEBUG(winreg_FlushKey, NDR_OUT | NDR_SET_VALUES, r2);
629 if (dce_call->fault_code != 0) {
630 DEBUG(2,("dcerpc_fault %s in winreg_FlushKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
635 struct winreg_GetKeySecurity *r2 = (struct winreg_GetKeySecurity *)r;
636 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
637 DEBUG(5,("function winreg_GetKeySecurity replied async\n"));
639 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
640 NDR_PRINT_FUNCTION_DEBUG(winreg_GetKeySecurity, NDR_OUT | NDR_SET_VALUES, r2);
642 if (dce_call->fault_code != 0) {
643 DEBUG(2,("dcerpc_fault %s in winreg_GetKeySecurity\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
648 struct winreg_LoadKey *r2 = (struct winreg_LoadKey *)r;
649 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
650 DEBUG(5,("function winreg_LoadKey replied async\n"));
652 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
653 NDR_PRINT_FUNCTION_DEBUG(winreg_LoadKey, NDR_OUT | NDR_SET_VALUES, r2);
655 if (dce_call->fault_code != 0) {
656 DEBUG(2,("dcerpc_fault %s in winreg_LoadKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
661 struct winreg_NotifyChangeKeyValue *r2 = (struct winreg_NotifyChangeKeyValue *)r;
662 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
663 DEBUG(5,("function winreg_NotifyChangeKeyValue replied async\n"));
665 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
666 NDR_PRINT_FUNCTION_DEBUG(winreg_NotifyChangeKeyValue, NDR_OUT | NDR_SET_VALUES, r2);
668 if (dce_call->fault_code != 0) {
669 DEBUG(2,("dcerpc_fault %s in winreg_NotifyChangeKeyValue\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
674 struct winreg_OpenKey *r2 = (struct winreg_OpenKey *)r;
675 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
676 DEBUG(5,("function winreg_OpenKey replied async\n"));
678 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
679 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenKey, NDR_OUT | NDR_SET_VALUES, r2);
681 if (dce_call->fault_code != 0) {
682 DEBUG(2,("dcerpc_fault %s in winreg_OpenKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
687 struct winreg_QueryInfoKey *r2 = (struct winreg_QueryInfoKey *)r;
688 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
689 DEBUG(5,("function winreg_QueryInfoKey replied async\n"));
691 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
692 NDR_PRINT_FUNCTION_DEBUG(winreg_QueryInfoKey, NDR_OUT | NDR_SET_VALUES, r2);
694 if (dce_call->fault_code != 0) {
695 DEBUG(2,("dcerpc_fault %s in winreg_QueryInfoKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
700 struct winreg_QueryValue *r2 = (struct winreg_QueryValue *)r;
701 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
702 DEBUG(5,("function winreg_QueryValue replied async\n"));
704 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
705 NDR_PRINT_FUNCTION_DEBUG(winreg_QueryValue, NDR_OUT | NDR_SET_VALUES, r2);
707 if (dce_call->fault_code != 0) {
708 DEBUG(2,("dcerpc_fault %s in winreg_QueryValue\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
713 struct winreg_ReplaceKey *r2 = (struct winreg_ReplaceKey *)r;
714 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
715 DEBUG(5,("function winreg_ReplaceKey replied async\n"));
717 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
718 NDR_PRINT_FUNCTION_DEBUG(winreg_ReplaceKey, NDR_OUT | NDR_SET_VALUES, r2);
720 if (dce_call->fault_code != 0) {
721 DEBUG(2,("dcerpc_fault %s in winreg_ReplaceKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
726 struct winreg_RestoreKey *r2 = (struct winreg_RestoreKey *)r;
727 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
728 DEBUG(5,("function winreg_RestoreKey replied async\n"));
730 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
731 NDR_PRINT_FUNCTION_DEBUG(winreg_RestoreKey, NDR_OUT | NDR_SET_VALUES, r2);
733 if (dce_call->fault_code != 0) {
734 DEBUG(2,("dcerpc_fault %s in winreg_RestoreKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
739 struct winreg_SaveKey *r2 = (struct winreg_SaveKey *)r;
740 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
741 DEBUG(5,("function winreg_SaveKey replied async\n"));
743 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
744 NDR_PRINT_FUNCTION_DEBUG(winreg_SaveKey, NDR_OUT | NDR_SET_VALUES, r2);
746 if (dce_call->fault_code != 0) {
747 DEBUG(2,("dcerpc_fault %s in winreg_SaveKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
752 struct winreg_SetKeySecurity *r2 = (struct winreg_SetKeySecurity *)r;
753 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
754 DEBUG(5,("function winreg_SetKeySecurity replied async\n"));
756 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
757 NDR_PRINT_FUNCTION_DEBUG(winreg_SetKeySecurity, NDR_OUT | NDR_SET_VALUES, r2);
759 if (dce_call->fault_code != 0) {
760 DEBUG(2,("dcerpc_fault %s in winreg_SetKeySecurity\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
765 struct winreg_SetValue *r2 = (struct winreg_SetValue *)r;
766 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
767 DEBUG(5,("function winreg_SetValue replied async\n"));
769 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
770 NDR_PRINT_FUNCTION_DEBUG(winreg_SetValue, NDR_OUT | NDR_SET_VALUES, r2);
772 if (dce_call->fault_code != 0) {
773 DEBUG(2,("dcerpc_fault %s in winreg_SetValue\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
778 struct winreg_UnLoadKey *r2 = (struct winreg_UnLoadKey *)r;
779 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
780 DEBUG(5,("function winreg_UnLoadKey replied async\n"));
782 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
783 NDR_PRINT_FUNCTION_DEBUG(winreg_UnLoadKey, NDR_OUT | NDR_SET_VALUES, r2);
785 if (dce_call->fault_code != 0) {
786 DEBUG(2,("dcerpc_fault %s in winreg_UnLoadKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
791 struct winreg_InitiateSystemShutdown *r2 = (struct winreg_InitiateSystemShutdown *)r;
792 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
793 DEBUG(5,("function winreg_InitiateSystemShutdown replied async\n"));
795 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
796 NDR_PRINT_FUNCTION_DEBUG(winreg_InitiateSystemShutdown, NDR_OUT | NDR_SET_VALUES, r2);
798 if (dce_call->fault_code != 0) {
799 DEBUG(2,("dcerpc_fault %s in winreg_InitiateSystemShutdown\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
804 struct winreg_AbortSystemShutdown *r2 = (struct winreg_AbortSystemShutdown *)r;
805 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
806 DEBUG(5,("function winreg_AbortSystemShutdown replied async\n"));
808 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
809 NDR_PRINT_FUNCTION_DEBUG(winreg_AbortSystemShutdown, NDR_OUT | NDR_SET_VALUES, r2);
811 if (dce_call->fault_code != 0) {
812 DEBUG(2,("dcerpc_fault %s in winreg_AbortSystemShutdown\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
817 struct winreg_GetVersion *r2 = (struct winreg_GetVersion *)r;
818 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
819 DEBUG(5,("function winreg_GetVersion replied async\n"));
821 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
822 NDR_PRINT_FUNCTION_DEBUG(winreg_GetVersion, NDR_OUT | NDR_SET_VALUES, r2);
824 if (dce_call->fault_code != 0) {
825 DEBUG(2,("dcerpc_fault %s in winreg_GetVersion\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
830 struct winreg_OpenHKCC *r2 = (struct winreg_OpenHKCC *)r;
831 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
832 DEBUG(5,("function winreg_OpenHKCC replied async\n"));
834 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
835 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKCC, NDR_OUT | NDR_SET_VALUES, r2);
837 if (dce_call->fault_code != 0) {
838 DEBUG(2,("dcerpc_fault %s in winreg_OpenHKCC\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
843 struct winreg_OpenHKDD *r2 = (struct winreg_OpenHKDD *)r;
844 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
845 DEBUG(5,("function winreg_OpenHKDD replied async\n"));
847 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
848 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKDD, NDR_OUT | NDR_SET_VALUES, r2);
850 if (dce_call->fault_code != 0) {
851 DEBUG(2,("dcerpc_fault %s in winreg_OpenHKDD\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
856 struct winreg_QueryMultipleValues *r2 = (struct winreg_QueryMultipleValues *)r;
857 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
858 DEBUG(5,("function winreg_QueryMultipleValues replied async\n"));
860 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
861 NDR_PRINT_FUNCTION_DEBUG(winreg_QueryMultipleValues, NDR_OUT | NDR_SET_VALUES, r2);
863 if (dce_call->fault_code != 0) {
864 DEBUG(2,("dcerpc_fault %s in winreg_QueryMultipleValues\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
869 struct winreg_InitiateSystemShutdownEx *r2 = (struct winreg_InitiateSystemShutdownEx *)r;
870 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
871 DEBUG(5,("function winreg_InitiateSystemShutdownEx replied async\n"));
873 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
874 NDR_PRINT_FUNCTION_DEBUG(winreg_InitiateSystemShutdownEx, NDR_OUT | NDR_SET_VALUES, r2);
876 if (dce_call->fault_code != 0) {
877 DEBUG(2,("dcerpc_fault %s in winreg_InitiateSystemShutdownEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
882 struct winreg_SaveKeyEx *r2 = (struct winreg_SaveKeyEx *)r;
883 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
884 DEBUG(5,("function winreg_SaveKeyEx replied async\n"));
886 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
887 NDR_PRINT_FUNCTION_DEBUG(winreg_SaveKeyEx, NDR_OUT | NDR_SET_VALUES, r2);
889 if (dce_call->fault_code != 0) {
890 DEBUG(2,("dcerpc_fault %s in winreg_SaveKeyEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
895 struct winreg_OpenHKPT *r2 = (struct winreg_OpenHKPT *)r;
896 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
897 DEBUG(5,("function winreg_OpenHKPT replied async\n"));
899 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
900 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKPT, NDR_OUT | NDR_SET_VALUES, r2);
902 if (dce_call->fault_code != 0) {
903 DEBUG(2,("dcerpc_fault %s in winreg_OpenHKPT\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
908 struct winreg_OpenHKPN *r2 = (struct winreg_OpenHKPN *)r;
909 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
910 DEBUG(5,("function winreg_OpenHKPN replied async\n"));
912 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
913 NDR_PRINT_FUNCTION_DEBUG(winreg_OpenHKPN, NDR_OUT | NDR_SET_VALUES, r2);
915 if (dce_call->fault_code != 0) {
916 DEBUG(2,("dcerpc_fault %s in winreg_OpenHKPN\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
921 struct winreg_QueryMultipleValues2 *r2 = (struct winreg_QueryMultipleValues2 *)r;
922 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
923 DEBUG(5,("function winreg_QueryMultipleValues2 replied async\n"));
925 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
926 NDR_PRINT_FUNCTION_DEBUG(winreg_QueryMultipleValues2, NDR_OUT | NDR_SET_VALUES, r2);
928 if (dce_call->fault_code != 0) {
929 DEBUG(2,("dcerpc_fault %s in winreg_QueryMultipleValues2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
934 struct winreg_DeleteKeyEx *r2 = (struct winreg_DeleteKeyEx *)r;
935 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
936 DEBUG(5,("function winreg_DeleteKeyEx replied async\n"));
938 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
939 NDR_PRINT_FUNCTION_DEBUG(winreg_DeleteKeyEx, NDR_OUT | NDR_SET_VALUES, r2);
941 if (dce_call->fault_code != 0) {
942 DEBUG(2,("dcerpc_fault %s in winreg_DeleteKeyEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
948 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
952 if (dce_call->fault_code != 0) {
953 dcerpc_log_packet(dce_call->conn->packet_log_dir,
954 &ndr_table_winreg, opnum, NDR_IN,
955 &dce_call->pkt.u.request.stub_and_verifier);
956 return NT_STATUS_NET_WRITE_FAULT;
962 static NTSTATUS winreg__op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
964 enum ndr_err_code ndr_err;
965 uint16_t opnum = dce_call->pkt.u.request.opnum;
967 ndr_err = ndr_table_winreg.calls[opnum].ndr_push(push, NDR_OUT, r);
968 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
969 dce_call->fault_code = DCERPC_FAULT_NDR;
970 return NT_STATUS_NET_WRITE_FAULT;
976 const struct dcesrv_interface dcesrv_winreg_interface = {
978 .syntax_id = {{0x338cd001,0x2244,0x31f1,{0xaa,0xaa},{0x90,0x00,0x38,0x00,0x10,0x03}},1.0},
979 .bind = winreg__op_bind,
980 .unbind = winreg__op_unbind,
981 .ndr_pull = winreg__op_ndr_pull,
982 .dispatch = winreg__op_dispatch,
983 .reply = winreg__op_reply,
984 .ndr_push = winreg__op_ndr_push
988 static NTSTATUS winreg__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
992 for (i=0;i<ndr_table_winreg.endpoints->count;i++) {
994 const char *name = ndr_table_winreg.endpoints->names[i];
996 ret = dcesrv_interface_register(dce_ctx, name, &dcesrv_winreg_interface, NULL);
997 if (!NT_STATUS_IS_OK(ret)) {
998 DEBUG(1,("winreg_op_init_server: failed to register endpoint '%s'\n",name));
1003 return NT_STATUS_OK;
1006 static bool winreg__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
1008 if (dcesrv_winreg_interface.syntax_id.if_version == if_version &&
1009 GUID_equal(&dcesrv_winreg_interface.syntax_id.uuid, uuid)) {
1010 memcpy(iface,&dcesrv_winreg_interface, sizeof(*iface));
1017 static bool winreg__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
1019 if (strcmp(dcesrv_winreg_interface.name, name)==0) {
1020 memcpy(iface, &dcesrv_winreg_interface, sizeof(*iface));
1027 NTSTATUS dcerpc_server_winreg_init(void)
1030 struct dcesrv_endpoint_server ep_server;
1032 /* fill in our name */
1033 ep_server.name = "winreg";
1035 /* fill in all the operations */
1036 ep_server.init_server = winreg__op_init_server;
1038 ep_server.interface_by_uuid = winreg__op_interface_by_uuid;
1039 ep_server.interface_by_name = winreg__op_interface_by_name;
1041 /* register ourselves with the DCERPC subsystem. */
1042 ret = dcerpc_register_ep_server(&ep_server);
1044 if (!NT_STATUS_IS_OK(ret)) {
1045 DEBUG(0,("Failed to register 'winreg' endpoint server!\n"));