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:
committed by
Gerald (Jerry) Carter
parent
a1bc3fb02e
commit
a46beefeb7
@ -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);
|
||||
|
Reference in New Issue
Block a user