samba36: reorganize patches, fix windows 7 compatibility
[openwrt/svn-archive/archive.git] / net / samba36 / patches / 270-remove_registry_backend.patch
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");