summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-01-21 13:02:51 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-01-21 13:02:51 (GMT)
commit58ceea9cf45c12ff18df4d45a2590cb60cd21e26 (patch)
tree4a079cbf1ed30585f5636fa29d8794a2534f72aa
parent51138d19568e5a6305294ddc43d2c70d493a5158 (diff)
downloadkolab-scripts-58ceea9cf45c12ff18df4d45a2590cb60cd21e26.tar.gz
Add a domain base dn VLV index and search
-rwxr-xr-xpopulate-ldap/10a-add-vlv-searches.sh13
-rwxr-xr-xpopulate-ldap/10b-add-vlv-indexes.sh11
2 files changed, 24 insertions, 0 deletions
diff --git a/populate-ldap/10a-add-vlv-searches.sh b/populate-ldap/10a-add-vlv-searches.sh
index 28614c3..f802c08 100755
--- a/populate-ldap/10a-add-vlv-searches.sh
+++ b/populate-ldap/10a-add-vlv-searches.sh
@@ -38,3 +38,16 @@
echo ""
) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -c
+if [ "${domain_base_dn}" != "cn=kolab,cn=config" ]; then
+ (
+ echo "dn: cn=DVS,cn=${domain_db},cn=ldbm database,cn=plugins,cn=config"
+ echo "objectClass: top"
+ echo "objectClass: vlvSearch"
+ echo "cn: DVS"
+ echo "vlvBase: ${domain_base_dn}"
+ echo "vlvScope: 2"
+ echo "vlvFilter: (&(objectclass=domainrelatedobject)(!(objectclass=nstombstone)))"
+ echo "aci: (targetattr = \"*\") (version 3.0;acl \"Read Access\";allow (read,compare,search)(userdn = \"ldap:///anyone\");)"
+ echo ""
+ ) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -c
+fi
diff --git a/populate-ldap/10b-add-vlv-indexes.sh b/populate-ldap/10b-add-vlv-indexes.sh
index 8629a0a..19d49da 100755
--- a/populate-ldap/10b-add-vlv-indexes.sh
+++ b/populate-ldap/10b-add-vlv-indexes.sh
@@ -32,3 +32,14 @@
echo ""
) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -c
+if [ "${domain_base_dn}" != "cn=kolab,cn=config" ]; then
+ (
+ echo "dn: cn=DVI,cn=GVS,cn=${domain_db},cn=ldbm database,cn=plugins,cn=config"
+ echo "objectClass: top"
+ echo "objectClass: vlvIndex"
+ echo "cn: DVI"
+ echo "vlvSort: associateddomain"
+ echo "aci: (targetattr = \"*\") (version 3.0;acl \"Read Access\";allow (read,compare,search)(userdn = \"ldap:///anyone\");)"
+ echo ""
+ ) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -c
+fi