1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

ms_schema: Allow for CN=X and DC=X replacements

These occur in the newer 2012 and 2016 schemas.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Garming Sam 2016-09-19 13:52:54 +12:00 committed by Andrew Bartlett
parent f4286f3516
commit ed6a3ddb2a

View File

@ -162,6 +162,10 @@ def fix_dn(dn):
dn = dn.replace("\n ", "")
dn = dn.replace(" ", "")
return dn.replace("CN=Schema,CN=Configuration,<RootDomainDN>", "${SCHEMADN}")
elif dn.endswith("DC=X"):
return dn.replace("CN=Schema,CN=Configuration,DC=X", "${SCHEMADN}")
elif dn.endswith("CN=X"):
return dn.replace("CN=Schema,CN=Configuration,CN=X", "${SCHEMADN}")
else:
return dn