1
0

270-remove_registry_backend.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --- a/source3/lib/smbconf/smbconf_init.c
  2. +++ b/source3/lib/smbconf/smbconf_init.c
  3. @@ -68,9 +68,12 @@ sbcErr smbconf_init(TALLOC_CTX *mem_ctx,
  4. }
  5. }
  6. +#ifdef REGISTRY_BACKEND
  7. if (strequal(backend, "registry") || strequal(backend, "reg")) {
  8. err = smbconf_init_reg(mem_ctx, conf_ctx, path);
  9. - } else if (strequal(backend, "file") || strequal(backend, "txt")) {
  10. + } else
  11. +#endif
  12. + if (strequal(backend, "file") || strequal(backend, "txt")) {
  13. err = smbconf_init_txt(mem_ctx, conf_ctx, path);
  14. } else if (sep == NULL) {
  15. /*
  16. --- a/source3/lib/netapi/serverinfo.c
  17. +++ b/source3/lib/netapi/serverinfo.c
  18. @@ -557,7 +557,10 @@ static WERROR NetServerSetInfo_l_1005(st
  19. return WERR_INVALID_PARAM;
  20. }
  21. - if (!lp_config_backend_is_registry()) {
  22. +#ifdef REGISTRY_BACKEND
  23. + if (!lp_config_backend_is_registry())
  24. +#endif
  25. + {
  26. libnetapi_set_error_string(ctx,
  27. "Configuration manipulation requested but not "
  28. "supported by backend");
  29. --- a/source3/smbd/server.c
  30. +++ b/source3/smbd/server.c
  31. @@ -1230,8 +1230,10 @@ extern void build_options(bool screen);
  32. exit(1);
  33. }
  34. +#ifdef REGISTRY_BACKEND
  35. if (!W_ERROR_IS_OK(registry_init_full()))
  36. exit(1);
  37. +#endif
  38. /* Open the share_info.tdb here, so we don't have to open
  39. after the fork on every single connection. This is a small