mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
r9209: - fixed the ldb registry backend to work with the new provision ldif
- default to ldb backend if none specified
(This used to be commit 8c3f57f791
)
This commit is contained in:
parent
ede70c80e8
commit
a689b968b6
@ -250,7 +250,7 @@ static WERROR ldb_open_hive(struct registry_hive *hive, struct registry_key **k)
|
|||||||
talloc_set_destructor (hive, ldb_free_hive);
|
talloc_set_destructor (hive, ldb_free_hive);
|
||||||
(*k)->name = talloc_strdup(*k, "");
|
(*k)->name = talloc_strdup(*k, "");
|
||||||
(*k)->backend_data = kd = talloc_zero(*k, struct ldb_key_data);
|
(*k)->backend_data = kd = talloc_zero(*k, struct ldb_key_data);
|
||||||
kd->dn = talloc_strdup(*k, "hive=");
|
kd->dn = talloc_strdup(*k, "hive=NONE");
|
||||||
|
|
||||||
|
|
||||||
return WERR_OK;
|
return WERR_OK;
|
||||||
|
@ -27,7 +27,8 @@ static WERROR reg_samba_get_predef (struct registry_context *ctx, uint32_t hkey,
|
|||||||
{
|
{
|
||||||
WERROR error;
|
WERROR error;
|
||||||
const char *conf;
|
const char *conf;
|
||||||
char *backend, *location;
|
char *backend;
|
||||||
|
const char *location;
|
||||||
const char *hivename = reg_get_predef_name(hkey);
|
const char *hivename = reg_get_predef_name(hkey);
|
||||||
|
|
||||||
*k = NULL;
|
*k = NULL;
|
||||||
@ -38,12 +39,13 @@ static WERROR reg_samba_get_predef (struct registry_context *ctx, uint32_t hkey,
|
|||||||
return WERR_NOT_SUPPORTED;
|
return WERR_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
backend = talloc_strdup(NULL, conf);
|
location = strchr(conf, ':');
|
||||||
location = strchr(backend, ':');
|
|
||||||
|
|
||||||
if (location) {
|
if (location) {
|
||||||
*location = '\0';
|
backend = talloc_strndup(ctx, conf, (int)(location - conf));
|
||||||
location++;
|
location++;
|
||||||
|
} else {
|
||||||
|
backend = talloc_strdup(ctx, "ldb");
|
||||||
|
location = conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Different hive backend for HKEY_CLASSES_ROOT: merged view of HKEY_LOCAL_MACHINE\Software\Classes
|
/* FIXME: Different hive backend for HKEY_CLASSES_ROOT: merged view of HKEY_LOCAL_MACHINE\Software\Classes
|
||||||
|
Loading…
Reference in New Issue
Block a user