summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/registry/ldb.c4
-rw-r--r--source4/rpc_server/winreg/rpc_winreg.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index 018ea86d85..0aa44fa468 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -309,7 +309,7 @@ static WERROR ldb_get_default_value(TALLOC_CTX *mem_ctx, struct hive_key *k,
struct ldb_result *res;
int ret;
- ret = ldb_search(c, kd->dn, LDB_SCOPE_BASE, "", attrs, &res);
+ ret = ldb_search(c, mem_ctx, &res, kd->dn, LDB_SCOPE_BASE, attrs, "%s", "");
if (ret != LDB_SUCCESS) {
DEBUG(0, ("Error getting default value for '%s': %s\n",
@@ -373,7 +373,7 @@ static WERROR ldb_get_value(TALLOC_CTX *mem_ctx, struct hive_key *k,
} else {
/* normal value */
query = talloc_asprintf(mem_ctx, "(value=%s)", name);
- ret = ldb_search(c, kd->dn, &res, LDB_SCOPE_ONELEVEL, query, NULL, "%s", query);
+ ret = ldb_search(c, mem_ctx, &res, kd->dn, LDB_SCOPE_ONELEVEL, NULL, "%s", query);
talloc_free(query);
if (ret != LDB_SUCCESS) {
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c
index db11958026..aa94505041 100644
--- a/source4/rpc_server/winreg/rpc_winreg.c
+++ b/source4/rpc_server/winreg/rpc_winreg.c
@@ -496,7 +496,7 @@ static WERROR dcesrv_winreg_QueryValue(struct dcesrv_call_state *dce_call,
/* if the lookup wasn't successful, send client query back */
value_type = *r->in.type;
value_data.data = r->in.data;
- value_data.length = *r->in.length;
+ value_data.length = *r->in.data_length;
}
r->out.type = talloc(mem_ctx, uint32_t);
@@ -508,7 +508,7 @@ static WERROR dcesrv_winreg_QueryValue(struct dcesrv_call_state *dce_call,
if (!r->out.data_length) {
return WERR_NOMEM;
}
- *r->out.length = value_data.length;
+ *r->out.data_length = value_data.length;
r->out.data_size = talloc(mem_ctx, uint32_t);
if (!r->out.data_size) {
return WERR_NOMEM;