Issue 5581 - slapd: search.c:970: oc_filter: Assertion `f != ((void *)0)' failed.
Summary: slapd: search.c:970: oc_filter: Assertion `f != ((void *)0)' failed.
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-26 20:52 UTC by amg1127@cefetrs.tche.br
Modified: 2014-08-01 21:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description amg1127@cefetrs.tche.br 2008-06-26 20:52:50 UTC
Full_Name: Anderson M. Gomes
Version: 2.4.9 (but 2.4.10 has the bug)
OS: Ubuntu 8.04.1
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (189.58.241.178)


I submitted a bug report in Ubuntu's Launchpad. The address is:

https://bugs.launchpad.net/ubuntu/+source/openldap2.3/+bug/243337

The bug refers to 2.4.9, but it is reproducible in OpenLDAP 2.4.10 (I could
reproduce it, at least).

Comment 1 ando@openldap.org 2008-06-29 20:15:06 UTC
amg1127@cefetrs.tche.br wrote:

> I submitted a bug report in Ubuntu's Launchpad. The address is:
> 
> https://bugs.launchpad.net/ubuntu/+source/openldap2.3/+bug/243337
> 
> The bug refers to 2.4.9, but it is reproducible in OpenLDAP 2.4.10 (I could
> reproduce it, at least).

Your logs show something relatively odd: apparently, slapo-unique(5) is 
trying to perform an internal search with a really malformed filter:

==> unique_search ,
str2filter "(&objectClass=posixGroup(|(gidNumber=1000)))"
put_filter: "(&objectClass=posixGroup(|(gidNumber=1000)))"
put_filter: AND
put_filter_list "objectClass=posixGroup(|(gidNumber=1000))"

Can you please try using "(objectClass=posixGroup)" instead of 
"objectClass=posixGroup" as the unique_uri filter in your test slapd.conf?

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
Email:   ando@sys-net.it
-----------------------------------

Comment 2 ando@openldap.org 2008-06-29 20:19:27 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 3 amg1127@cefetrs.tche.br 2008-07-01 15:43:41 UTC
Strange... Apparently, your message did not reach my mail server...

Anyway... When I did your proposed change, the server did the right thing:

$ ./crash-server.sh
adding new entry "cn=bugtestgroup_3301,ou=groups,dc=cefetrs,dc=tche,dc=br"
ldap_add: Constraint violation (19)
         additional info: some attributes not unique

--------------------------

Humm... Now, I know why... Your mail server does not have a 'PTR record'...

Jul  1 08:59:20 cmi postfix/smtpd[26501]: NOQUEUE: reject: RCPT from  
unknown[194.244.21.122]: 450 4.7.1 Client host rejected: cannot find  
your hostname, [194.244.21.122]; from=<ando@sys-net.it>  
to=<amg1127@cefetrs.tche.br> proto=ESMTP helo=<mail2.sys-net.it>
Jul  1 10:09:19 cmi postfix/smtpd[30576]: NOQUEUE: reject: RCPT from  
unknown[194.244.21.122]: 450 4.7.1 Client host rejected: cannot find  
your hostname, [194.244.21.122]; from=<ando@sys-net.it>  
to=<amg1127@cefetrs.tche.br> proto=ESMTP helo=<mail2.sys-net.it>
Jul  1 11:19:22 cmi postfix/smtpd[3467]: NOQUEUE: reject: RCPT from  
unknown[194.244.21.122]: 450 4.7.1 Client host rejected: cannot find  
your hostname, [194.244.21.122]; from=<ando@sys-net.it>  
to=<amg1127@cefetrs.tche.br> proto=ESMTP helo=<mail2.sys-net.it>
Jul  1 12:29:20 cmi postfix/smtpd[10287]: NOQUEUE: reject: RCPT from  
unknown[194.244.21.122]: 450 4.7.1 Client host rejected: cannot find  
your hostname, [194.244.21.122]; from=<ando@sys-net.it>  
to=<amg1127@cefetrs.tche.br> proto=ESMTP helo=<mail2.sys-net.it>


# host 194.244.21.122
Host 122.21.244.194.in-addr.arpa not found: 3(NXDOMAIN)


-- 
Anderson Medeiros Gomes
amg1127@cefetrs.tche.br

Coordenadoria de Manutenção e Redes
Centro Federal de Educação Tecnológica de Pelotas
http://www.cefetrs.tche.br/


> Your logs show something relatively odd: apparently, slapo-unique(5)  
> is trying to perform an internal search with a really malformed  
> filter:
>
> ==> unique_search ,
> str2filter "(&objectClass=posixGroup(|(gidNumber=1000)))"
> put_filter: "(&objectClass=posixGroup(|(gidNumber=1000)))"
> put_filter: AND
> put_filter_list "objectClass=posixGroup(|(gidNumber=1000))"
>
> Can you please try using "(objectClass=posixGroup)" instead of  
> "objectClass=posixGroup" as the unique_uri filter in your test  
> slapd.conf?
>
> 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
> Email:   ando@sys-net.it
> -----------------------------------

Comment 4 Quanah Gibson-Mount 2008-07-09 23:45:37 UTC
changed notes
changed state Test to Release
Comment 5 Howard Chu 2008-07-20 18:29:12 UTC
changed state Release to Closed
Comment 6 stefw@redhat.com 2008-08-05 17:41:56 UTC
I get this problem with 2.4.11 (but not with 2.4.10). My slapo-unique
configuration is as follows:

unique_uri ldap:///?cn?sub
unique_uri ldap:///?uid,login?sub?(!(disabled=TRUE))

The filter seems valid to me, but please correct me if I'm wrong.

Comment 7 ando@openldap.org 2008-08-06 08:30:07 UTC
----- stef@memberwebs.com wrote:

> I get this problem with 2.4.11 (but not with 2.4.10). My slapo-unique
> configuration is as follows:
> 
> unique_uri ldap:///?cn?sub
> unique_uri ldap:///?uid,login?sub?(!(disabled=TRUE))
> 
> The filter seems valid to me, but please correct me if I'm wrong.

Does "disabled" exist?  I mean: is it defined __before__ this line in your slapd.conf?  Does TRUE comply with its syntax?  I've checked the fix to this bug, and it seems to mischeck the validity of the filter, so if what you specify in the "filter" field of the URI is not a valid filter, the string "(?=error)" shows up instead of the normalization of your filter, causing subsequent harm to filter evaluation.  This does not occur if the filter is valid, so there must be also an error on your side (I'm fixing the test, in the meanwhile, so that the error is notified while parsing the configuration).

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@sys-net.it
-----------------------------------

Comment 8 ando@openldap.org 2008-08-06 08:31:27 UTC
changed notes
changed state Closed to Open
Comment 9 ando@openldap.org 2008-08-06 08:32:26 UTC
I have re-opened this bug.  I have a fix, will commit ASAP.  I confirm the bug only seems to affect malformed filters in the URI.

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@sys-net.it
-----------------------------------

Comment 10 ando@openldap.org 2008-08-09 08:21:14 UTC
changed notes
changed state Open to Test
Comment 11 ando@openldap.org 2008-08-09 08:23:19 UTC
Should be re-fixed now in HEAD; please test.  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@sys-net.it
-----------------------------------

Comment 12 Quanah Gibson-Mount 2008-09-03 00:04:50 UTC
changed notes
changed state Test to Release
Comment 13 stefw@redhat.com 2008-09-24 11:20:39 UTC
Sorry for the delay. Yes I can confirm this has been fixed. Thanks for
your attention to this problem.

Pierangelo Masarati wrote:
> I have re-opened this bug.  I have a fix, will commit ASAP.  I confirm the bug only seems to affect malformed filters in the URI.
> 
> 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@sys-net.it
> -----------------------------------
> 
> 


Comment 14 ando@openldap.org 2008-10-15 16:01:23 UTC
changed notes
changed state Release to Closed
Comment 15 OpenLDAP project 2014-08-01 21:04:16 UTC
fixed in HEAD/RE24
re-fixed in HEAD
re-fixed in RE24