svn commit: samba r5084 - in branches/SAMBA_4_0/source/librpc: idl
ndr
tridge at samba.org
tridge at samba.org
Sat Jan 29 03:17:15 GMT 2005
Author: tridge
Date: 2005-01-29 03:17:14 +0000 (Sat, 29 Jan 2005)
New Revision: 5084
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5084
Log:
- handle arbitrary data in the NULL record reply type for nbt name queries
- fixed unaligned pulls at the end of the packet in the ndr lib
Modified:
branches/SAMBA_4_0/source/librpc/idl/nbt.idl
branches/SAMBA_4_0/source/librpc/ndr/libndr.h
branches/SAMBA_4_0/source/librpc/ndr/ndr.c
Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/nbt.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/nbt.idl 2005-01-29 03:12:00 UTC (rev 5083)
+++ branches/SAMBA_4_0/source/librpc/idl/nbt.idl 2005-01-29 03:17:14 UTC (rev 5084)
@@ -142,13 +142,13 @@
} nbt_rdata_status;
typedef struct {
- nbt_operation operation;
- } nbt_rdata_wack;
+ [flag(NDR_REMAINING)] DATA_BLOB data;
+ } nbt_rdata_data;
typedef [nodiscriminant] union {
[case(NBT_QTYPE_NETBIOS)] nbt_rdata_netbios netbios;
[case(NBT_QTYPE_STATUS)] nbt_rdata_status status;
- [case(NBT_QTYPE_NULL)] nbt_rdata_wack wack;
+ [default] nbt_rdata_data data;
} nbt_rdata;
typedef [flag(LIBNDR_PRINT_ARRAY_HEX)] struct {
Modified: branches/SAMBA_4_0/source/librpc/ndr/libndr.h
===================================================================
--- branches/SAMBA_4_0/source/librpc/ndr/libndr.h 2005-01-29 03:12:00 UTC (rev 5083)
+++ branches/SAMBA_4_0/source/librpc/ndr/libndr.h 2005-01-29 03:17:14 UTC (rev 5084)
@@ -185,7 +185,7 @@
} \
ndr->offset = (ndr->offset + (n-1)) & ~(n-1); \
} \
- if (ndr->offset >= ndr->data_size) { \
+ if (ndr->offset > ndr->data_size) { \
return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull align %u", n); \
} \
} while(0)
Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2005-01-29 03:12:00 UTC (rev 5083)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2005-01-29 03:17:14 UTC (rev 5084)
@@ -436,6 +436,8 @@
size_t sub_size,
struct ndr_pull *ndr2)
{
+ ndr2->flags = ndr->flags;
+
switch (sub_size) {
case 0: {
uint32_t size = ndr->data_size - ndr->offset;
More information about the samba-cvs
mailing list