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
------------------------------------------
The ITS is not for general software usage questions. Use the
ldap(a)umich.edu mailing list for general LDAP questions. This ITS will be
closed.
maruthigsr(a)gmail.com wrote:
> Full_Name: Maruthi Gullapudi
> Version:
> OS: AIX
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (194.221.133.211)
>
>
> Hi,
>
> I wanted to list all the users based on the value of one attribute using the
> LDAPSEARCH Command. The value of that attribute is NULL. I dont know whether
> LDAPSEARCH will capture null values.
>
> Can anyone tell me how to list users from an LDAP directory based on a NUll
> valued attribute.
>
> Thanks in Advance
> Maruthi
>
>
> .
>
--
-- 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/
Piotr.Golonka(a)cern.ch wrote:
> Indeed, 2.2.13 may be historical,
It is. It's not an opinion, but a fact. Even 2.2.30, the latest 2.2
release, is historical.
> yet this is the version used in large
> production systems (e.g. RedHat Enterprise Linux).
I believe the problem is not ours. I think we did our best by pushing
out 2.2 up to 2.2.30, then 2.3 up to 2.3.34, and now 2.4. If
distributions don't catch up I don't think anyone can blame OpenLDAP
(and I don't think you are; I'm just trying to make the point).
> I'll try to have a look at what's in 2.4.
I hope I get my point: every contribution is welcome, but not every
contribution may be useful. Writing howtos for code that was released
ages ago, and is not maintained may be considered little useful. This
is an opinion, of course.
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
------------------------------------------