From 97389c3ec24526837e91fcfcaf7439491fcdb214 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 1 Mar 2013 17:29:09 +1100 Subject: scripting: Correct parsing of binary DN The DN is of the form B:8:01020304:DC=samba,DC=example,DC=com. We need to account for the case where the 8 is actually (say) 16, and so not just one character. Andrew Bartlett Signed-off-by: Stefan Metzmacher --- python/samba/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') diff --git a/python/samba/common.py b/python/samba/common.py index e47f276f81..c2a3584732 100644 --- a/python/samba/common.py +++ b/python/samba/common.py @@ -81,7 +81,7 @@ class dsdb_Dn(object): raise RuntimeError("Invalid DN %s" % dnstring) prefix_len = 4 + len(colons[1]) + int(colons[1]) self.prefix = dnstring[0:prefix_len] - self.binary = self.prefix[4:-1] + self.binary = self.prefix[3+len(colons[1]):-1] self.dnstring = dnstring[prefix_len:] else: self.dnstring = dnstring -- cgit