summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-23 00:24:32 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-23 00:26:01 +0100
commita6f5e495b1aa87982ee69c17b098e27010bed756 (patch)
tree465caa4d305094acd2406d35818684bdfe103a43
parentf39ef9866870d320ae0106dfd09a41c0451e9238 (diff)
downloadsamba-a6f5e495b1aa87982ee69c17b098e27010bed756.tar.gz
samba-a6f5e495b1aa87982ee69c17b098e27010bed756.tar.bz2
samba-a6f5e495b1aa87982ee69c17b098e27010bed756.zip
s4:registry - "LDB backend" - revert the length check for UTF16 strings
Let this do the "convert_string_talloc" function as it was before.
-rw-r--r--source4/lib/registry/ldb.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index ec0b33ab80..a4675c8a7e 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -155,16 +155,11 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx,
return NULL;
}
- /* Only when the "data.length" is dividable by two try
- * the charset conversion, otherwise stick with the
- * default of the "ret2" variable set to "false". */
- if (data.length % 2 == 0) {
- /* The data is provided as UTF16 string */
- ret2 = convert_string_talloc(mem_ctx, CH_UTF16, CH_UTF8,
- (void *)data.data, data.length,
- (void **)&val->data, &val->length,
- false);
- }
+ /* The data is provided as UTF16 string */
+ ret2 = convert_string_talloc(mem_ctx, CH_UTF16, CH_UTF8,
+ (void *)data.data, data.length,
+ (void **)&val->data, &val->length,
+ false);
if (ret2) {
ret = ldb_msg_add_value(msg, "data", val, NULL);
}