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
04692957
Commit
04692957
authored
17 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
SASL support for LDAPConnection
parent
54b14574
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/ldapc++/src/LDAPConnection.cpp
+34
-0
34 additions, 0 deletions
contrib/ldapc++/src/LDAPConnection.cpp
contrib/ldapc++/src/LDAPConnection.h
+4
-0
4 additions, 0 deletions
contrib/ldapc++/src/LDAPConnection.h
with
38 additions
and
0 deletions
contrib/ldapc++/src/LDAPConnection.cpp
+
34
−
0
View file @
04692957
...
...
@@ -60,6 +60,40 @@ void LDAPConnection::bind(const string& dn, const string& passwd,
delete
msg
;
// memcheck
}
void
LDAPConnection
::
saslInteractiveBind
(
const
std
::
string
&
mech
,
int
flags
,
SaslInteractionHandler
*
sih
,
const
LDAPConstraints
*
cons
)
{
DEBUG
(
LDAP_DEBUG_TRACE
,
"LDAPConnection::bind"
<<
endl
);
LDAPMessageQueue
*
msg
=
0
;
LDAPResult
*
res
=
0
;
try
{
msg
=
LDAPAsynConnection
::
saslInteractiveBind
(
mech
,
flags
,
sih
,
cons
);
res
=
(
LDAPResult
*
)
msg
->
getNext
();
}
catch
(
LDAPException
e
){
delete
msg
;
delete
res
;
throw
;
}
int
resCode
=
res
->
getResultCode
();
if
(
resCode
!=
LDAPResult
::
SUCCESS
)
{
if
(
resCode
==
LDAPResult
::
REFERRAL
){
LDAPUrlList
urls
=
res
->
getReferralUrls
();
delete
res
;
delete
msg
;
throw
LDAPReferralException
(
urls
);
}
else
{
string
srvMsg
=
res
->
getErrMsg
();
delete
res
;
delete
msg
;
throw
LDAPException
(
resCode
,
srvMsg
);
}
}
delete
res
;
delete
msg
;
}
void
LDAPConnection
::
unbind
(){
LDAPAsynConnection
::
unbind
();
}
...
...
This diff is collapsed.
Click to expand it.
contrib/ldapc++/src/LDAPConnection.h
+
4
−
0
View file @
04692957
...
...
@@ -89,6 +89,10 @@ class LDAPConnection : private LDAPAsynConnection {
*/
void
bind
(
const
std
::
string
&
dn
=
""
,
const
std
::
string
&
passwd
=
""
,
LDAPConstraints
*
cons
=
0
);
void
saslInteractiveBind
(
const
std
::
string
&
mech
,
int
flags
=
0
,
SaslInteractionHandler
*
sih
=
0
,
const
LDAPConstraints
*
cons
=
0
);
/**
* Performs the UNBIND-operation on the destination server
...
...
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