mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
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 <metze@samba.org>
This commit is contained in:
parent
0180a027cb
commit
97389c3ec2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user