[PATCH] drsuapi.idl: Manage all possible lengths of DsBindInfo

Stefan (metze) Metzmacher metze at samba.org
Sun Jul 6 04:08:20 MDT 2014


Am 04.07.2014 17:08, schrieb Samuel Cabrero:
> Hello,
> 
> we have reports about samba not able to join to domain and crashing with
> the following exception:
> 
> 'drsuapi.DsBindInfoFallBack' object has no attribute 'supported_extensions'
> 
> Digging into the problem it seems to be in the drsuapi IDL. The
> DsBindInfo blob returned by the server is decoded in the IDL, based on
> the blob length. For some reason, some servers are returning a 32 bytes
> length blob, which is not decoded, so it falls into the default case and
> python bindings crash.
> 
> Reviewing the documentation [MS-DRSR], it is possible the server not to
> push the object GUID of the configuration NC, so I have added that case
> and also the one to decode the blob returned by W2K12 R2 which is 52 bytes.

Thanks for the patches!

If you don't mind I'd prefer to have the switch statements ordered more
consistently.
Either:

case 24:
case 28:
case 32:
case 48:
case 52:

or

case 52:
case 48:
case 32:
case 28:
case 24:

But please don't keep

case 48:
case 28:
case 32:
case 52:

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140706/9b99e469/attachment.pgp>


More information about the samba-technical mailing list