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
James Lowden
OpenLDAP
Commits
3cb7a09e
Commit
3cb7a09e
authored
22 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
Added check for Cyrus SASL sasl_version()
parent
4114c96c
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
configure.in
+6
-0
6 additions, 0 deletions
configure.in
libraries/libldap/cyrus.c
+22
-0
22 additions, 0 deletions
libraries/libldap/cyrus.c
servers/slapd/sasl.c
+21
-0
21 additions, 0 deletions
servers/slapd/sasl.c
with
49 additions
and
0 deletions
configure.in
+
6
−
0
View file @
3cb7a09e
...
...
@@ -2194,6 +2194,12 @@ if test $ol_with_cyrus_sasl != no ; then
if test $ol_enable_spasswd != no ; then
ol_link_spasswd=yes
fi
ac_save_LIBS="$LIBS"
LIBS="$LIBS $ol_link_sasl"
AC_CHECK_FUNC(sasl_version, [AC_DEFINE(HAVE_SASL_VERSION,1,
[define if your SASL library has sasl_version()])])
LIBS="$ac_save_LIBS"
fi
else
...
...
This diff is collapsed.
Click to expand it.
libraries/libldap/cyrus.c
+
22
−
0
View file @
3cb7a09e
...
...
@@ -56,6 +56,28 @@ int ldap_int_sasl_init( void )
{
SASL_CB_LIST_END
,
NULL
,
NULL
}
};
#ifdef HAVE_SASL_VERSION
#define SASL_BUILD_VERSION ((SASL_VERSION_MAJOR << 24) |\
(SASL_VERSION_MINOR << 16) | SASL_VERSION_STEP)
{
int
rc
;
sasl_version
(
NULL
,
&
rc
);
if
(
((
rc
>>
16
)
!=
((
SASL_VERSION_MAJOR
<<
8
)
|
SASL_VERSION_MINOR
))
||
(
rc
&
0xffff
)
<
SASL_VERSION_STEP
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
TRANSPORT
,
INFO
,
"ldap_int_sasl_init: SASL version mismatch, got %x, wanted %x.
\n
"
,
rc
,
SASL_BUILD_VERSION
,
0
);
#else
Debug
(
LDAP_DEBUG_ANY
,
"ldap_int_sasl_init: SASL version mismatch, got %x, wanted %x.
\n
"
,
rc
,
SASL_BUILD_VERSION
,
0
);
#endif
return
-
1
;
}
}
#endif
if
(
sasl_initialized
)
{
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/sasl.c
+
21
−
0
View file @
3cb7a09e
...
...
@@ -1091,6 +1091,27 @@ int slap_sasl_init( void )
{
SASL_CB_LIST_END
,
NULL
,
NULL
}
};
#ifdef HAVE_SASL_VERSION
#define SASL_BUILD_VERSION ((SASL_VERSION_MAJOR << 24) |\
(SASL_VERSION_MINOR << 16) | SASL_VERSION_STEP)
sasl_version
(
NULL
,
&
rc
);
if
(
((
rc
>>
16
)
!=
((
SASL_VERSION_MAJOR
<<
8
)
|
SASL_VERSION_MINOR
))
||
(
rc
&
0xffff
)
<
SASL_VERSION_STEP
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
TRANSPORT
,
INFO
,
"slap_sasl_init: SASL version mismatch, got %x, wanted %x.
\n
"
,
rc
,
SASL_BUILD_VERSION
,
0
);
#else
Debug
(
LDAP_DEBUG_ANY
,
"slap_sasl_init: SASL version mismatch, got %x, wanted %x.
\n
"
,
rc
,
SASL_BUILD_VERSION
,
0
);
#endif
return
-
1
;
}
#endif
sasl_set_alloc
(
ber_memalloc
,
ber_memcalloc
,
...
...
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