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
032d2b35
Commit
032d2b35
authored
21 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup unneeded definitions
parent
0132af84
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/ldapsasl/ldapdb.c
+4
-12
4 additions, 12 deletions
contrib/ldapsasl/ldapdb.c
with
4 additions
and
12 deletions
contrib/ldapsasl/ldapdb.c
+
4
−
12
View file @
032d2b35
...
...
@@ -41,16 +41,11 @@ typedef struct ldapctx {
int
use_tls
;
/* Issue StartTLS request? */
}
ldapctx
;
typedef
struct
gluectx
{
ldapctx
*
lc
;
sasl_server_params_t
*
lp
;
}
gluectx
;
static
int
ldapdb_interact
(
LDAP
*
ld
,
unsigned
flags
__attribute__
((
unused
)),
void
*
def
,
void
*
inter
)
{
sasl_interact_t
*
in
=
inter
;
glue
ctx
*
g
c
=
def
;
ldap
ctx
*
c
tx
=
def
;
struct
berval
p
;
for
(;
in
->
id
!=
SASL_CB_LIST_END
;
in
++
)
...
...
@@ -63,10 +58,10 @@ static int ldapdb_interact(LDAP *ld, unsigned flags __attribute__((unused)),
if
(
p
.
bv_val
)
p
.
bv_len
=
strlen
(
p
.
bv_val
);
break
;
case
SASL_CB_AUTHNAME
:
p
=
gc
->
lc
->
id
;
p
=
ctx
->
id
;
break
;
case
SASL_CB_PASS
:
p
=
gc
->
lc
->
pw
;
p
=
ctx
->
pw
;
break
;
}
if
(
p
.
bv_val
)
...
...
@@ -89,7 +84,6 @@ static int ldapdb_connect(ldapctx *ctx, sasl_server_params_t *sparams,
const
char
*
user
,
unsigned
ulen
,
connparm
*
cp
)
{
int
i
;
gluectx
gc
;
char
*
authzid
;
if
((
i
=
ldap_initialize
(
&
cp
->
ld
,
ctx
->
uri
)))
{
...
...
@@ -117,10 +111,8 @@ static int ldapdb_connect(ldapctx *ctx, sasl_server_params_t *sparams,
return
i
;
}
gc
.
lc
=
ctx
;
gc
.
lp
=
sparams
;
i
=
ldap_sasl_interactive_bind_s
(
cp
->
ld
,
NULL
,
ctx
->
mech
.
bv_val
,
NULL
,
NULL
,
LDAP_SASL_QUIET
,
ldapdb_interact
,
&
gc
);
NULL
,
LDAP_SASL_QUIET
,
ldapdb_interact
,
ctx
);
if
(
i
!=
LDAP_SUCCESS
)
{
sparams
->
utils
->
free
(
authzid
);
return
i
;
...
...
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