>----- Original Message ----
>From: Pierangelo Masarati <ando(a)sys-net.it>
>To: vargok(a)yahoo.com
>Cc: openldap-its(a)openldap.org
>Sent: Monday, March 12, 2007 4:52:04 PM
>Subject: Re: (ITS#4868) Binary Attribute Patch(es)
>
>
>> These address the use of Binary-valued attributes (#3113, #3386):
>>
>> For example, inetOrgPerson.userCertificate is usually transferred with the
>> ";binary" directive. ";binary" is not handled by OpenLDAP/Back-SQL.
>
>Well, the solution you propose is not correct, since you are altering
>schema data, which is supposed to be read-only. In any case, the point is:
Yeah; I think the actual submission found the ";binary" and reset the
reference to it, not actually doing anything to it.
>- if we decide that back-sql should ignore tags, then the solution
>consists in using the canonical name of the underlying AttributeType
>when looking up data;
>
>- however, this would destroy the possibility to use different storages
>for differently encoded data; for example, a column for "cn;lang-en" and
>a column for "cn;lang-jp". I don't know how many users would prefer one
>solution over another, but in any case either we find a solution that
>preserves both capabilities or we choose one. I'd vote in favor of
>ignoring ";binary" since it's obsolete and related to transport only,
>but in favor of honoring language tags.
Sounds great to me. I just want support for ";binary" both on storage and
retrieval to be supported. I'll accept that it's obsolete -- I'll also put
forth that a lot of things still use it (e.g. Lotus Domino v6).
>> There remains an issue with selecting attributes using, e.g.,
>> "userCertificate;binary" -- nothing is returned. Someone with a better
>> understanding of the attribute-processing method would be much more effective in
>> terms of finding the correct place to remove the ";binary" from the
>> "attribute-name." (i.e. "userCertificate;binary" is NOT the attribute-name;
>> "userCertificate" is the attribute-name, ";binary" is a transport directive (see
>> #3113).
>
>In fact, "userCertificate;binary" is the attribute description. The
>attribute name is in ad_type->sat_cname.
And, in fact, none of what I did appears to have been sufficient. I'm
still looking at why selecting "userCertificate;binary" as part of an ldapsearch attribute-list doesn't pull the data. "userCertificate" does. The issue appears
to be related to the ad_inlist verification on the search-supplied attribute --
"userCertificate;binary" doesn't resolve.
If you know where I can look to figure this out, that would help. I've been
through some areas and not found exactly where just yet.
Thanks for your assistance.
Kevin Vargo
____________________________________________________________________________________
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
dieter(a)dkluenter.de wrote:
> Howard Chu <hyc(a)symas.com> writes:
>
>> What is the original rootdn?
>>
> cn=admin,o=avci,c=de
>
> -Dieter
>
I don't see anything like that here. You'll probably have to post your
slapd.conf. Have you checked for extraneous white space in the original
rootdn config?
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
Chief Architect, OpenLDAP http://www.openldap.org/project/
Howard Chu <hyc(a)symas.com> writes:
> What is the original rootdn?
>
cn=admin,o=avci,c=de
-Dieter
--
Dieter Klünter | Systemberatung
http://www.dkluenter.de
GPG Key ID:8EF7B6C6
Full_Name: Carsten Agger
Version: 2.3.20
OS: OSE
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (194.237.142.21)
On our architecture (OSE running on an AXE processor), time_t is an unsigned
int.
This means that this code, as found in the wait4msg function in
libraries/libldap/result.c, will break:
>
> if ( rc == LDAP_MSG_X_KEEP_LOOKING && tvp != NULL ) {
> tmp_time = time( NULL );
> tv0.tv_sec -= ( tmp_time - start_time );
> if ( tv0.tv_sec <= 0 ) {
> rc = 0; /* timed out */
> ld->ld_errno = LDAP_TIMEOUT;
> break;
> }
> tv.tv_sec = tv0.tv_sec;
> ...
> }
Why? Because if (start_time > tmp_time), the condition
( tv0.tv_sec <= 0 ) will never evaluate to TRUE, and the break will
never be executed - yielding an infinite loop.
Solution: rewrite in a portable way, e.g. (as suggested by Pierangelo Masarati
on
the bugs mailing list) by testing if the
value of tv_sec would be negative after subtracting ( tmp_time -
start_time ) before assigning it.
We have found a bug in libraries/libldap/result.c which may cause an
infinite loop in some situations.
The error is this, in the function wait4msg():
if ( rc == LDAP_MSG_X_KEEP_LOOKING && tvp != NULL ) {
tmp_time = time( NULL );
tv0.tv_sec -= ( tmp_time - start_time );
if ( tv0.tv_sec <= 0 ) {
rc = 0; /* timed out */
ld->ld_errno = LDAP_TIMEOUT;
break;
}
tv.tv_sec = tv0.tv_sec;
...
}
The problem is this: The check ( tv0.tv_sec <= 0 ) is always true, since tv_sec (on our
system, at least) is an unsigned int.
The problem is fixed by casting it to int:
if ( (int) tv0.tv_sec <= 0 ) {
...
}
however this might not be the most suitable way to fix it.
best regards,
Carsten Agger
Software Consultant,
TietoEnator A/S, Denmark
http://www.tietoenator.dk
Full_Name: Quanah Gibson-Mount
Version: 2.3/2.4/HEAD
OS: NA
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (171.66.155.86)
The slapd.conf(5) man page talks about the various ways in which indices can be
tuned, such as index_substr_if_maxlen, but it does not actually mention the
index directive. It may be worthwhile to have text like
[b]index[/b] See the man page for the specific backend you are using for more
information about the index directive {ex: slapd-bdb(5)}
so that users can more easily find that information (and the necessity to run
slapindex on bdb, for example)
etc.
vargok(a)yahoo.com wrote:
> These address the use of Binary-valued attributes (#3113, #3386):
The proposed patches have been applied (with changes) to HEAD code (you
should be able to easily generate the diffs between HEAD and re23 code);
please test. In detail, please check the solution for the ";binary"
issue. If you report the behavior as satisfactory, backporting to re23
could be an option, since the fix should be well isolated, and it
configures as borderline between new feature and bug fix.
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office: +39.02.23998309
Mobile: +39.333.4963172
Email: pierangelo.masarati(a)sys-net.it
------------------------------------------
Few preliminary comments follow.
vargok(a)yahoo.com wrote:
> Version: 2.3.32
You should rather patch HEAD code instead of released, and even not the
latest. However, given the development rate of back-sql (~0), it
shouldn't really matter
> These address the use of Binary-valued attributes (#3113, #3386):
>
> For example, inetOrgPerson.userCertificate is usually transferred with the
> ";binary" directive. ";binary" is not handled by OpenLDAP/Back-SQL.
Well, the solution you propose is not correct, since you are altering
schema data, which is supposed to be read-only. In any case, the point is:
- if we decide that back-sql should ignore tags, then the solution
consists in using the canonical name of the underlying AttributeType
when looking up data;
- however, this would destroy the possibility to use different storages
for differently encoded data; for example, a column for "cn;lang-en" and
a column for "cn;lang-jp". I don't know how many users would prefer one
solution over another, but in any case either we find a solution that
preserves both capabilities or we choose one. I'd vote in favor of
ignoring ";binary" since it's obsolete and related to transport only,
but in favor of honoring language tags.
> As well,
> the data itself, when stored in the database is not properly read out -- all
> data is read as SQL_C_CHAR data. This supports SQL_C_BINARY-based data.
This is just fine.
> There remains an issue with selecting attributes using, e.g.,
> "userCertificate;binary" -- nothing is returned. Someone with a better
> understanding of the attribute-processing method would be much more effective in
> terms of finding the correct place to remove the ";binary" from the
> "attribute-name." (i.e. "userCertificate;binary" is NOT the attribute-name;
> "userCertificate" is the attribute-name, ";binary" is a transport directive (see
> #3113).
In fact, "userCertificate;binary" is the attribute description. The
attribute name is in ad_type->sat_cname.
> Additionally, I included to the patch to remove the "assert(0)" in Back-SQL's
> verification that a search filter and ldap-data don't mis-match on suffix.
Fine, but already fixed.
> Tags: OpenLDAP, Back-SQL, MySQL, userCertificate, Binary Attributes, Client
> Certificates
>
>
> (1)
> ./servers/slapd/back-sql/search.c.patch
> Addressed ITS#4856 -- I think you already fixed this
>
> (2)
> ./servers/slapd/back-sql/back-sql.h.patch
> ./servers/slapd/back-sql/entry-id.c.patch
> ./servers/slapd/back-sql/sql-wrap.c.patch
> Address ITS#3113, ITS#3386
> Support for binary attribute values
>
> (3)
> ./servers/slapd/back-sql/schema-map.c.patch
> Addresses issue with accessing attributes that have been provided with
> ";binary" directive
>
> note that I have no doubts whatso ever that there are many better ways to do
> (3).
You made an extensive use of C++ style comments, which are non portable.
Obviously you didn't read the contribution guidelines.
I'm testing (and improving) it.
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office: +39.02.23998309
Mobile: +39.333.4963172
Email: pierangelo.masarati(a)sys-net.it
------------------------------------------