96 lines
3.8 KiB
Python
96 lines
3.8 KiB
Python
# -*- mode: python; coding: utf-8 -*-
|
|
|
|
include("ip")
|
|
include("secrets")
|
|
|
|
rid = admip()
|
|
# L'identifiant du réplica est choisi comme étant la dernière partie de l'adresse ip
|
|
rid = str(int(rid[rid.rfind(".")+1:])+255)
|
|
|
|
@dn: olcDatabase={1}bdb
|
|
@objectClass: olcDatabaseConfig
|
|
@objectClass: olcBdbConfig
|
|
@olcDatabase: {1}bdb
|
|
@olcSuffix: dc=crans,dc=org
|
|
@olcAccess: {0}to attrs=userPassword by dn.regex="cn=replica,dc=crans,dc=org"
|
|
@ write by dn.regex="cn=dovecot,dc=crans,dc=org" read by anonymous auth by s
|
|
@ elf write by * none
|
|
@olcAccess: {1}to dn.base="" by * read
|
|
@olcAccess: {2}to dn.regex="^(a|c)id=[0-9]+,ou=data,dc=crans,dc=org$$" attrs=m
|
|
@ ailAlias,canonicalAlias,uid,mail,entry,objectClass,contourneGreylist,rewriteM
|
|
@ ailHeaders,shadowExpire by dn.regex="cn=postfix,dc=crans,dc=org" read by *
|
|
@ +0 break
|
|
@olcAccess: {3}to dn.regex="^(a|c)id=[0-9]+,ou=data,dc=crans,dc=org$$" attrs=u
|
|
@ id,entry,objectClass,shadowExpire by dn.regex="cn=intranet,dc=crans,dc=org"
|
|
@ read by * +0 break
|
|
@olcAccess: {4}to dn.regex="^(a|c)id=[0-9]+,ou=data,dc=crans,dc=org$$" attrs=u
|
|
@ id,homeDirectory,uidNumber,gidNumber,userPassword,objectClass,entry,shadowExp
|
|
@ ire by dn.regex="cn=dovecot,dc=crans,dc=org" read by * +0 break
|
|
@olcAccess: {5}to * by group/labeledURIObject/labeledURI.exact="cn=adm,ou=grou
|
|
@ p,dc=crans,dc=org" write by group/labeledURIObject/labeledURI.exact="cn=resp
|
|
@ bats,ou=group,dc=crans,dc=org" read by * +0 break
|
|
@olcAccess: {6}to dn.regex="^(a|c)id=[0-9]+,ou=data,dc=crans,dc=org$$" attrs=u
|
|
@ id,homeDirectory,uidNumber,gidNumber,gecos,objectClass,entry by anonymous re
|
|
@ ad by * +0 break
|
|
@olcAccess: {7}to dn.base="ou=data,dc=crans,dc=org" by anonymous search by dn
|
|
@ .regex="cn=(postfix|intranet|dovecot),dc=crans,dc=org" search by * +0 break
|
|
@olcAccess: {8}to dn.subtree="ou=group,dc=crans,dc=org" by anonymous read by
|
|
@ * +0 break
|
|
@olcAccess: {9}to * by dn.regex="cn=admin,dc=crans,dc=org" write by dn.regex=
|
|
@ "cn=replica,dc=crans,dc=org" write by sockname.regex="ldapi" read by dn.reg
|
|
@ ex="cn=readonly,dc=crans,dc=org" read by self read by * none
|
|
@olcAddContentAcl: FALSE
|
|
@olcLastMod: TRUE
|
|
@olcMaxDerefDepth: 15
|
|
@olcReadOnly: FALSE
|
|
@olcRootDN: cn=admin,dc=crans,dc=org
|
|
@olcSyncUseSubentry: FALSE
|
|
@olcMonitoring: FALSE
|
|
@olcDbDirectory: /var/lib/ldap
|
|
@olcDbCacheSize: 1000
|
|
@olcDbConfig: {0}set_lg_max 5242880
|
|
@olcDbConfig: {1}set_cachesize 0 16777216 1
|
|
@olcDbConfig: {2}set_flags DB_LOG_AUTOREMOVE
|
|
@olcDbNoSync: FALSE
|
|
@olcDbDirtyRead: FALSE
|
|
@olcDbIDLcacheSize: 0
|
|
@olcDbIndex: objectClass eq
|
|
@olcDbIndex: entryUUID eq
|
|
@olcDbIndex: entryCSN eq
|
|
@olcDbIndex: cn eq,approx,sub
|
|
@olcDbIndex: aid eq
|
|
@olcDbIndex: mid eq
|
|
@olcDbIndex: cid eq
|
|
@olcDbIndex: rid eq
|
|
@olcDbIndex: fid eq
|
|
@olcDbIndex: uid eq
|
|
@olcDbIndex: uidNumber eq
|
|
@olcDbIndex: sn eq,approx,sub
|
|
@olcDbIndex: memberUid eq
|
|
@olcDbIndex: macAddress eq
|
|
@olcDbIndex: mailAlias eq
|
|
@olcDbIndex: mail eq
|
|
@olcDbIndex: canonicalAlias eq
|
|
@olcDbIndex: chbre eq,subinitial
|
|
@olcDbIndex: nom eq,approx,sub
|
|
@olcDbIndex: host eq,approx,sub
|
|
@olcDbIndex: hostAlias eq,approx,sub
|
|
@olcDbIndex: paiement eq
|
|
@olcDbIndex: droits eq
|
|
@olcDbLinearIndex: FALSE
|
|
@olcDbMode: 0600
|
|
@olcDbSearchStack: 16
|
|
@olcDbShmKey: 0
|
|
@olcDbCacheFree: 1
|
|
@olcDbDNcacheSize: 0
|
|
@structuralObjectClass: olcBdbConfig
|
|
@entryUUID: 55f5acc4-59fb-102f-9687-112b7bde9a51
|
|
@creatorsName: cn=config
|
|
@createTimestamp: 20100921183939Z
|
|
out('olcSyncrepl: {0}rid=%s provider=ldap://vert.adm.crans.org bindmethod=simple tim' % (rid))
|
|
out(' eout=0 network-timeout=0 binddn=%s ' % (secrets.ldap_replica_auth_dn))
|
|
out(' credentials=%s filter="(objectclass=*)" ' % (secrets.ldap_replica_password))
|
|
out(' searchbase="dc=crans,dc=org" scope=sub type=refreshAndPersist retry="30 20 300 +"')
|
|
@entryCSN: 20110227094521.639316Z#000000#000#000000
|
|
@modifiersName: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
|
|
@modifyTimestamp: 20110227094521Z
|