mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 09:39:45 -05:00
ITS#717 kbind fixes
This commit is contained in:
parent
4af57deb51
commit
102a88659b
3 changed files with 6 additions and 4 deletions
|
|
@ -181,7 +181,9 @@ typedef struct ldap_conn {
|
|||
#define LDAP_CONNST_CONNECTING 2
|
||||
#define LDAP_CONNST_CONNECTED 3
|
||||
LDAPURLDesc *lconn_server;
|
||||
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
|
||||
char *lconn_krbinstance;
|
||||
#endif
|
||||
struct ldap_conn *lconn_next;
|
||||
BerElement *lconn_ber;/* ber receiving on this conn. */
|
||||
} LDAPConn;
|
||||
|
|
|
|||
|
|
@ -322,8 +322,8 @@ ldap_int_open_connection(
|
|||
}
|
||||
#endif
|
||||
|
||||
if ( conn->lconn_krbinstance != NULL ) {
|
||||
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
|
||||
if ( conn->lconn_krbinstance == NULL ) {
|
||||
char *c;
|
||||
conn->lconn_krbinstance = ldap_host_connected_to( conn->sb );
|
||||
|
||||
|
|
@ -331,10 +331,8 @@ ldap_int_open_connection(
|
|||
( c = strchr( conn->lconn_krbinstance, '.' )) != NULL ) {
|
||||
*c = '\0';
|
||||
}
|
||||
#else /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */
|
||||
conn->lconn_krbinstance = NULL;
|
||||
#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */
|
||||
}
|
||||
#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -410,9 +410,11 @@ ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind )
|
|||
prevlc = tmplc;
|
||||
}
|
||||
ldap_free_urllist( lc->lconn_server );
|
||||
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
|
||||
if ( lc->lconn_krbinstance != NULL ) {
|
||||
LDAP_FREE( lc->lconn_krbinstance );
|
||||
}
|
||||
#endif
|
||||
if ( lc->lconn_sb != ld->ld_sb ) {
|
||||
ber_sockbuf_free( lc->lconn_sb );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue