From 507e75ebb9bcacc1e75cb13af77a9fc08c49015f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 5 Jan 2012 16:34:02 +0100 Subject: s4:python/samba/ndr.py: add an optional 'allow_remaining' to ndr_unpack() metze Autobuild-User: Stefan Metzmacher Autobuild-Date: Mon Jan 9 10:28:30 CET 2012 on sn-devel-104 --- source4/scripting/python/samba/ndr.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/scripting') diff --git a/source4/scripting/python/samba/ndr.py b/source4/scripting/python/samba/ndr.py index ccab1123d9..39e4a482ef 100644 --- a/source4/scripting/python/samba/ndr.py +++ b/source4/scripting/python/samba/ndr.py @@ -33,15 +33,16 @@ def ndr_pack(object): return ndr_pack() -def ndr_unpack(cls, data): +def ndr_unpack(cls, data, allow_remaining=False): """NDR unpack an object. :param cls: Class of the object to unpack :param data: Buffer to unpack + :param allow_remaining: allows remaining data at the end (default=False) :return: Unpacked object """ object = cls() - object.__ndr_unpack__(data) + object.__ndr_unpack__(data, allow_remaining=allow_remaining) return object -- cgit