gss_buffer_desc input_token, output_token = GSS_C_EMPTY_BUFFER;
struct berval cred, *scred = NULL;
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_lock( &ldap_int_gssapi_mutex );
-#endif
+ LDAP_MUTEX_LOCK( &ldap_int_gssapi_mutex );
/* get information from RootDSE entry */
rc = ldap_gssapi_get_rootdse_infos ( ld, &mechlist,
(ret_mech != GSS_C_NO_OID ? ret_mech : req_mech ),
gss_rc, minor_status );
rc_error:
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_unlock( &ldap_int_gssapi_mutex );
-#endif
+ LDAP_MUTEX_UNLOCK( &ldap_int_gssapi_mutex );
LDAP_FREE( mechlist );
LDAP_FREE( ldapServiceName );
LDAP_FREE( dnsHostName );
#include "ldap-tls.h"
-#ifdef LDAP_R_COMPILE
-#include <ldap_pvt_thread.h>
-#endif
-
static tls_impl *tls_imp = &ldap_int_tls_impl;
#define HAS_TLS( sb ) ber_sockbuf_ctrl( sb, LBER_SB_OPT_HAS_IO, \
(void *)tls_imp->ti_sbio )
{
struct ldapoptions *lo = LDAP_INT_GLOBAL_OPT();
int rc;
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_lock( &tls_def_ctx_mutex );
-#endif
+ LDAP_MUTEX_LOCK( &tls_def_ctx_mutex );
rc = ldap_int_tls_init_ctx( lo, is_server );
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_unlock( &tls_def_ctx_mutex );
-#endif
+ LDAP_MUTEX_UNLOCK( &tls_def_ctx_mutex );
return rc;
}
#include "ldap-int.h"
#include "ldap-tls.h"
-#ifdef LDAP_R_COMPILE
-#include <ldap_pvt_thread.h>
-#endif
-
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
#include <gcrypt.h>
tlsg_ctx_ref( tls_ctx *ctx )
{
tlsg_ctx *c = (tlsg_ctx *)ctx;
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_lock( &c->ref_mutex );
-#endif
+ LDAP_MUTEX_LOCK( &c->ref_mutex );
c->refcount++;
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_unlock( &c->ref_mutex );
-#endif
+ LDAP_MUTEX_UNLOCK( &c->ref_mutex );
}
static void
if ( !c ) return;
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_lock( &c->ref_mutex );
-#endif
+ LDAP_MUTEX_LOCK( &c->ref_mutex );
refcount = --c->refcount;
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_unlock( &c->ref_mutex );
-#endif
+ LDAP_MUTEX_UNLOCK( &c->ref_mutex );
if ( refcount )
return;
#ifdef HAVE_CIPHERSUITES
#include "ldap-int.h"
#include "ldap-tls.h"
-#ifdef LDAP_R_COMPILE
-#include <ldap_pvt_thread.h>
-#endif
-
#define READ_PASSWORD_FROM_STDIN
#define READ_PASSWORD_FROM_FILE
tlsm_ctx_ref( tls_ctx *ctx )
{
tlsm_ctx *c = (tlsm_ctx *)ctx;
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_lock( &c->tc_refmutex );
-#endif
+ LDAP_MUTEX_LOCK( &c->tc_refmutex );
c->tc_refcnt++;
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_unlock( &c->tc_refmutex );
-#endif
+ LDAP_MUTEX_UNLOCK( &c->tc_refmutex );
}
static void
if ( !c ) return;
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_lock( &c->tc_refmutex );
-#endif
+ LDAP_MUTEX_LOCK( &c->tc_refmutex );
refcount = --c->tc_refcnt;
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_unlock( &c->tc_refmutex );
-#endif
+ LDAP_MUTEX_UNLOCK( &c->tc_refmutex );
if ( refcount )
return;
if ( c->tc_model )
#include "ldap-int.h"
#include "ldap-tls.h"
-#ifdef LDAP_R_COMPILE
-#include <ldap_pvt_thread.h>
-#endif
-
#ifdef HAVE_OPENSSL_SSL_H
#include <openssl/ssl.h>
#include <openssl/x509v3.h>
int i;
/* Do we have params of this length already? */
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_lock( &tlso_dh_mutex );
-#endif
+ LDAP_MUTEX_LOCK( &tlso_dh_mutex );
for ( p = tlso_dhparams; p; p=p->next ) {
if ( p->keylength == key_length ) {
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_unlock( &tlso_dh_mutex );
-#endif
+ LDAP_MUTEX_UNLOCK( &tlso_dh_mutex );
return p->param;
}
}
}
}
-#ifdef LDAP_R_COMPILE
- ldap_pvt_thread_mutex_unlock( &tlso_dh_mutex );
-#endif
+ LDAP_MUTEX_UNLOCK( &tlso_dh_mutex );
return dh;
}