Skip to content

Commit

Permalink
always use a schema directory with symbolic links
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Aug 15, 2017
1 parent d7cdb08 commit 761c507
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Lib/slapdtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
See https://www.python-ldap.org/ for details.
$Id: slapdtest.py,v 1.17 2017/08/15 16:39:26 stroeder Exp $
$Id: slapdtest.py,v 1.18 2017/08/15 17:18:54 stroeder Exp $
Python compability note:
This module only works with Python 2.7.x since
Expand All @@ -25,7 +25,7 @@
SLAPD_CONF_TEMPLATE = r"""
serverID %(serverid)s
moduleload back_%(database)s
include "%(schema_include)s"
include "%(schema_prefix)s/core.schema"
loglevel %(loglevel)s
allow bind_v2
Expand Down Expand Up @@ -110,8 +110,6 @@ class SlapdObject(object):
SBINDIR = os.environ.get('SBIN', '/usr/sbin')
BINDIR = os.environ.get('BIN', '/usr/bin')
SCHEMADIR = os.environ.get('SCHEMA', '/etc/openldap/schema')
INIT_SCHEMA_FILE = os.environ.get('SCHEMA_FILE', 'core.schema')
INIT_SCHEMA_PATH = os.environ.get('SCHEMA_PATH', os.path.join(SCHEMADIR, INIT_SCHEMA_FILE))
PATH_LDAPADD = os.path.join(BINDIR, 'ldapadd')
PATH_LDAPMODIFY = os.path.join(BINDIR, 'ldapmodify')
PATH_LDAPWHOAMI = os.path.join(BINDIR, 'ldapwhoami')
Expand Down Expand Up @@ -180,7 +178,7 @@ def _gen_config(self):
"""
config_dict = {
'serverid': hex(self.server_id),
'schema_include': self.INIT_SCHEMA_PATH,
'schema_prefix':self._schema_prefix,
'loglevel': self.slapd_loglevel,
'database': self.database,
'directory': self._db_directory,
Expand Down

0 comments on commit 761c507

Please sign in to comment.