210-remove_ad_support.patch 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. --- a/source3/librpc/rpc/rpc_common.c
  2. +++ b/source3/librpc/rpc/rpc_common.c
  3. @@ -95,9 +95,11 @@ static bool initialize_interfaces(void)
  4. if (!smb_register_ndr_interface(&ndr_table_lsarpc)) {
  5. return false;
  6. }
  7. +#ifdef ACTIVE_DIRECTORY
  8. if (!smb_register_ndr_interface(&ndr_table_dssetup)) {
  9. return false;
  10. }
  11. +#endif
  12. if (!smb_register_ndr_interface(&ndr_table_samr)) {
  13. return false;
  14. }
  15. @@ -141,9 +143,11 @@ static bool initialize_interfaces(void)
  16. if (!smb_register_ndr_interface(&ndr_table_epmapper)) {
  17. return false;
  18. }
  19. +#ifdef ACTIVE_DIRECTORY
  20. if (!smb_register_ndr_interface(&ndr_table_drsuapi)) {
  21. return false;
  22. }
  23. +#endif
  24. return true;
  25. }
  26. --- a/source3/rpc_server/rpc_ep_setup.c
  27. +++ b/source3/rpc_server/rpc_ep_setup.c
  28. @@ -918,6 +918,7 @@ static bool netdfs_init_cb(void *ptr)
  29. return true;
  30. }
  31. +#ifdef ACTIVE_DIRECTORY
  32. static bool dssetup_init_cb(void *ptr)
  33. {
  34. struct dcesrv_ep_context *ep_ctx =
  35. @@ -966,6 +967,7 @@ static bool dssetup_init_cb(void *ptr)
  36. return true;
  37. }
  38. +#endif
  39. static bool wkssvc_init_cb(void *ptr)
  40. {
  41. @@ -1172,12 +1174,14 @@ bool dcesrv_ep_setup(struct tevent_conte
  42. }
  43. #endif
  44. +#ifdef ACTIVE_DIRECTORY
  45. dssetup_cb.init = dssetup_init_cb;
  46. dssetup_cb.shutdown = NULL;
  47. dssetup_cb.private_data = ep_ctx;
  48. if (!NT_STATUS_IS_OK(rpc_dssetup_init(&dssetup_cb))) {
  49. return false;
  50. }
  51. +#endif
  52. wkssvc_cb.init = wkssvc_init_cb;
  53. wkssvc_cb.shutdown = NULL;
  54. --- a/source3/smbd/server_exit.c
  55. +++ b/source3/smbd/server_exit.c
  56. @@ -132,7 +132,9 @@ static void exit_server_common(enum serv
  57. if (am_parent) {
  58. rpc_wkssvc_shutdown();
  59. +#ifdef ACTIVE_DIRECTORY
  60. rpc_dssetup_shutdown();
  61. +#endif
  62. #ifdef DEVELOPER
  63. rpc_rpcecho_shutdown();
  64. #endif
  65. --- a/source3/rpc_client/cli_pipe.c
  66. +++ b/source3/rpc_client/cli_pipe.c
  67. @@ -3391,12 +3391,14 @@ NTSTATUS cli_rpc_pipe_open_noauth_transp
  68. status = rpc_pipe_bind(result, auth);
  69. if (!NT_STATUS_IS_OK(status)) {
  70. int lvl = 0;
  71. +#ifdef ACTIVE_DIRECTORY
  72. if (ndr_syntax_id_equal(interface,
  73. &ndr_table_dssetup.syntax_id)) {
  74. /* non AD domains just don't have this pipe, avoid
  75. * level 0 statement in that case - gd */
  76. lvl = 3;
  77. }
  78. +#endif
  79. DEBUG(lvl, ("cli_rpc_pipe_open_noauth: rpc_pipe_bind for pipe "
  80. "%s failed with error %s\n",
  81. get_pipe_name_from_syntax(talloc_tos(), interface),