Skip to content
Snippets Groups Projects
Commit 491d2ae5 authored by Howard Chu's avatar Howard Chu
Browse files

ITS#1720 chk_sasl for Cyrus SASL 2

parent 064319ae
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,11 @@
#endif /* SLAPD_LMHASH */
#ifdef SLAPD_SPASSWD
# include <sasl.h>
# ifdef HAVE_SASL_SASL_H
# include <sasl/sasl.h>
# else
# include <sasl.h>
# endif
#endif
#ifdef SLAPD_KPASSWD
......@@ -659,14 +663,18 @@ static int chk_sasl(
#ifdef HAVE_CYRUS_SASL
if( lutil_passwd_sasl_conn != NULL ) {
const char *errstr = NULL;
int sc;
# if SASL_VERSION_MAJOR < 2
const char *errstr = NULL;
sc = sasl_checkpass( lutil_passwd_sasl_conn,
passwd->bv_val, passwd->bv_len,
cred->bv_val, cred->bv_len,
&errstr );
# else
sc = sasl_checkpass( lutil_passwd_sasl_conn,
passwd->bv_val, passwd->bv_len,
cred->bv_val, cred->bv_len );
# endif
rtn = ( sc != SASL_OK );
}
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment