1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

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 8dd1c1c05b)
This commit is contained in:
Simo Sorce
2006-08-21 03:52:43 +00:00
committed by Gerald (Jerry) Carter
parent a1bc3fb02e
commit a46beefeb7
2 changed files with 51 additions and 13 deletions

View File

@ -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);