Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
d5647701
Commit
d5647701
authored
21 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
clarify hasSubordinate filtering
parent
57bb4fd8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/back-sql/search.c
+8
-18
8 additions, 18 deletions
servers/slapd/back-sql/search.c
with
8 additions
and
18 deletions
servers/slapd/back-sql/search.c
+
8
−
18
View file @
d5647701
...
...
@@ -400,15 +400,19 @@ backsql_process_filter( backsql_srch_info *bsi, Filter *f )
* Note however that hasSubordinates is boolean,
* so a more appropriate filter would be
* '(hasSubordinates=FALSE)'
*
* A more robust search for hasSubordinates
* would * require joining the ldap_entries table
* selecting if there are descendants of the
* candidate.
*/
backsql_strfcat
(
&
bsi
->
flt_where
,
"l"
,
(
ber_len_t
)
sizeof
(
"1=1"
)
-
1
,
"1=1"
);
if
(
ad
==
slap_schema
.
si_ad_hasSubordinates
)
{
/*
* We use this flag since we need to parse
* the filter anyway; we should have used
* the frontend API function
* filter_has_subordinates()
* instruct candidate selection algorithm
* and attribute list to try to detect
* if an entry has subordinates
*/
bsi
->
bsi_flags
|=
BSQL_SF_FILTER_HASSUBORDINATE
;
...
...
@@ -448,20 +452,6 @@ backsql_process_filter( backsql_srch_info *bsi, Filter *f )
&
at
->
join_where
);
}
#if 0
/*
* FIXME: this is not required any more; however, note that
* attribute name syntax might collide with SQL legal aliases
*/
if ( at != &oc_attr ) {
backsql_strfcat( &bsi->sel, "cblb",
',',
&at->sel_expr,
(ber_len_t)sizeof( " AS " ) - 1, " AS ",
&at->name );
}
#endif
switch
(
f
->
f_choice
)
{
case
LDAP_FILTER_EQUALITY
:
filter_value
=
&
f
->
f_av_value
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment