ando(a)sys-net.it wrote:
> The soc_cname of undefined objectClasses generated by oc_bvfind_undef() is not
> NUL-terminated. A recent commit, where a string-based function operated on it
> unvealed the issue. Fixing...
For the records: spotted by valgrind.
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Fax: +39 0382 476497
Email: ando(a)sys-net.it
-----------------------------------
Full_Name: Pierangelo Masarati
Version: HEAD/re24/re23
OS: irrelevant
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (81.72.89.40)
Submitted by: ando
The soc_cname of undefined objectClasses generated by oc_bvfind_undef() is not
NUL-terminated. A recent commit, where a string-based function operated on it
unvealed the issue. Fixing...
p.
Pierangelo Masarati wrote:
> hyc(a)symas.com wrote:
>
>>>>> The backend server is a Novell eDirectory and the proxy don't have
>>>>> information about the complete schema.
>>>> I suspect the remote server is returning an objectClass that is unknown
>>>> to the proxy; for example, ndsLoginProperties. So, not ours :)
>>> I could reproduce the issue by caching an entry with an objectClass not
>>> known to the proxy :). So the "right" solution consists in fixing the
>>> proxy's schema. Of course, OpenLDAP could inform the proxy
>>> administrator with some intelligible message or, even better, try to
>>> repair itself (e.g. by checking the remote server's subschemaSubentry).
>>>
>> Probably not a good idea to do that automagically. Perhaps with a config
>> switch.
>
> Right. I'll fix it.
Actually... I think the original patch was fine. I meant, checking the remote
server's subschema should be optional... ;)
>
>> Also, not a good idea to import miscellaneous foreign schema globally;
>> we should implement per-database schema instead.
>
> I think per-database subschema has been on the todolist since ever or so :)
And now we have another reason to do it.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Howard Chu wrote:
>> Right. I'll fix it.
>
> Actually... I think the original patch was fine. I meant, checking the
> remote server's subschema should be optional... ;)
Too late :) well, I don't like too much the idea of having yet another
fine-tune parameter in config, but this change could impact users that
need to proxy well-configured systems and, say, cache entries with huge
member lists or so... so better make diversion from original behavior
optional, if the original behavior is safe in sane setups.
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Fax: +39 0382 476497
Email: ando(a)sys-net.it
-----------------------------------
Full_Name: Pierangelo Masarati
Version: HEAD
OS: irrelevant
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (81.72.89.40)
Submitted by: ando
Currently, slapd canonicalizes undef (or proxied) attribute names by making them
uppercased. It should do the same with undef objectClass names.
A patch is coming.
p.
hyc(a)symas.com wrote:
>>>> The backend server is a Novell eDirectory and the proxy don't have
>>>> information about the complete schema.
>>> I suspect the remote server is returning an objectClass that is unknown
>>> to the proxy; for example, ndsLoginProperties. So, not ours :)
>> I could reproduce the issue by caching an entry with an objectClass not
>> known to the proxy :). So the "right" solution consists in fixing the
>> proxy's schema. Of course, OpenLDAP could inform the proxy
>> administrator with some intelligible message or, even better, try to
>> repair itself (e.g. by checking the remote server's subschemaSubentry).
>>
> Probably not a good idea to do that automagically. Perhaps with a config
> switch.
Right. I'll fix it.
> Also, not a good idea to import miscellaneous foreign schema globally;
> we should implement per-database schema instead.
I think per-database subschema has been on the todolist since ever or so :)
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Fax: +39 0382 476497
Email: ando(a)sys-net.it
-----------------------------------
ando(a)sys-net.it wrote:
> ando(a)sys-net.it wrote:
>> quanah(a)zimbra.com wrote:
>>
>>> test_filter returned LDAP_INVALID_SYNTAX.
>> I think the culprit of the issue is here ^^^
>>
>> > | dn: cn=blank,o=Example
>> > | queryId: c975e84a-0e16-102d-8355-4be7c415200f
>> > | queryId: 9b7f1afa-0e17-102d-8bae-452c11e3ff2d
>> > | objectClass: inetOrgPerson
>> > | objectClass: organizationalPerson
>> > | objectClass: person
>> > | objectClass: ndsLoginProperties
>> > | objectClass: top
>> >
>>> The backend server is a Novell eDirectory and the proxy don't have
>>> information about the complete schema.
>> I suspect the remote server is returning an objectClass that is unknown
>> to the proxy; for example, ndsLoginProperties. So, not ours :)
>
> I could reproduce the issue by caching an entry with an objectClass not
> known to the proxy :). So the "right" solution consists in fixing the
> proxy's schema. Of course, OpenLDAP could inform the proxy
> administrator with some intelligible message or, even better, try to
> repair itself (e.g. by checking the remote server's subschemaSubentry).
>
Probably not a good idea to do that automagically. Perhaps with a config
switch. Also, not a good idea to import miscellaneous foreign schema globally;
we should implement per-database schema instead.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Probably, a more consistent behavior would be to refuse caching queries
containing entries that do not pass normalization.
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Fax: +39 0382 476497
Email: ando(a)sys-net.it
-----------------------------------
ando(a)sys-net.it wrote:
> quanah(a)zimbra.com wrote:
>
>> test_filter returned LDAP_INVALID_SYNTAX.
>
> I think the culprit of the issue is here ^^^
>
> > | dn: cn=blank,o=Example
> > | queryId: c975e84a-0e16-102d-8355-4be7c415200f
> > | queryId: 9b7f1afa-0e17-102d-8bae-452c11e3ff2d
> > | objectClass: inetOrgPerson
> > | objectClass: organizationalPerson
> > | objectClass: person
> > | objectClass: ndsLoginProperties
> > | objectClass: top
> >
>> The backend server is a Novell eDirectory and the proxy don't have
>> information about the complete schema.
>
> I suspect the remote server is returning an objectClass that is unknown
> to the proxy; for example, ndsLoginProperties. So, not ours :)
I could reproduce the issue by caching an entry with an objectClass not
known to the proxy :). So the "right" solution consists in fixing the
proxy's schema. Of course, OpenLDAP could inform the proxy
administrator with some intelligible message or, even better, try to
repair itself (e.g. by checking the remote server's subschemaSubentry).
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Fax: +39 0382 476497
Email: ando(a)sys-net.it
-----------------------------------