summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-08-21 03:52:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:19 -0500
commita46beefeb798f63a92f73b2658fd03fa96b55fcb (patch)
tree83b90e4c75de088f87e4d7dfc344d67cb4a66066 /source4
parenta1bc3fb02e27a3d12c9ef4d09ce012ebe4e03674 (diff)
downloadsamba-a46beefeb798f63a92f73b2658fd03fa96b55fcb.tar.gz
samba-a46beefeb798f63a92f73b2658fd03fa96b55fcb.tar.bz2
samba-a46beefeb798f63a92f73b2658fd03fa96b55fcb.zip
r17648: update minschema.js
this version returns also oMSyntax and oMObjectClass and also use the right value for the objects CNs add a nasty hack to ejs' mprLdbMessage() to handle binary blobs situations (This used to be commit 8dd1c1c05bc592d76d6e34b303048faf05c0fa6e)
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/ejs/mprutil.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source4/scripting/ejs/mprutil.c b/source4/scripting/ejs/mprutil.c
index 419cb4869e..e921b11475 100644
--- a/source4/scripting/ejs/mprutil.c
+++ b/source4/scripting/ejs/mprutil.c
@@ -184,7 +184,13 @@ static struct MprVar mprLdbMessage(struct ldb_context *ldb, struct ldb_message *
if (attr->ldif_write_fn(ldb, msg, &el->values[0], &v) != 0) {
goto failed;
}
- val = mprData(v.data, v.length);
+ /* FIXME: nasty hack, remove me when ejs will support
+ * arbitrary string and does not truncate on \0 */
+ if (strlen((char *)v.data) != v.length) {
+ val = mprDataBlob(v);
+ } else {
+ val = mprData(v.data, v.length);
+ }
} else {
int j;
val = mprArray(el->name);
@@ -193,7 +199,13 @@ static struct MprVar mprLdbMessage(struct ldb_context *ldb, struct ldb_message *
&el->values[j], &v) != 0) {
goto failed;
}
- mprAddArray(&val, j, mprData(v.data, v.length));
+ /* FIXME: nasty hack, remove me when ejs will support
+ * arbitrary string and does not truncate on \0 */
+ if (strlen((char *)v.data) != v.length) {
+ mprAddArray(&val, j, mprDataBlob(v));
+ } else {
+ mprAddArray(&val, j, mprData(v.data, v.length));
+ }
}
}
mprSetVar(&var, el->name, val);