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