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
Jaak Ristioja
OpenLDAP
Commits
e05b4b7d
Commit
e05b4b7d
authored
21 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup result handling
parent
daa29805
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
servers/slapd/back-bdb/bind.c
+13
-23
13 additions, 23 deletions
servers/slapd/back-bdb/bind.c
with
13 additions
and
23 deletions
servers/slapd/back-bdb/bind.c
+
13
−
23
View file @
e05b4b7d
...
...
@@ -136,8 +136,6 @@ dn2entry_retry:
#endif
rs
->
sr_err
=
LDAP_INVALID_CREDENTIALS
;
send_ldap_result
(
op
,
rs
);
goto
done
;
}
#endif
...
...
@@ -152,8 +150,8 @@ dn2entry_retry:
0
,
0
);
#endif
send_ldap_error
(
op
,
rs
,
LDAP_ALIAS_PROBLEM
,
"entry is alias"
)
;
rs
->
sr_err
=
LDAP_ALIAS_PROBLEM
;
rs
->
sr_text
=
"entry is alias"
;
goto
done
;
}
#endif
...
...
@@ -172,16 +170,9 @@ dn2entry_retry:
if
(
rs
->
sr_ref
!=
NULL
)
{
rs
->
sr_err
=
LDAP_REFERRAL
;
rs
->
sr_matched
=
e
->
e_name
.
bv_val
;
send_ldap_result
(
op
,
rs
);
ber_bvarray_free
(
rs
->
sr_ref
);
rs
->
sr_ref
=
NULL
;
rs
->
sr_matched
=
NULL
;
}
else
{
rs
->
sr_err
=
LDAP_INVALID_CREDENTIALS
;
send_ldap_result
(
op
,
rs
);
}
goto
done
;
}
...
...
@@ -191,19 +182,16 @@ dn2entry_retry:
password
,
NULL
,
ACL_AUTH
,
NULL
);
if
(
!
rs
->
sr_err
)
{
rs
->
sr_err
=
LDAP_INSUFFICIENT_ACCESS
;
send_ldap_result
(
op
,
rs
);
goto
done
;
}
if
(
(
a
=
attr_find
(
e
->
e_attrs
,
password
))
==
NULL
)
{
rs
->
sr_err
=
LDAP_INAPPROPRIATE_AUTH
;
send_ldap_result
(
op
,
rs
);
goto
done
;
}
if
(
slap_passwd_check
(
op
->
o_conn
,
a
,
&
op
->
oq_bind
.
rb_cred
,
&
rs
->
sr_text
)
!=
0
)
{
rs
->
sr_err
=
LDAP_INVALID_CREDENTIALS
;
send_ldap_result
(
op
,
rs
);
goto
done
;
}
...
...
@@ -214,7 +202,6 @@ dn2entry_retry:
case
LDAP_AUTH_KRBV41
:
if
(
krbv4_ldap_auth
(
op
->
o_bd
,
&
op
->
oq_bind
.
rb_cred
,
&
ad
)
!=
LDAP_SUCCESS
)
{
rs
->
sr_err
=
LDAP_INVALID_CREDENTIALS
,
send_ldap_result
(
op
);
goto
done
;
}
...
...
@@ -222,7 +209,6 @@ dn2entry_retry:
krbattr
,
NULL
,
ACL_AUTH
,
NULL
);
if
(
!
rs
->
sr_err
)
{
rs
->
sr_err
=
LDAP_INSUFFICIENT_ACCESS
,
send_ldap_result
(
op
);
goto
done
;
}
...
...
@@ -238,7 +224,6 @@ dn2entry_retry:
break
;
}
rs
->
sr_err
=
LDAP_INAPPROPRIATE_AUTH
,
send_ldap_result
(
op
);
goto
done
;
}
else
{
/* look for krbname match */
...
...
@@ -246,7 +231,6 @@ dn2entry_retry:
if
(
value_find
(
a
->
a_desc
,
a
->
a_vals
,
&
krbval
)
!=
0
)
{
rs
->
sr_err
=
LDAP_INVALID_CREDENTIALS
;
send_ldap_result
(
op
);
goto
done
;
}
}
...
...
@@ -254,15 +238,14 @@ dn2entry_retry:
break
;
case
LDAP_AUTH_KRBV42
:
send_ldap_error
(
op
,
rs
,
LDAP_UNWILLING_TO_PERFORM
,
"Kerberos bind step 2 not supported"
)
;
rs
->
sr_err
=
LDAP_UNWILLING_TO_PERFORM
;
rs
->
sr_text
=
"Kerberos bind step 2 not supported"
;
goto
done
;
#endif
default:
send_ldap_error
(
op
,
rs
,
LDAP_STRONG_AUTH_NOT_SUPPORTED
,
"authentication method not supported"
);
goto
done
;
rs
->
sr_err
=
LDAP_STRONG_AUTH_NOT_SUPPORTED
;
rs
->
sr_text
=
"authentication method not supported"
;
}
done:
...
...
@@ -273,6 +256,13 @@ done:
LOCK_ID_FREE
(
bdb
->
bi_dbenv
,
locker
);
if
(
rs
->
sr_err
)
{
send_ldap_result
(
op
,
rs
);
if
(
rs
->
sr_ref
)
{
ber_bvarray_free
(
rs
->
sr_ref
);
rs
->
sr_ref
=
NULL
;
}
}
/* front end will send result on success (rs->sr_err==0) */
return
rs
->
sr_err
;
}
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