summaryrefslogtreecommitdiffstats
path: root/lib/modules/openldap
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-05-14 21:53:14 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:53:26 +0200
commit334b7604727810c02ecb8942f3753dee15466691 (patch)
tree5a3abd1691c8d15a85ca3b41b4bb400e66b4691f /lib/modules/openldap
parent83ce4d28347d6bf7f8cd42e23465227548e3f878 (diff)
Upgrade the LDAP config to Jessie.
Diffstat (limited to 'lib/modules/openldap')
-rw-r--r--lib/modules/openldap2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/modules/openldap b/lib/modules/openldap
index 69ee4df..91e6a3c 100644
--- a/lib/modules/openldap
+++ b/lib/modules/openldap
@@ -33,41 +33,41 @@ import tempfile, atexit
indexedAttributes = frozenset([
'olcAttributeTypes',
'olcObjectClasses',
'olcAccess',
'olcSyncrepl',
'olcOverlay',
'olcLimits',
'olcAuthzRegexp',
'olcDbConfig',
])
# Another hack. Configuration entries sometimes pollutes the DNs with
# indices, thus it's not possible to directly use them as base.
# Instead, we use their parent as a pase, and search for the *unique*
# match with the same ObjectClass and the matching extra attributes.
# ('%s' in the attribute value is replaced with the value of the source
# entry.)
indexedDN = {
'olcSchemaConfig': [('cn', '{*}%s')],
- 'olcHdbConfig': [('olcDbDirectory', '%s' )],
+ 'olcMdbConfig': [('olcDbDirectory', '%s' )],
'olcOverlayConfig': [('olcOverlay', '%s' )],
}
# Allow for flexible ACLs for user using SASL's EXTERNAL mechanism.
# "username=postfix,cn=peercred,cn=external,cn=auth" is replaced by
# "gidNumber=106+uidNumber=102,cn=peercred,cn=external,cn=auth" where
# 102 is postfix's UID and 106 its primary GID.
# (Regular expressions are not allowed.)
sasl_ext_re = re.compile( r"""(?P<start>\sby\s+dn(?:\.exact)?)=
(?P<quote>['\"]?)username=(?P<user>[a-z][-a-z0-9_]*),
(?P<end>cn=peercred,cn=external,cn=auth)
(?P=quote)\s"""
, re.VERBOSE )
multispaces = re.compile( r"\s+" )
pwd_dict = {}
def acl_sasl_ext(m):
u = m.group('user')
if u not in pwd_dict.keys():
pwd_dict[u] = pwd.getpwnam(u)