Ndr_unpack() problem

Jelmer Vernooij jelmer at samba.org
Mon Jan 26 15:58:44 GMT 2009


Hi Zahari,

On Mon, 2009-01-26 at 15:41 +0200, Zahari Zahariev wrote:
> It seems to be the problem that in a unittest file ldap.py alike I want 
> to ndr_pack() a object of type security.descriptor initializing it with 
> security.descriptor.from_sddl(). After that the already packed object is 
> about to be unpacked with ndr_unpack() passing as first argument the 
> same object type security.descriptor. Unfortunately it exits during 
> ndr_unpack() with:
> 
> ***
> error: Adding user basic tests [
> Traceback (most recent call last):
>  File "./lib/ldb/tests/python/acl.py", line 101, in test_acl_useradd
>    xUnpacked = ndr_unpack( security.descriptor, xPacked )
>  File "bin/python/samba/ndr.py", line 27, in ndr_unpack
>    object.__ndr_unpack__(data)
> RuntimeError: (-1073741777, 'NT_STATUS_PORT_MESSAGE_TOO_LONG')
> ***
> 
> Why can't the packed date be unpacked ?
Looking at the source code, this seems to happen when not all bytes in
the data variable are consumed. We should probably be mapping this to a
more appropriate error code or not mapping it at all.. 

I'm not sure why there are bytes left unconsumed and how many. 

Cheers,

Jelmer
-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20090126/f597937b/attachment.bin


More information about the samba-technical mailing list