mirror of
https://github.com/samba-team/samba.git
synced 2025-02-05 21:57:51 +03:00
Registry server LDB backend REG_BINARY type: Save it directly in LDB
With this patch the REG_BINARY type is saved directly in a LDB registry database rather than converted in a hex-string.
This commit is contained in:
parent
80af62652b
commit
fcc93f68a0
@ -72,7 +72,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx,
|
||||
|
||||
case REG_BINARY:
|
||||
if (val != NULL)
|
||||
*data = strhex_to_data_blob((char *)val->data);
|
||||
*data = data_blob_talloc(mem_ctx, val->data, val->length);
|
||||
else {
|
||||
data->data = NULL;
|
||||
data->length = 0;
|
||||
@ -117,8 +117,10 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx,
|
||||
break;
|
||||
|
||||
case REG_BINARY:
|
||||
ldb_msg_add_string(msg, "data",
|
||||
data_blob_hex_string(mem_ctx, &data));
|
||||
if (data.length > 0)
|
||||
ldb_msg_add_value(msg, "data", &data, NULL);
|
||||
else
|
||||
ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL);
|
||||
break;
|
||||
|
||||
case REG_DWORD:
|
||||
|
Loading…
x
Reference in New Issue
Block a user