summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/registry/ldb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index 9b834faa98..b897641f33 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -162,6 +162,9 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx,
false);
if (ret2) {
ret = ldb_msg_add_value(msg, "data", val, NULL);
+ } else {
+ /* workaround for non-standard data */
+ ret = ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL);
}
} else {
ret = ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL);
@@ -181,6 +184,9 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx,
return NULL;
}
ret = ldb_msg_add_string(msg, "data", conv_str);
+ } else {
+ /* workaround for non-standard data */
+ ret = ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL);
}
} else {
ret = ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL);
@@ -199,6 +205,9 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx,
return NULL;
}
ret = ldb_msg_add_string(msg, "data", conv_str);
+ } else {
+ /* workaround for non-standard data */
+ ret = ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL);
}
} else {
ret = ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL);