'Writes the slapd.conf file out, and returns the path to it.'

def _write_config(self):

    path = os.path.join(self._tmpdir, 'slapd.conf')
    ldif_dir = mkdirs(self._tmpdir)
    if os.access(path, os.F_OK):
        self._log.debug('deleting    existing    %s', path)
        os.remove(path)
    self._log.debug('writing    config    to    %s', path)
    file(path, 'w').writelines([(line + '\n') for line in self._config])
    return path
