+ # Put the LDIF of the schema into a database so we can search on
+ # it to generate schema-dependent configurations in Fedora DS and
+ # OpenLDAP
+ os.path.join(paths.ldapdir, "schema-tmp.ldb")
+ schema.ldb.connect(schemadb_path)
+ schema.ldb.transaction_start()
+
+ # These bits of LDIF are supplied when the Schema object is created
+ schema.ldb.add_ldif(schema.schema_dn_add)
+ schema.ldb.modify_ldif(schema.schema_dn_modify)
+ schema.ldb.add_ldif(schema.schema_data)
+ schema.ldb.transaction_commit()
+
+ self.credentials = Credentials()
+ self.credentials.guess(lp)
+ #Kerberos to an ldapi:// backend makes no sense
+ self.credentials.set_kerberos_state(DONT_USE_KERBEROS)
+ self.ldap_backend_type = ldap_backend_type
+
+ if ldap_backend_type == "fedora-ds":
+ provision_fds_backend(self, paths=paths, setup_path=setup_path, names=names, message=message,
+ hostname=hostname, ldapadminpass=ldapadminpass, root=root,
+ schema=schema, ldap_backend_extra_port=ldap_backend_extra_port,
+ setup_ds_path=setup_ds_path, slapd_path=slapd_path,
+ nosync=nosync, ldap_dryrun_mode=ldap_dryrun_mode)
+
+ elif ldap_backend_type == "openldap":
+ provision_openldap_backend(self, paths=paths, setup_path=setup_path, names=names, message=message,
+ hostname=hostname, ldapadminpass=ldapadminpass, root=root,
+ schema=schema, ldap_backend_extra_port=ldap_backend_extra_port,
+ ol_mmr_urls=ol_mmr_urls,
+ slapd_path=slapd_path,
+ nosync=nosync, ldap_dryrun_mode=ldap_dryrun_mode)
+ else:
+ raise("Unknown LDAP backend type selected")