[Date Prev][Date Next] [Chronological] [Thread] [Top]

Odd handling of undefined values for filters (ITS#2472)



Full_Name: Quanah Gibson-mount
Version: 2.1.17+indexing patch
OS: Solaris 8
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (171.66.182.82)


When performing a search similar to the following:

cat newtest.pl
#!/usr/local/bin/perl
$x=undef
$blah=`/usr/local/bin/ldapsearch -h ldap-test2 uid=$x sumaildrop`;

What I see in the logs is:

Apr 27 17:45:25 ldap-test2.Stanford.EDU slapd[24145]: [ID 848112 local4.debug]
conn=462 fd=11 ACCEPT from IP=171.64.19.55:34842 (IP=0.0.0.0:389)
Apr 27 17:45:25 ldap-test2.Stanford.EDU slapd[24145]: [ID 902418 local4.debug]
conn=462 op=0 SRCH base="" scope=0 filter="(objectClass=*)"
Apr 27 17:45:25 ldap-test2.Stanford.EDU slapd[24145]: [ID 706578 local4.debug]
conn=462 op=0 SRCH attr=supportedSASLMechanisms
Apr 27 17:45:25 ldap-test2.Stanford.EDU slapd[24145]: [ID 217296 local4.debug]
conn=462 op=0 RESULT tag=101 err=0 text=
Apr 27 17:45:25 ldap-test2.Stanford.EDU slapd[24145]: [ID 347666 local4.debug]
conn=462 op=1 BIND dn="" method=163
Apr 27 17:45:25 ldap-test2.Stanford.EDU slapd[24145]: [ID 951063 local4.debug]
conn=462 op=3 BIND authcid="quanah@stanford.edu"
Apr 27 17:45:25 ldap-test2.Stanford.EDU slapd[24145]: [ID 996101 local4.debug]
conn=462 op=3 BIND dn="uid=quanah,cn=accounts,dc=stanford,dc=edu" mech=GSSAPI
ssf=56
Apr 27 17:45:25 ldap-test2.Stanford.EDU slapd[24145]: [ID 902418 local4.debug]
conn=462 op=4 SRCH base="dc=stanford,dc=edu" scope=2 filter="(?=undefined)"
Apr 27 17:45:25 ldap-test2.Stanford.EDU slapd[24145]: [ID 706578 local4.debug]
conn=462 op=4 SRCH attr=sumaildrop

This seems related to ITS#2470 from the ldap log of the time it core dumped.  I
guess I'd expect it to refuse to search on uid=<undefined> rather than actually
go through a search like it does, setting everything undefined...

--Quanah