Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
665272dc
Commit
665272dc
authored
Jun 19, 2000
by
Kurt Zeilenga
Browse files
Minor adjustments to substrings searching
parent
e7791e2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/slapd/filterentry.c
View file @
665272dc
...
...
@@ -21,7 +21,7 @@ static int test_filter_and( Backend *be,
static
int
test_filter_or
(
Backend
*
be
,
Connection
*
conn
,
Operation
*
op
,
Entry
*
e
,
Filter
*
flist
);
static
int
test_substring_filter
(
Backend
*
be
,
static
int
test_substring
s
_filter
(
Backend
*
be
,
Connection
*
conn
,
Operation
*
op
,
Entry
*
e
,
Filter
*
f
);
static
int
test_ava_filter
(
Backend
*
be
,
...
...
@@ -75,7 +75,7 @@ test_filter(
case
LDAP_FILTER_SUBSTRINGS
:
Debug
(
LDAP_DEBUG_FILTER
,
" SUBSTRINGS
\n
"
,
0
,
0
,
0
);
rc
=
test_substring_filter
(
be
,
conn
,
op
,
e
,
f
);
rc
=
test_substring
s
_filter
(
be
,
conn
,
op
,
e
,
f
);
break
;
case
LDAP_FILTER_GE
:
...
...
@@ -310,7 +310,7 @@ test_filter_or(
static
int
test_substring_filter
(
test_substring
s
_filter
(
Backend
*
be
,
Connection
*
conn
,
Operation
*
op
,
...
...
@@ -320,7 +320,7 @@ test_substring_filter(
{
Attribute
*
a
;
Debug
(
LDAP_DEBUG_FILTER
,
"begin test_substring_filter
\n
"
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_FILTER
,
"begin test_substring
s
_filter
\n
"
,
0
,
0
,
0
);
if
(
be
!=
NULL
&&
!
access_allowed
(
be
,
conn
,
op
,
e
,
f
->
f_sub_desc
,
NULL
,
ACL_SEARCH
)
)
...
...
@@ -358,6 +358,6 @@ test_substring_filter(
}
}
Debug
(
LDAP_DEBUG_FILTER
,
"end test_substring_filter 1
\n
"
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_FILTER
,
"end test_substring
s
_filter 1
\n
"
,
0
,
0
,
0
);
return
LDAP_COMPARE_FALSE
;
}
servers/slapd/slap.h
View file @
665272dc
...
...
@@ -130,6 +130,11 @@ LDAP_SLAPD_F (int) slap_debug;
#define SLAP_INDEX_SUBSTR_DEFAULT ( SLAP_INDEX_SUBSTR \
| SLAP_INDEX_SUBSTR_INITIAL | SLAP_INDEX_SUBSTR_FINAL )
#define SLAP_INDEX_SUBSTR_INITIAL_MIN_LEN 2
#define SLAP_INDEX_SUBSTR_INITIAL_MAX_LEN 4
#define SLAP_INDEX_SUBSTR_FINAL_MIN_LEN 2
#define SLAP_INDEX_SUBSTR_FINAL_MAX_LEN 4
#define SLAP_INDEX_FLAGS 0xF000UL
#define SLAP_INDEX_SUBTYPES 0x1000UL
/* use index with subtypes */
#define SLAP_INDEX_AUTO_SUBTYPES 0x2000UL
/* use mask with subtypes */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment