Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Paul Henson
OpenLDAP
Commits
c02131a8
Commit
c02131a8
authored
15 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
Fix db_open, delete unused variables. More cleanup is needed.
parent
048f2415
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
contrib/slapd-modules/autogroup/autogroup.c
+11
-36
11 additions, 36 deletions
contrib/slapd-modules/autogroup/autogroup.c
with
11 additions
and
36 deletions
contrib/slapd-modules/autogroup/autogroup.c
+
11
−
36
View file @
c02131a8
...
...
@@ -196,8 +196,6 @@ autogroup_delete_member_from_group( Operation *op, BerValue *dn, BerValue *ndn,
static
int
autogroup_member_search_cb
(
Operation
*
op
,
SlapReply
*
rs
)
{
slap_overinst
*
on
=
(
slap_overinst
*
)
op
->
o_bd
->
bd_info
;
assert
(
op
->
o_tag
==
LDAP_REQ_SEARCH
);
if
(
rs
->
sr_type
==
REP_SEARCH
)
{
...
...
@@ -238,20 +236,13 @@ autogroup_member_search_cb( Operation *op, SlapReply *rs )
static
int
autogroup_member_search_modify_cb
(
Operation
*
op
,
SlapReply
*
rs
)
{
slap_overinst
*
on
=
(
slap_overinst
*
)
op
->
o_bd
->
bd_info
;
assert
(
op
->
o_tag
==
LDAP_REQ_SEARCH
);
if
(
rs
->
sr_type
==
REP_SEARCH
)
{
autogroup_ga_t
*
agg
=
(
autogroup_ga_t
*
)
op
->
o_callback
->
sc_private
;
autogroup_entry_t
*
age
=
agg
->
agg_group
;
Operation
o
=
*
op
;
Modifications
*
modlist
;
SlapReply
sreply
=
{
REP_RESULT
};
const
char
*
text
=
NULL
;
char
textbuf
[
1024
];
struct
berval
vals
[
2
],
nvals
[
2
];
slap_callback
cb
=
{
NULL
,
slap_null_cb
,
NULL
,
NULL
};
Debug
(
LDAP_DEBUG_TRACE
,
"==> autogroup_member_search_modify_cb <%s>
\n
"
,
rs
->
sr_entry
?
rs
->
sr_entry
->
e_name
.
bv_val
:
"UNKNOWN_DN"
,
0
,
0
);
...
...
@@ -508,11 +499,8 @@ cleanup:;
static
int
autogroup_group_add_cb
(
Operation
*
op
,
SlapReply
*
rs
)
{
slap_overinst
*
on
=
(
slap_overinst
*
)
op
->
o_bd
->
bd_info
;
assert
(
op
->
o_tag
==
LDAP_REQ_SEARCH
);
if
(
rs
->
sr_type
==
REP_SEARCH
)
{
autogroup_sc_t
*
ags
=
(
autogroup_sc_t
*
)
op
->
o_callback
->
sc_private
;
...
...
@@ -538,7 +526,6 @@ autogroup_add_entry( Operation *op, SlapReply *rs)
autogroup_def_t
*
agd
=
agi
->
agi_def
;
autogroup_entry_t
*
age
=
agi
->
agi_entry
;
autogroup_filter_t
*
agf
;
Attribute
*
a
;
int
rc
=
0
;
Debug
(
LDAP_DEBUG_TRACE
,
"==> autogroup_add_entry <%s>
\n
"
,
...
...
@@ -652,7 +639,6 @@ autogroup_delete_entry( Operation *op, SlapReply *rs)
{
slap_overinst
*
on
=
(
slap_overinst
*
)
op
->
o_bd
->
bd_info
;
autogroup_info_t
*
agi
=
(
autogroup_info_t
*
)
on
->
on_bi
.
bi_private
;
autogroup_def_t
*
agd
=
agi
->
agi_def
;
autogroup_entry_t
*
age
=
agi
->
agi_entry
,
*
age_prev
,
*
age_next
;
autogroup_filter_t
*
agf
;
...
...
@@ -683,9 +669,6 @@ autogroup_delete_entry( Operation *op, SlapReply *rs)
dnMatch
(
&
match
,
0
,
NULL
,
NULL
,
&
e
->
e_nname
,
&
age
->
age_ndn
);
if
(
match
==
0
)
{
autogroup_filter_t
*
agf
=
age
->
age_filter
,
*
agf_next
;
autogroup_delete_group
(
agi
,
age
);
break
;
}
...
...
@@ -1266,7 +1249,6 @@ ag_cfgen( ConfigArgs *c )
autogroup_entry_t
*
age_next
,
*
age_prev
;
autogroup_filter_t
*
agf
,
*
agf_next
;
struct
berval
*
bv
;
ldap_pvt_thread_mutex_lock
(
&
agi
->
agi_mutex
);
...
...
@@ -1446,8 +1428,7 @@ autogroup_db_open(
BackendDB
*
be
,
ConfigReply
*
cr
)
{
slap_overinst
*
on
=
(
slap_overinst
*
)
be
->
bd_info
,
*
on_bd
;
slap_overinst
*
on
=
(
slap_overinst
*
)
be
->
bd_info
;
autogroup_info_t
*
agi
=
on
->
on_bi
.
bi_private
;
autogroup_def_t
*
agd
;
autogroup_sc_t
ags
;
...
...
@@ -1458,9 +1439,6 @@ autogroup_db_open(
void
*
thrctx
=
ldap_pvt_thread_pool_context
();
Connection
conn
=
{
0
};
OperationBuffer
opbuf
;
BerValue
bv
;
char
*
ptr
;
int
rc
=
0
;
Debug
(
LDAP_DEBUG_TRACE
,
"==> autogroup_db_open
\n
"
,
0
,
0
,
0
);
...
...
@@ -1482,31 +1460,28 @@ autogroup_db_open(
op
->
ors_slimit
=
SLAP_NO_LIMIT
;
op
->
ors_attrs
=
slap_anlist_no_attrs
;
op
->
o_bd
=
select_backend
(
&
op
->
o_req_ndn
,
0
);
op
->
o_bd
=
be
;
op
->
o_bd
->
bd_info
=
(
BackendInfo
*
)
on
->
on_info
;
ags
.
ags_info
=
agi
;
cb
.
sc_private
=
&
ags
;
cb
.
sc_response
=
autogroup_group_add_cb
;
cb
.
sc_cleanup
=
NULL
;
cb
.
sc_next
=
NULL
;
op
->
o_callback
=
&
cb
;
ldap_pvt_thread_mutex_lock
(
&
agi
->
agi_mutex
);
for
(
agd
=
agi
->
agi_def
;
agd
;
agd
=
agd
->
agd_next
)
{
autogroup_build_def_filter
(
agd
,
op
);
ags
.
ags_info
=
agi
;
ags
.
ags_def
=
agd
;
cb
.
sc_private
=
&
ags
;
cb
.
sc_response
=
autogroup_group_add_cb
;
cb
.
sc_cleanup
=
NULL
;
cb
.
sc_next
=
NULL
;
op
->
o_callback
=
&
cb
;
op
->
o_bd
->
bd_info
=
(
BackendInfo
*
)
on
->
on_info
;
op
->
o_bd
->
be_search
(
op
,
&
rs
);
op
->
o_bd
->
bd_info
=
(
BackendInfo
*
)
on
;
filter_free_x
(
op
,
op
->
ors_filter
,
1
);
op
->
o_tmpfree
(
op
->
ors_filterstr
.
bv_val
,
op
->
o_tmpmemctx
);
}
ldap_pvt_thread_mutex_unlock
(
&
agi
->
agi_mutex
);
return
0
;
}
...
...
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