290-remove_lsa.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. --- a/source3/librpc/rpc/rpc_common.c
  2. +++ b/source3/librpc/rpc/rpc_common.c
  3. @@ -92,9 +92,11 @@ bool smb_register_ndr_interface(const st
  4. static bool initialize_interfaces(void)
  5. {
  6. +#ifdef LSA_SUPPORT
  7. if (!smb_register_ndr_interface(&ndr_table_lsarpc)) {
  8. return false;
  9. }
  10. +#endif
  11. #ifdef ACTIVE_DIRECTORY
  12. if (!smb_register_ndr_interface(&ndr_table_dssetup)) {
  13. return false;
  14. --- a/source3/smbd/server_exit.c
  15. +++ b/source3/smbd/server_exit.c
  16. @@ -162,7 +162,9 @@ static void exit_server_common(enum serv
  17. #ifdef SAMR_SUPPORT
  18. rpc_samr_shutdown();
  19. #endif
  20. +#ifdef LSA_SUPPORT
  21. rpc_lsarpc_shutdown();
  22. +#endif
  23. }
  24. /*
  25. --- a/source3/rpc_server/rpc_ep_setup.c
  26. +++ b/source3/rpc_server/rpc_ep_setup.c
  27. @@ -508,6 +508,7 @@ static bool srvsvc_init_cb(void *ptr)
  28. return true;
  29. }
  30. +#ifdef LSA_SUPPORT
  31. static bool lsarpc_init_cb(void *ptr)
  32. {
  33. struct dcesrv_ep_context *ep_ctx =
  34. @@ -556,6 +557,7 @@ static bool lsarpc_init_cb(void *ptr)
  35. return true;
  36. }
  37. +#endif
  38. #ifdef SAMR_SUPPORT
  39. static bool samr_init_cb(void *ptr)
  40. @@ -1106,12 +1108,14 @@ bool dcesrv_ep_setup(struct tevent_conte
  41. }
  42. +#ifdef LSA_SUPPORT
  43. lsarpc_cb.init = lsarpc_init_cb;
  44. lsarpc_cb.shutdown = NULL;
  45. lsarpc_cb.private_data = ep_ctx;
  46. if (!NT_STATUS_IS_OK(rpc_lsarpc_init(&lsarpc_cb))) {
  47. return false;
  48. }
  49. +#endif
  50. #ifdef SAMR_SUPPORT
  51. samr_cb.init = samr_init_cb;
  52. --- a/source3/rpc_server/rpc_handles.c
  53. +++ b/source3/rpc_server/rpc_handles.c
  54. @@ -63,7 +63,10 @@ static bool is_samr_lsa_pipe(const struc
  55. #ifdef SAMR_SUPPORT
  56. ndr_syntax_id_equal(syntax, &ndr_table_samr.syntax_id) ||
  57. #endif
  58. - ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id);
  59. +#ifdef LSA_SUPPORT
  60. + ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id) ||
  61. +#endif
  62. + false;
  63. }
  64. size_t num_pipe_handles(struct pipes_struct *p)
  65. --- a/source3/rpc_server/srv_pipe.c
  66. +++ b/source3/rpc_server/srv_pipe.c
  67. @@ -419,10 +419,12 @@ static bool check_bind_req(struct pipes_
  68. context_fns->allow_connect = false;
  69. }
  70. #endif
  71. +#ifdef LSA_SUPPORT
  72. ok = ndr_syntax_id_equal(abstract, &ndr_table_lsarpc.syntax_id);
  73. if (ok) {
  74. context_fns->allow_connect = false;
  75. }
  76. +#endif
  77. #ifdef NETLOGON_SUPPORT
  78. ok = ndr_syntax_id_equal(abstract, &ndr_table_netlogon.syntax_id);
  79. if (ok) {