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

supporting range retrieval (ITS#3193)



Full_Name: Luke Howard
Version: 2.2.14
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (165.228.130.12)


I was looking at implementing support for range retrieval in our LinkEngine
plugin. This shouldn't involve any changes to slapd, however it turns out that
the '=' and '*' characters are not allowed in attribute tags. I haven't checked
the RFC here, it wouldn't surprise me if MS are violating it, but is there a way
we can support this in slapd?

My hackish patch follows.

Index: slap.h
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/slap.h,v
retrieving revision 1.452.2.21
diff -u -r1.452.2.21 slap.h
--- slap.h      16 Jun 2004 21:53:56 -0000      1.452.2.21
+++ slap.h      20 Jun 2004 16:07:25 -0000
@@ -142,7 +142,7 @@
 #define RDN_NEEDSESCAPE(c)     ((c) == '\\' || (c) == '"')
 
 #define DESC_LEADCHAR(c)       ( ASCII_ALPHA(c) )
-#define DESC_CHAR(c)   ( ASCII_ALNUM(c) || (c) == '-' )
+#define DESC_CHAR(c)   ( ASCII_ALNUM(c) || (c) == '-' || (c) == '=' || (c) ==
'*' )
 #define OID_LEADCHAR(c)        ( ASCII_DIGIT(c) )
 #define OID_SEPARATOR(c)       ( (c) == '.' )
 #define OID_CHAR(c)    ( OID_LEADCHAR(c) || OID_SEPARATOR(c) )