mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Fix SPASSWD merge for real
This commit is contained in:
parent
3c852017be
commit
4617f2e946
@ -68,7 +68,7 @@ ldbm_back_bind(
|
||||
/* allow noauth binds */
|
||||
rc = 1;
|
||||
if ( method == LDAP_AUTH_SIMPLE ) {
|
||||
if ( be_isroot_pw( be, dn, cred ) ) {
|
||||
if ( be_isroot_pw( be, conn, dn, cred ) ) {
|
||||
*edn = ch_strdup( be_root_dn( be ) );
|
||||
rc = 0; /* front end will send result */
|
||||
|
||||
@ -139,7 +139,7 @@ ldbm_back_bind(
|
||||
switch ( method ) {
|
||||
case LDAP_AUTH_SIMPLE:
|
||||
/* check for root dn/passwd */
|
||||
if ( be_isroot_pw( be, dn, cred ) ) {
|
||||
if ( be_isroot_pw( be, conn, dn, cred ) ) {
|
||||
/* front end will send result */
|
||||
if(*edn != NULL) free( *edn );
|
||||
*edn = ch_strdup( be_root_dn( be ) );
|
||||
|
@ -504,7 +504,10 @@ be_root_dn( Backend *be )
|
||||
}
|
||||
|
||||
int
|
||||
be_isroot_pw( Backend *be, const char *ndn, struct berval *cred )
|
||||
be_isroot_pw( Backend *be,
|
||||
Connection *conn,
|
||||
const char *ndn,
|
||||
struct berval *cred )
|
||||
{
|
||||
int result;
|
||||
|
||||
@ -526,6 +529,9 @@ be_isroot_pw( Backend *be, const char *ndn, struct berval *cred )
|
||||
result = lutil_passwd( &be->be_root_pw, cred, NULL );
|
||||
|
||||
#if defined( SLAPD_CRYPT ) || defined( SLAPD_PASSWD )
|
||||
#ifdef SLAPD_SPASSWD
|
||||
lutil_passwd_sasl_conn = NULL;
|
||||
#endif
|
||||
ldap_pvt_thread_mutex_unlock( &passwd_mutex );
|
||||
#endif
|
||||
|
||||
|
@ -239,6 +239,9 @@ slap_passwd_check(
|
||||
}
|
||||
|
||||
#if defined( SLAPD_CRYPT ) || defined( SLAPD_PASSWD )
|
||||
#ifdef SLAPD_SPASSWD
|
||||
lutil_passwd_sasl_conn = NULL;
|
||||
#endif
|
||||
ldap_pvt_thread_mutex_unlock( &passwd_mutex );
|
||||
#endif
|
||||
|
||||
|
@ -151,7 +151,8 @@ LDAP_SLAPD_F (BackendDB *) select_backend LDAP_P(( const char * dn ));
|
||||
|
||||
LDAP_SLAPD_F (int) be_issuffix LDAP_P(( Backend *be, const char *suffix ));
|
||||
LDAP_SLAPD_F (int) be_isroot LDAP_P(( Backend *be, const char *ndn ));
|
||||
LDAP_SLAPD_F (int) be_isroot_pw LDAP_P(( Backend *be, const char *ndn, struct berval *cred ));
|
||||
LDAP_SLAPD_F (int) be_isroot_pw LDAP_P(( Backend *be,
|
||||
Connection *conn, const char *ndn, struct berval *cred ));
|
||||
LDAP_SLAPD_F (char *) be_root_dn LDAP_P(( Backend *be ));
|
||||
LDAP_SLAPD_F (int) be_entry_release_rw LDAP_P(( Backend *be, Entry *e, int rw ));
|
||||
#define be_entry_release_r( be, e ) be_entry_release_rw( be, e, 0 )
|
||||
|
Loading…
Reference in New Issue
Block a user