230-remove_winreg_support.patch 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. --- a/source3/rpc_server/rpc_ep_setup.c
  2. +++ b/source3/rpc_server/rpc_ep_setup.c
  3. @@ -409,6 +409,7 @@ static bool epmapper_shutdown_cb(void *p
  4. return true;
  5. }
  6. +#ifdef WINREG_SUPPORT
  7. static bool winreg_init_cb(void *ptr)
  8. {
  9. struct dcesrv_ep_context *ep_ctx =
  10. @@ -456,6 +457,7 @@ static bool winreg_init_cb(void *ptr)
  11. return true;
  12. }
  13. +#endif
  14. static bool srvsvc_init_cb(void *ptr)
  15. {
  16. @@ -710,10 +712,12 @@ static bool svcctl_init_cb(void *ptr)
  17. "epmapper",
  18. "none");
  19. +#ifdef WINREG_SUPPORT
  20. ok = svcctl_init_winreg(ep_ctx->msg_ctx);
  21. if (!ok) {
  22. return false;
  23. }
  24. +#endif
  25. /* initialize the control hooks */
  26. init_service_op_table();
  27. @@ -785,10 +789,12 @@ static bool eventlog_init_cb(void *ptr)
  28. "epmapper",
  29. "none");
  30. +#ifdef WINREG_SUPPORT
  31. ok = eventlog_init_winreg(ep_ctx->msg_ctx);
  32. if (!ok) {
  33. return false;
  34. }
  35. +#endif
  36. if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
  37. StrCaseCmp(rpcsrv_type, "daemon") == 0) {
  38. @@ -1077,12 +1083,14 @@ bool dcesrv_ep_setup(struct tevent_conte
  39. }
  40. }
  41. +#ifdef WINREG_SUPPORT
  42. winreg_cb.init = winreg_init_cb;
  43. winreg_cb.shutdown = NULL;
  44. winreg_cb.private_data = ep_ctx;
  45. if (!NT_STATUS_IS_OK(rpc_winreg_init(&winreg_cb))) {
  46. return false;
  47. }
  48. +#endif
  49. srvsvc_cb.init = srvsvc_init_cb;
  50. srvsvc_cb.shutdown = NULL;
  51. --- a/source3/smbd/server_exit.c
  52. +++ b/source3/smbd/server_exit.c
  53. @@ -150,7 +150,9 @@ static void exit_server_common(enum serv
  54. #endif
  55. rpc_srvsvc_shutdown();
  56. +#ifdef WINREG_SUPPORT
  57. rpc_winreg_shutdown();
  58. +#endif
  59. rpc_netlogon_shutdown();
  60. rpc_samr_shutdown();
  61. --- a/source3/librpc/rpc/rpc_common.c
  62. +++ b/source3/librpc/rpc/rpc_common.c
  63. @@ -112,9 +112,11 @@ static bool initialize_interfaces(void)
  64. if (!smb_register_ndr_interface(&ndr_table_wkssvc)) {
  65. return false;
  66. }
  67. +#ifdef WINREG_SUPPORT
  68. if (!smb_register_ndr_interface(&ndr_table_winreg)) {
  69. return false;
  70. }
  71. +#endif
  72. #ifdef PRINTER_SUPPORT
  73. if (!smb_register_ndr_interface(&ndr_table_spoolss)) {
  74. return false;
  75. --- a/source3/rpc_server/svcctl/srv_svcctl_nt.c
  76. +++ b/source3/rpc_server/svcctl/srv_svcctl_nt.c
  77. @@ -95,9 +95,11 @@ bool init_service_op_table( void )
  78. svcctl_ops[i].ops = &netlogon_svc_ops;
  79. i++;
  80. +#ifdef WINREG_SUPPORT
  81. svcctl_ops[i].name = talloc_strdup( svcctl_ops, "RemoteRegistry" );
  82. svcctl_ops[i].ops = &winreg_svc_ops;
  83. i++;
  84. +#endif
  85. svcctl_ops[i].name = talloc_strdup( svcctl_ops, "WINS" );
  86. svcctl_ops[i].ops = &wins_svc_ops;
  87. --- a/source3/services/svc_winreg_glue.c
  88. +++ b/source3/services/svc_winreg_glue.c
  89. @@ -88,6 +88,10 @@ struct security_descriptor *svcctl_get_s
  90. NTSTATUS status;
  91. WERROR result = WERR_OK;
  92. +#ifndef WINREG_SUPPORT
  93. + return NULL;
  94. +#endif
  95. +
  96. key = talloc_asprintf(mem_ctx,
  97. "%s\\%s\\Security",
  98. TOP_LEVEL_SERVICES_KEY, name);
  99. @@ -161,6 +165,10 @@ bool svcctl_set_secdesc(struct messaging
  100. NTSTATUS status;
  101. WERROR result = WERR_OK;
  102. +#ifndef WINREG_SUPPORT
  103. + return false;
  104. +#endif
  105. +
  106. tmp_ctx = talloc_stackframe();
  107. if (tmp_ctx == NULL) {
  108. return false;
  109. @@ -272,6 +280,10 @@ const char *svcctl_get_string_value(TALL
  110. NTSTATUS status;
  111. WERROR result = WERR_OK;
  112. +#ifndef WINREG_SUPPORT
  113. + return NULL;
  114. +#endif
  115. +
  116. tmp_ctx = talloc_stackframe();
  117. if (tmp_ctx == NULL) {
  118. return NULL;
  119. --- a/source3/rpcclient/rpcclient.c
  120. +++ b/source3/rpcclient/rpcclient.c
  121. @@ -642,7 +642,9 @@ static struct cmd_set *rpcclient_command
  122. drsuapi_commands,
  123. eventlog_commands,
  124. #endif
  125. +#ifdef WINREG_SUPPORT
  126. winreg_commands,
  127. +#endif
  128. NULL
  129. };