Article View: fj.net.ldap
Article #68openldap filters
From: Guenther Starnberger
Date: Sun, 12 Aug 2001 12:07
Date: Sun, 12 Aug 2001 12:07
36 lines
2221 bytes
2221 bytes
hello,
i have a problem using openldap 2.0 and filters (i'm not sure if its
openldap specific or not).
i would like to create a user directory with a field storing the date when
the user was last contacted. (i'm going to use seconds since the begin of
the epoch because i think that's the easiest solution).
i made a test schema with one integer field for the seconds, but when i try
to search for values greater or less than a specific value, ldap doesn't
return anything (no error, but only an empty list).
my filter expression is: (myFoo>=8129)
i tested it with python-ldap and a gnome directory browser called gq.
the python code is:
res = l.search_s(
"ou=editors, o=sysfrog.org",
ldap.SCOPE_SUBTREE,
"(myFoo=8129)",
)
i have defined the attribute with:
attributetype ( 1.1.2.1.2 NAME 'myFoo'
DESC 'just a test'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
SINGLE-VALUE )
does anybody know what's the reason for this behaviour. i'm new to ldap but
afaik it should be possible to search for "greater than" "less than"
expressions.
thanks,
/gst
Technical Details
Message-ID:
<997618395.583484@newsmaster-04.atnet.at>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!newscore.univie.ac.at!newsmaster-01.atnet.at!newsmaster-03.atnet.at!atnet.at!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103627,bc9969c7ab3d302b,start X-Google-Attributes: gid103627,public X-Google-ArrivalTime: 2001-08-12 05:07:20 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!newscore.univie.ac.at!newsmaster-01.atnet.at!newsmaster-03.atnet.at!atnet.at!not-for-mail From: Guenther Starnberger <gst@gst.priv.at> Newsgroups: fj.net.ldap Subject: openldap filters Date: Sun, 12 Aug 2001 14:07:17 +0200 Organization: sysfrog.org Lines: 37 Message-ID: <997618395.583484@newsmaster-04.atnet.at> NNTP-Posting-Host: newsmaster-04.atnet.at Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: newsmaster-03.vbs.at 997618038 96554 194.152.166.101 (12 Aug 2001 12:07:18 GMT) X-Complaints-To: abuse@atnet.at NNTP-Posting-Date: Sun, 12 Aug 2001 12:07:18 +0000 (UTC) User-Agent: KNode/0.4 Cache-Post-Path: newsmaster-04.atnet.at!unknown@62.116.93.213 X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)