[PATCH]: Fix interface version byte order in pidl

Julien Kerihuel j.kerihuel at openchange.org
Fri May 30 17:17:59 GMT 2008


The patch is incomplete. I'm currently fixing it and will post again to
the list when corrected.

On Fri, 2008-05-30 at 18:45 +0200, Julien Kerihuel wrote:
> Hi List,
> 
> This patch fixes the if_version generated by pidl in the server
> boilerplate code for an interface.
> 
> the ndr_syntax_id structure in misc.idl defines if_version as uint32_t
> but should be represented as:
>         uint16_t if_version;
>         uint16_t if_version_minor;
> 
> Using a unique uint32_t causes byte order problem for interfaces with a
> version minor different from 0. For example:
> 
> version(0.81)
>         * if_version:		 00
>         * if_version_minor: 	 81
>         * wire representation: 00 00 51 00
>         * ndr_syntax_id NDR code will pull uint32 if_version and store
>         5308416 (00 51 00 00), causing if_version to mismatch in
>         epmapper server code.
> 
> Theoretically, this problem should also affect server code for
> interfaces: trkwks, rot, w32time, frsapi.
> 
> Cheers,
> Julien.
> 
-- 
Julien Kerihuel
j.kerihuel at openchange.org
OpenChange Project Manager

GPG Fingerprint: 0B55 783D A781 6329 108A  B609 7EF6 FE11 A35F 1F79

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20080530/9e0bbe88/attachment.bin


More information about the samba-technical mailing list