dcerpc_rts_cmd_ChannelLifetime ?

Julien Kerihuel j.kerihuel at openchange.org
Wed Dec 8 10:39:23 MST 2010


On Wed, 2010-12-08 at 18:14 +0100, Volker Lendecke wrote:
> Hi, Julien!
> 
> With latest master I am getting the following warning:
> 
> librpc/gen_ndr/ndr_dcerpc.c: In function 'ndr_pull_dcerpc_rts_cmd_ChannelLifetime':
> librpc/gen_ndr/ndr_dcerpc.c:1748: warning: integer constant is too large for 'long' type
> librpc/gen_ndr/ndr_dcerpc.c:1748: warning: comparison is always false due to limited range of data type
> 
> When looking at dcerpc.idl I see
> 
> /* RTS command: 0x4 */
> typedef [public] struct {
>         [range(0x20000,0x800000000)] uint32 ChannelLifetime;
> } dcerpc_rts_cmd_ChannelLifetime;
> 
> Counting 0's in the 0x800... I indeed find that this might
> be some too many. The alternative bug is that the uint32 is
> supposed to be a hyper.
> 

Hi Volker,

Looks like I indeed made a mistake here.

According to [MS-RPCH].pdf (confirmed with wireshark captures):
        ChannelLifetime (4 bytes): The channel lifetime, in bytes. This
        value MUST be in the inclusive range of 128 kilobytes through 2
        gigabytes.<16>

(1024 ^ 3) * 2 = 2147483648
good result: obase=16;2147483648 = 80000000
idl:                             0x800000000

I have unfortunately added an additional 0 in the IDL.

Regards,
Julien.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20101208/c71787e2/attachment.pgp>


More information about the samba-technical mailing list