from .config import LDAPMigrationConfiguration
-__version__ = '0.9.9'
+__version__ = '0.9.10'
LOG = logging.getLogger(__name__)
CFG_BASENAME = 'ldap-migration.ini'
re_token_split = re.compile(r'^\s*([a-z0-9]+)\s*=\s*(\S(?:.*\S)?)\s*$', re.IGNORECASE)
re_plus_in_cn = re.compile(r'(?P<before>\S)(?:\s+\+\s+|\s+\+|\+\s+)\s*(?P<after>\S)')
+ rev_dn_samba_computers = 'o=isp:o=pixelpark:ou=Applications:ou=Unix NSS:ou=SambaComputers'
+
tz = get_localzone()
# -------------------------------------------------------------------------
tgt_dn = self.mangle_dn(src_dn)
rev_dn = self.get_reverse_dn(tgt_dn)
+
+ if (rev_dn.lower().startswith(self.rev_dn_samba_computers.lower()) and
+ tgt_dn.lower().startswith('uid=')):
+ LOG.info("Entry {!r} is a Samba Computer entry and will not be migrated.".format(
+ src_dn))
+ return False
+
LOG.debug("Migrating source DN {sdn!r} -> {tdn!r}.".format(
sdn=src_dn, tdn=tgt_dn))