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
6f8fad20
Commit
6f8fad20
authored
25 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Add conn/op bind_in_progress flags such that operations can detect
if multiple step SASL binds are in progress.
parent
a1665712
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
servers/slapd/connection.c
+19
-11
19 additions, 11 deletions
servers/slapd/connection.c
servers/slapd/operation.c
+4
-0
4 additions, 0 deletions
servers/slapd/operation.c
servers/slapd/slap.h
+5
-0
5 additions, 0 deletions
servers/slapd/slap.h
with
28 additions
and
11 deletions
servers/slapd/connection.c
+
19
−
11
View file @
6f8fad20
...
...
@@ -602,6 +602,7 @@ void connection_done( Connection *c )
static
void
*
connection_operation
(
void
*
arg_v
)
{
int
rc
;
struct
co_arg
*
arg
=
arg_v
;
ber_tag_t
tag
=
arg
->
co_op
->
o_tag
;
Connection
*
conn
=
arg
->
co_conn
;
...
...
@@ -612,44 +613,44 @@ connection_operation( void *arg_v )
switch
(
tag
)
{
case
LDAP_REQ_BIND
:
do_bind
(
conn
,
arg
->
co_op
);
rc
=
do_bind
(
conn
,
arg
->
co_op
);
break
;
case
LDAP_REQ_UNBIND
:
do_unbind
(
conn
,
arg
->
co_op
);
rc
=
do_unbind
(
conn
,
arg
->
co_op
);
break
;
case
LDAP_REQ_ADD
:
do_add
(
conn
,
arg
->
co_op
);
rc
=
do_add
(
conn
,
arg
->
co_op
);
break
;
case
LDAP_REQ_DELETE
:
do_delete
(
conn
,
arg
->
co_op
);
rc
=
do_delete
(
conn
,
arg
->
co_op
);
break
;
case
LDAP_REQ_MODRDN
:
do_modrdn
(
conn
,
arg
->
co_op
);
rc
=
do_modrdn
(
conn
,
arg
->
co_op
);
break
;
case
LDAP_REQ_MODIFY
:
do_modify
(
conn
,
arg
->
co_op
);
rc
=
do_modify
(
conn
,
arg
->
co_op
);
break
;
case
LDAP_REQ_COMPARE
:
do_compare
(
conn
,
arg
->
co_op
);
rc
=
do_compare
(
conn
,
arg
->
co_op
);
break
;
case
LDAP_REQ_SEARCH
:
do_search
(
conn
,
arg
->
co_op
);
rc
=
do_search
(
conn
,
arg
->
co_op
);
break
;
case
LDAP_REQ_ABANDON
:
do_abandon
(
conn
,
arg
->
co_op
);
rc
=
do_abandon
(
conn
,
arg
->
co_op
);
break
;
#if 0
case LDAP_REQ_EXTENDED:
do_extended( conn, arg->co_op );
rc =
do_extended( conn, arg->co_op );
break;
#endif
...
...
@@ -685,6 +686,7 @@ connection_operation( void *arg_v )
if
(
conn
->
c_conn_state
==
SLAP_C_BINDING
)
{
conn
->
c_conn_state
=
SLAP_C_ACTIVE
;
}
conn
->
c_bind_in_progress
=
(
rc
==
LDAP_SASL_BIND_IN_PROGRESS
);
}
ldap_pvt_thread_mutex_lock
(
&
active_threads_mutex
);
...
...
@@ -907,18 +909,24 @@ static int connection_op_activate( Connection *conn, Operation *op )
arg
->
co_conn
=
conn
;
arg
->
co_op
=
op
;
arg
->
co_op
->
o_bind_in_progress
=
conn
->
c_bind_in_progress
;
arg
->
co_op
->
o_dn
=
ch_strdup
(
tmpdn
!=
NULL
?
tmpdn
:
""
);
arg
->
co_op
->
o_ndn
=
dn_normalize_case
(
ch_strdup
(
arg
->
co_op
->
o_dn
)
);
arg
->
co_op
->
o_protocol
=
conn
->
c_protocol
;
arg
->
co_op
->
o_authmech
=
conn
->
c_authmech
!=
NULL
?
ch_strdup
(
conn
->
c_authmech
)
:
NULL
;
arg
->
co_op
->
o_authtype
=
conn
->
c_authtype
;
slap_op_add
(
&
conn
->
c_ops
,
arg
->
co_op
);
if
(
tag
==
LDAP_REQ_BIND
)
{
conn
->
c_conn_state
=
SLAP_C_BINDING
;
}
if
(
tmpdn
!=
NULL
)
{
if
(
tmpdn
!=
NULL
)
{
free
(
tmpdn
);
}
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/operation.c
+
4
−
0
View file @
6f8fad20
...
...
@@ -24,6 +24,9 @@ slap_op_free( Operation *op )
if
(
op
->
o_ndn
!=
NULL
)
{
free
(
op
->
o_ndn
);
}
if
(
op
->
o_authmech
!=
NULL
)
{
free
(
op
->
o_authmech
);
}
ldap_pvt_thread_mutex_destroy
(
&
op
->
o_abandonmutex
);
...
...
@@ -51,6 +54,7 @@ slap_op_alloc(
op
->
o_dn
=
NULL
;
op
->
o_ndn
=
NULL
;
op
->
o_authmech
=
NULL
;
op
->
o_time
=
slap_get_time
();
op
->
o_opid
=
id
;
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/slap.h
+
5
−
0
View file @
6f8fad20
...
...
@@ -490,6 +490,9 @@ typedef struct slap_op {
ber_tag_t
o_tag
;
/* tag of the request */
time_t
o_time
;
/* time op was initiated */
int
o_bind_in_progress
;
/* multi-op bind in progress */
char
*
o_dn
;
/* dn bound when op was initiated */
char
*
o_ndn
;
/* normalized dn bound when op was initiated */
ber_int_t
o_protocol
;
/* version of the LDAP protocol used by client */
...
...
@@ -534,6 +537,8 @@ typedef struct slap_conn {
char
*
c_client_name
;
/* name of client */
/* only can be changed by binding thread */
int
c_bind_in_progress
;
/* multi-op bind in progress */
char
*
c_cdn
;
/* DN provided by the client */
char
*
c_dn
;
/* DN bound to this conn */
ber_int_t
c_protocol
;
/* version of the LDAP protocol used by client */
...
...
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