diff --git a/python/samba/schema.py b/python/samba/schema.py index 6f71dd8fa40..6aa0ddbe05c 100644 --- a/python/samba/schema.py +++ b/python/samba/schema.py @@ -28,6 +28,7 @@ from samba.dcerpc import security from samba.ms_schema import read_ms_schema from samba.ndr import ndr_pack from samba.samdb import SamDB +from samba.compat import get_string from samba import dsdb from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL import os @@ -112,7 +113,8 @@ class Schema(object): if files is not None: for file in files: - self.schema_data += open(file, 'rb').read() + data = get_string(open(file, 'rb').read()) + self.schema_data += data self.schema_data = substitute_var(self.schema_data, {"SCHEMADN": schemadn})