According to slapo-unique(5) it is possible to specify several URLs in one domain (in single unique_uri dircetive).
I have in my slapd.conf settings like:
unique_uri ldap:///ou=lists,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMailAlias) ldap:///ou=aliases,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMailAlias)
But in OpenLDAP 2.4.31 all URLs except first one is silently ignored.
Debug logs show:
4ff309e3 line 208 (unique_uri ldap:///ou=lists,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMailAlias) ldap:///ou=aliases,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMailAlias)) 4ff309e3 ==> unique_new_domain ldap:///ou=lists,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMailAlias) ldap_url_parse_ext(ldap:///ou=lists,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMailAlias)) 4ff309e3 >>> dnPrettyNormal: <ou=lists,dc=example.ru,ou=mail,o=foo> 4ff309e3 <<< dnPrettyNormal: <ou=lists,dc=example.ru,ou=mail,o=foo>, <ou=lists,dc=example.ru,ou=mail,o=foo>
Prblem is around this code in servers/slapd/overlays/unique.c:
if ( c->line ) rc = unique_new_domain ( &domain, c->line, c ); else rc = unique_new_domain ( &domain, c->argv[1], c );
c->line is empty by some reason. c->argv[1] contains only first URL.
Is anybody know how to fix this bug? Is it normal, that c->line is empty?
--On Tuesday, July 03, 2012 8:05 PM +0400 Anton Yuzhaninov citrin@citrin.ru wrote:
According to slapo-unique(5) it is possible to specify several URLs in one domain (in single unique_uri dircetive).
I have in my slapd.conf settings like:
unique_uri ldap:///ou=lists,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMailA lias) ldap:///ou=aliases,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMai lAlias)
You should make those separate unique_uri lines, as per the man page.
--Quanah
--
Quanah Gibson-Mount Sr. Member of Technical Staff Zimbra, Inc A Division of VMware, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
03.07.2012 22:06, Quanah Gibson-Mount пишет:
According to slapo-unique(5) it is possible to specify several URLs in one domain (in single unique_uri dircetive).
I have in my slapd.conf settings like:
unique_uri ldap:///ou=lists,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMailA lias) ldap:///ou=aliases,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMai lAlias)
You should make those separate unique_uri lines, as per the man page.
Separate unique_uri lines will create separate unique domains, but I need unique cn across 2 different URLs.
from man page:
unique_uri <[strict ][ignore ]URI[URI...]...> Configure the base, attributes, scope, and filter for uniqueness checking. Multiple URIs may be specified within a domain, allowing complex selections of objects.
I tried to write in slapd.conf unique_uri "ldap:///ou=lists,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMailAlias) ldap:///ou=aliases,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMailAlias)"
But slapd eats 100% CPU right after start with this line...
Debug log show: 4ff3424b >>> dnPrettyNormal: <ou=aliases,dc=example.ru,ou=mail,o=foo> 4ff3424b <<< dnPrettyNormal: <ou=aliases,dc=example.ru,ou=mail,o=foo>, <ou=aliases,dc=example.ru,ou=mail,o=foo> put_filter: "(objectClass=nisMailAlias)" put_filter: simple put_simple_filter: "objectClass=nisMailAlias" ber_scanf fmt ({mm}) ber: 4ff3424b >>> dnPrettyNormal: <ou=aliases,dc=example.ru,ou=mail,o=foo> 4ff3424b <<< dnPrettyNormal: <ou=aliases,dc=example.ru,ou=mail,o=foo>, <ou=aliases,dc=example.ru,ou=mail,o=foo> put_filter: "(objectClass=nisMailAlias)" put_filter: simple put_simple_filter: "objectClass=nisMailAlias" ber_scanf fmt ({mm}) ber: 4ff3424b >>> dnPrettyNormal: <ou=aliases,dc=example.ru,ou=mail,o=foo> 4ff3424b <<< dnPrettyNormal: <ou=aliases,dc=example.ru,ou=mail,o=foo>, <ou=aliases,dc=example.ru,ou=mail,o=foo> put_filter: "(objectClass=nisMailAlias)" put_filter: simple put_simple_filter: "objectClass=nisMailAlias" ber_scanf fmt ({mm}) ber: 4ff3424b >>> dnPrettyNormal: <ou=aliases,dc=example.ru,ou=mail,o=foo> 4ff3424b <<< dnPrettyNormal: <ou=aliases,dc=example.ru,ou=mail,o=foo>, <ou=aliases,dc=example.ru,ou=mail,o=foo> put_filter: "(objectClass=nisMailAlias)" put_filter: simple
in infinite loop.
Anton Yuzhaninov wrote:
03.07.2012 22:06, Quanah Gibson-Mount пишет:
According to slapo-unique(5) it is possible to specify several URLs in one domain (in single unique_uri dircetive).
I have in my slapd.conf settings like:
unique_uri ldap:///ou=lists,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMailA lias) ldap:///ou=aliases,dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMai lAlias)
You should make those separate unique_uri lines, as per the man page.
Separate unique_uri lines will create separate unique domains, but I need unique cn across 2 different URLs.
I'm not sure what you mean with "domain". Why not use
ldap:///dc=example.ru,ou=mail,o=foo?cn?sub?(objectClass=nisMailAlias)
Unfortunately there's ITS#6825 (dup ITS#6917) which makes using filters in unique_uri impossible.
Ciao, Michael.
openldap-technical@openldap.org