/* $OpenLDAP$ */
/*
- * Copyright 1999-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1999-2002 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
-#include <stdlib.h>
#include <stdio.h>
#include <ac/socket.h>
+#include <ac/stdlib.h>
#include <ac/string.h>
#include <ac/time.h>
#include <ac/errno.h>
len = sec_buf_in->buf_ptr - sec_buf_in->buf_end;
if ( len > 0 )
- memmove( sec_buf_in->buf_base, sec_buf_in->buf_base +
+ AC_MEMCPY( sec_buf_in->buf_base, sec_buf_in->buf_base +
sec_buf_in->buf_end, len );
if ( len >= 4 ) {
sbiod->sbiod_sb->sb_debug );
/* Grow the packet buffer if neccessary */
- if ( ( p->sec_buf_in.buf_size < ret ) &&
+ if ( ( p->sec_buf_in.buf_size < (ber_len_t) ret ) &&
ber_pvt_sb_grow_buffer( &p->sec_buf_in, ret ) < 0 )
{
errno = ENOMEM;
sasl_conn_t *ctx;
sasl_callback_t *session_callbacks =
- ber_memcalloc( 2, sizeof( sasl_callback_t ) );
+ LDAP_CALLOC( 2, sizeof( sasl_callback_t ) );
if( session_callbacks == NULL ) return LDAP_NO_MEMORY;
rc = sasl_client_new( "ldap", host, session_callbacks,
SASL_SECURITY_LAYER, &ctx );
+ LDAP_FREE( session_callbacks );
if ( rc != SASL_OK ) {
ld->ld_errno = sasl_err2ldap( rc );
int
ldap_int_sasl_external(
LDAP *ld,
+ LDAPConn *conn,
const char * authid,
ber_len_t ssf )
{ return LDAP_SUCCESS; }