svn commit: samba r20286 - in branches/SAMBA_4_0/source/librpc/ndr:
.
metze at samba.org
metze at samba.org
Wed Dec 20 16:53:29 GMT 2006
Author: metze
Date: 2006-12-20 16:53:29 +0000 (Wed, 20 Dec 2006)
New Revision: 20286
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20286
Log:
handle the non oid string cases for pushing too
metze
Modified:
branches/SAMBA_4_0/source/librpc/ndr/ndr_drsuapi.c
Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_drsuapi.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/ndr/ndr_drsuapi.c 2006-12-20 16:34:35 UTC (rev 20285)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr_drsuapi.c 2006-12-20 16:53:29 UTC (rev 20286)
@@ -91,8 +91,17 @@
if (r->oid) {
DATA_BLOB blob;
- _OID_PUSH_CHECK(ber_write_OID_String(&blob, r->oid));
- talloc_steal(ndr, blob.data);
+ if (strncasecmp("ff", r->oid, 2) == 0) {
+ blob = strhex_to_data_blob(r->oid);
+ if (!blob.data) {
+ return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT,
+ "HEX String Conversion Error: %s\n",
+ __location__);
+ }
+ } else {
+ _OID_PUSH_CHECK(ber_write_OID_String(&blob, r->oid));
+ talloc_steal(ndr, blob.data);
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length));
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, blob.data, blob.length));
@@ -157,10 +166,16 @@
if (!oid) return 0;
- if (ber_write_OID_String(&_blob, oid)) {
- ret = _blob.length;
+ if (strncasecmp("ff", oid, 2) == 0) {
+ _blob = strhex_to_data_blob(oid);
+ if (_blob.data) {
+ ret = _blob.length;
+ }
+ } else {
+ if (ber_write_OID_String(&_blob, oid)) {
+ ret = _blob.length;
+ }
}
-
data_blob_free(&_blob);
return ret;
}
More information about the samba-cvs
mailing list