mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Create LDAP indeces on installation for fields the web GUI searches against
This commit is contained in:
parent
c116f8d739
commit
3c8cfd94bd
@ -7,6 +7,7 @@ app_DATA = \
|
|||||||
bootstrap-template.ldif \
|
bootstrap-template.ldif \
|
||||||
default-aci.ldif \
|
default-aci.ldif \
|
||||||
kerberos.ldif \
|
kerberos.ldif \
|
||||||
|
indeces.ldif \
|
||||||
bind.named.conf.template\
|
bind.named.conf.template\
|
||||||
bind.zone.db.template \
|
bind.zone.db.template \
|
||||||
certmap.conf.template \
|
certmap.conf.template \
|
||||||
|
57
ipa-server/ipa-install/share/indeces.ldif
Normal file
57
ipa-server/ipa-install/share/indeces.ldif
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
dn: cn=krbPrincipalName,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
|
||||||
|
changetype: add
|
||||||
|
objectClass:top
|
||||||
|
objectClass:nsIndex
|
||||||
|
cn:krbPrincipalName
|
||||||
|
nsSystemIndex:false
|
||||||
|
nsIndexType:eq
|
||||||
|
nsIndexType:sub
|
||||||
|
|
||||||
|
dn: cn=ou,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
|
||||||
|
changetype: add
|
||||||
|
objectClass:top
|
||||||
|
objectClass:nsIndex
|
||||||
|
cn:ou
|
||||||
|
nsSystemIndex:false
|
||||||
|
nsIndexType:eq
|
||||||
|
nsIndexType:sub
|
||||||
|
|
||||||
|
dn: cn=carLicense,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
|
||||||
|
changetype: add
|
||||||
|
objectClass:top
|
||||||
|
objectClass:nsIndex
|
||||||
|
cn:carLicense
|
||||||
|
nsSystemIndex:false
|
||||||
|
nsIndexType:eq
|
||||||
|
nsIndexType:sub
|
||||||
|
|
||||||
|
dn: cn=title,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
|
||||||
|
changetype: add
|
||||||
|
objectClass:top
|
||||||
|
objectClass:nsIndex
|
||||||
|
cn:title
|
||||||
|
nsSystemIndex:false
|
||||||
|
nsIndexType:eq
|
||||||
|
nsIndexType:sub
|
||||||
|
|
||||||
|
dn: cn=manager,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
|
||||||
|
changetype: add
|
||||||
|
objectClass:top
|
||||||
|
objectClass:nsIndex
|
||||||
|
cn:manager
|
||||||
|
nsSystemIndex:false
|
||||||
|
nsIndexType:eq
|
||||||
|
|
||||||
|
dn: cn=displayname,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
|
||||||
|
changetype: add
|
||||||
|
objectClass:top
|
||||||
|
objectClass:nsIndex
|
||||||
|
cn:displayname
|
||||||
|
nsSystemIndex:false
|
||||||
|
nsIndexType:eq
|
||||||
|
nsIndexType:sub
|
||||||
|
|
||||||
|
dn: cn=uid,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
|
||||||
|
changetype: modify
|
||||||
|
add: nsIndexType
|
||||||
|
nsIndexType:sub
|
@ -81,6 +81,7 @@ class DsInstance:
|
|||||||
self.__create_instance()
|
self.__create_instance()
|
||||||
self.__add_default_schemas()
|
self.__add_default_schemas()
|
||||||
self.__add_memberof_module()
|
self.__add_memberof_module()
|
||||||
|
self.__create_indeces()
|
||||||
self.__enable_ssl()
|
self.__enable_ssl()
|
||||||
self.__certmap_conf()
|
self.__certmap_conf()
|
||||||
try:
|
try:
|
||||||
@ -194,6 +195,19 @@ class DsInstance:
|
|||||||
print "Failed to add default ds layout", e
|
print "Failed to add default ds layout", e
|
||||||
logging.debug("Failed to add default ds layout %s" % e)
|
logging.debug("Failed to add default ds layout %s" % e)
|
||||||
|
|
||||||
|
def __create_indeces(self):
|
||||||
|
txt = template_file(SHARE_DIR + "indeces.ldif", self.sub_dict)
|
||||||
|
inf_fd = write_tmp_file(txt)
|
||||||
|
logging.debug("adding/updating indeces")
|
||||||
|
args = ["/usr/bin/ldapmodify", "-xv", "-D", "cn=Directory Manager",
|
||||||
|
"-w", self.dm_password, "-f", inf_fd.name]
|
||||||
|
try:
|
||||||
|
run(args)
|
||||||
|
logging.debug("done adding/updating indeces")
|
||||||
|
except subprocess.CalledProcessError, e:
|
||||||
|
print "Failed to add default ds layout", e
|
||||||
|
logging.debug("Failed to add/update indeces %s" % e)
|
||||||
|
|
||||||
def __certmap_conf(self):
|
def __certmap_conf(self):
|
||||||
logging.debug("configuring certmap.conf for ds instance")
|
logging.debug("configuring certmap.conf for ds instance")
|
||||||
dirname = self.config_dirname()
|
dirname = self.config_dirname()
|
||||||
|
Loading…
Reference in New Issue
Block a user