3 * Copyright 1999-2000 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
12 #include <ac/socket.h>
13 #include <ac/string.h>
20 #include "ldap_pvt_thread.h"
23 #ifdef HAVE_CYRUS_SASL
27 * Various Cyrus SASL related stuff.
30 #define SASL_MAX_BUFF_SIZE 65536
31 #define SASL_MIN_BUFF_SIZE 4096
33 int ldap_int_sasl_init( void )
35 /* XXX not threadsafe */
36 static int sasl_initialized = 0;
38 static sasl_callback_t client_callbacks[] = {
39 #ifdef SASL_CB_GETREALM
40 { SASL_CB_GETREALM, NULL, NULL },
42 { SASL_CB_USER, NULL, NULL },
43 { SASL_CB_AUTHNAME, NULL, NULL },
44 { SASL_CB_PASS, NULL, NULL },
45 { SASL_CB_ECHOPROMPT, NULL, NULL },
46 { SASL_CB_NOECHOPROMPT, NULL, NULL },
47 { SASL_CB_LIST_END, NULL, NULL }
50 if ( sasl_initialized ) {
60 #endif /* CSRIMALLOC */
64 ldap_pvt_sasl_mutex_new,
65 ldap_pvt_sasl_mutex_lock,
66 ldap_pvt_sasl_mutex_unlock,
67 ldap_pvt_sasl_mutex_dispose );
70 if ( sasl_client_init( client_callbacks ) == SASL_OK ) {
79 * SASL encryption support for LBER Sockbufs
83 sasl_conn_t *sasl_context;
84 Sockbuf_Buf sec_buf_in;
90 sb_sasl_setup( Sockbuf_IO_Desc *sbiod, void *arg )
92 struct sb_sasl_data *p;
94 assert( sbiod != NULL );
96 p = LBER_MALLOC( sizeof( *p ) );
99 p->sasl_context = (sasl_conn_t *)arg;
100 ber_pvt_sb_buf_init( &p->sec_buf_in );
101 ber_pvt_sb_buf_init( &p->buf_in );
102 ber_pvt_sb_buf_init( &p->buf_out );
103 if ( ber_pvt_sb_grow_buffer( &p->sec_buf_in, SASL_MIN_BUFF_SIZE ) < 0 ) {
108 sbiod->sbiod_pvt = p;
114 sb_sasl_remove( Sockbuf_IO_Desc *sbiod )
116 struct sb_sasl_data *p;
118 assert( sbiod != NULL );
120 p = (struct sb_sasl_data *)sbiod->sbiod_pvt;
121 ber_pvt_sb_buf_destroy( &p->sec_buf_in );
122 ber_pvt_sb_buf_destroy( &p->buf_in );
123 ber_pvt_sb_buf_destroy( &p->buf_out );
125 sbiod->sbiod_pvt = NULL;
130 sb_sasl_pkt_length( const char *buf, int debuglevel )
135 assert( buf != NULL );
137 tmp = *((long *)buf);
140 if ( size > SASL_MAX_BUFF_SIZE ) {
141 /* somebody is trying to mess me up. */
142 ber_log_printf( LDAP_DEBUG_ANY, debuglevel,
143 "sb_sasl_pkt_length: received illegal packet length "
144 "of %lu bytes\n", (unsigned long)size );
145 size = 16; /* this should lead to an error. */
148 return size + 4; /* include the size !!! */
151 /* Drop a processed packet from the input buffer */
153 sb_sasl_drop_packet ( Sockbuf_Buf *sec_buf_in, int debuglevel )
157 len = sec_buf_in->buf_ptr - sec_buf_in->buf_end;
159 memmove( sec_buf_in->buf_base, sec_buf_in->buf_base +
160 sec_buf_in->buf_end, len );
163 sec_buf_in->buf_end = sb_sasl_pkt_length( sec_buf_in->buf_base,
167 sec_buf_in->buf_end = 0;
169 sec_buf_in->buf_ptr = len;
173 sb_sasl_read( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len)
175 struct sb_sasl_data *p;
176 ber_slen_t ret, bufptr;
178 assert( sbiod != NULL );
179 assert( SOCKBUF_VALID( sbiod->sbiod_sb ) );
181 p = (struct sb_sasl_data *)sbiod->sbiod_pvt;
183 /* Are there anything left in the buffer? */
184 ret = ber_pvt_sb_copy_out( &p->buf_in, buf, len );
191 ber_pvt_sb_buf_destroy( &p->buf_in );
193 /* Read the length of the packet */
194 while ( p->sec_buf_in.buf_ptr < 4 ) {
195 ret = LBER_SBIOD_READ_NEXT( sbiod, p->sec_buf_in.buf_base,
196 4 - p->sec_buf_in.buf_ptr );
198 if ( ( ret < 0 ) && ( errno == EINTR ) )
204 p->sec_buf_in.buf_ptr += ret;
207 /* The new packet always starts at p->sec_buf_in.buf_base */
208 ret = sb_sasl_pkt_length( p->sec_buf_in.buf_base,
209 sbiod->sbiod_sb->sb_debug );
211 /* Grow the packet buffer if neccessary */
212 if ( ( p->sec_buf_in.buf_size < ret ) &&
213 ber_pvt_sb_grow_buffer( &p->sec_buf_in, ret ) < 0 )
218 p->sec_buf_in.buf_end = ret;
220 /* Did we read the whole encrypted packet? */
221 while ( p->sec_buf_in.buf_ptr < p->sec_buf_in.buf_end ) {
222 /* No, we have got only a part of it */
223 ret = p->sec_buf_in.buf_end - p->sec_buf_in.buf_ptr;
225 ret = LBER_SBIOD_READ_NEXT( sbiod, p->sec_buf_in.buf_base +
226 p->sec_buf_in.buf_ptr, ret );
228 if ( ( ret < 0 ) && ( errno == EINTR ) )
234 p->sec_buf_in.buf_ptr += ret;
237 /* Decode the packet */
238 ret = sasl_decode( p->sasl_context, p->sec_buf_in.buf_base,
239 p->sec_buf_in.buf_end, &p->buf_in.buf_base,
240 (unsigned *)&p->buf_in.buf_end );
241 if ( ret != SASL_OK ) {
242 ber_log_printf( LDAP_DEBUG_ANY, sbiod->sbiod_sb->sb_debug,
243 "sb_sasl_read: failed to decode packet: %s\n",
244 sasl_errstring( ret, NULL, NULL ) );
245 sb_sasl_drop_packet( &p->sec_buf_in,
246 sbiod->sbiod_sb->sb_debug );
251 /* Drop the packet from the input buffer */
252 sb_sasl_drop_packet( &p->sec_buf_in, sbiod->sbiod_sb->sb_debug );
254 p->buf_in.buf_size = p->buf_in.buf_end;
256 bufptr += ber_pvt_sb_copy_out( &p->buf_in, (char*) buf + bufptr, len );
262 sb_sasl_write( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len)
264 struct sb_sasl_data *p;
267 assert( sbiod != NULL );
268 assert( SOCKBUF_VALID( sbiod->sbiod_sb ) );
270 p = (struct sb_sasl_data *)sbiod->sbiod_pvt;
272 /* Are there anything left in the buffer? */
273 if ( p->buf_out.buf_ptr != p->buf_out.buf_end ) {
274 ret = ber_pvt_sb_do_write( sbiod, &p->buf_out );
279 /* now encode the next packet. */
280 ber_pvt_sb_buf_destroy( &p->buf_out );
281 ret = sasl_encode( p->sasl_context, buf, len, &p->buf_out.buf_base,
282 (unsigned *)&p->buf_out.buf_size );
283 if ( ret != SASL_OK ) {
284 ber_log_printf( LDAP_DEBUG_ANY, sbiod->sbiod_sb->sb_debug,
285 "sb_sasl_write: failed to encode packet: %s\n",
286 sasl_errstring( ret, NULL, NULL ) );
289 p->buf_out.buf_end = p->buf_out.buf_size;
291 ret = ber_pvt_sb_do_write( sbiod, &p->buf_out );
298 sb_sasl_ctrl( Sockbuf_IO_Desc *sbiod, int opt, void *arg )
300 struct sb_sasl_data *p;
302 p = (struct sb_sasl_data *)sbiod->sbiod_pvt;
304 if ( opt == LBER_SB_OPT_DATA_READY ) {
305 if ( p->buf_in.buf_ptr != p->buf_in.buf_end )
309 return LBER_SBIOD_CTRL_NEXT( sbiod, opt, arg );
312 Sockbuf_IO ldap_pvt_sockbuf_io_sasl = {
313 sb_sasl_setup, /* sbi_setup */
314 sb_sasl_remove, /* sbi_remove */
315 sb_sasl_ctrl, /* sbi_ctrl */
316 sb_sasl_read, /* sbi_read */
317 sb_sasl_write, /* sbi_write */
321 int ldap_pvt_sasl_install( Sockbuf *sb, void *ctx_arg )
323 Debug( LDAP_DEBUG_TRACE, "ldap_pvt_sasl_install\n",
326 /* don't install the stuff unless security has been negotiated */
328 if ( !ber_sockbuf_ctrl( sb, LBER_SB_OPT_HAS_IO,
329 &ldap_pvt_sockbuf_io_sasl ) )
332 ber_sockbuf_add_io( sb, &ber_sockbuf_io_debug,
333 LBER_SBIOD_LEVEL_APPLICATION, (void *)"sasl_" );
335 ber_sockbuf_add_io( sb, &ldap_pvt_sockbuf_io_sasl,
336 LBER_SBIOD_LEVEL_APPLICATION, ctx_arg );
343 sasl_err2ldap( int saslerr )
349 rc = LDAP_MORE_RESULTS_TO_RETURN;
352 rc = LDAP_LOCAL_ERROR;
358 rc = LDAP_LOCAL_ERROR;
364 rc = LDAP_AUTH_UNKNOWN;
367 rc = LDAP_AUTH_UNKNOWN;
370 rc = LDAP_PARAM_ERROR;
374 rc = LDAP_AUTH_UNKNOWN;
377 rc = LDAP_LOCAL_ERROR;
381 assert( rc == LDAP_SUCCESS || LDAP_API_ERROR( rc ) );
395 sasl_callback_t *session_callbacks =
396 ber_memcalloc( 2, sizeof( sasl_callback_t ) );
398 if( session_callbacks == NULL ) return LDAP_NO_MEMORY;
400 session_callbacks[0].id = SASL_CB_USER;
401 session_callbacks[0].proc = NULL;
402 session_callbacks[0].context = ld;
404 session_callbacks[1].id = SASL_CB_LIST_END;
405 session_callbacks[1].proc = NULL;
406 session_callbacks[1].context = NULL;
408 assert( lc->lconn_sasl_ctx == NULL );
410 if ( host == NULL ) {
411 ld->ld_errno = LDAP_LOCAL_ERROR;
415 rc = sasl_client_new( "ldap", host, session_callbacks,
416 SASL_SECURITY_LAYER, &ctx );
418 if ( rc != SASL_OK ) {
419 ld->ld_errno = sasl_err2ldap( rc );
423 Debug( LDAP_DEBUG_TRACE, "ldap_int_sasl_open: %s\n",
426 lc->lconn_sasl_ctx = ctx;
429 sasl_external_properties_t extprops;
430 memset(&extprops, 0L, sizeof(extprops));
433 (void) sasl_setprop( ctx, SASL_SSF_EXTERNAL,
434 (void *) &extprops );
436 Debug( LDAP_DEBUG_TRACE, "ldap_int_sasl_open: ssf=%ld\n",
443 int ldap_int_sasl_close( LDAP *ld, LDAPConn *lc )
445 sasl_conn_t *ctx = lc->lconn_sasl_ctx;
448 sasl_dispose( &ctx );
449 lc->lconn_sasl_ctx = NULL;
460 LDAPControl **sctrls,
461 LDAPControl **cctrls,
463 LDAP_SASL_INTERACT_PROC *interact,
467 const char *mech = NULL;
468 const char *pmech = NULL;
470 sasl_ssf_t *ssf = NULL;
472 sasl_interact_t *prompts = NULL;
477 Debug( LDAP_DEBUG_TRACE, "ldap_int_sasl_bind: %s\n",
478 mechs ? mechs : "<null>", 0, 0 );
480 /* do a quick !LDAPv3 check... ldap_sasl_bind will do the rest. */
481 if (ld->ld_version < LDAP_VERSION3) {
482 ld->ld_errno = LDAP_NOT_SUPPORTED;
486 ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, &sd );
488 if ( sd == AC_SOCKET_INVALID ) {
489 /* not connected yet */
492 rc = ldap_open_defconn( ld );
493 if( rc < 0 ) return ld->ld_errno;
495 ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, &sd );
497 if( sd == AC_SOCKET_INVALID ) {
498 ld->ld_errno = LDAP_LOCAL_ERROR;
503 ctx = ld->ld_defconn->lconn_sasl_ctx;
506 ld->ld_errno = LDAP_LOCAL_ERROR;
510 /* (re)set security properties */
511 sasl_setprop( ctx, SASL_SEC_PROPS,
512 &ld->ld_options.ldo_sasl_secprops );
518 saslrc = sasl_client_start( ctx,
526 if( pmech == NULL && mech != NULL ) {
529 if( flags != LDAP_SASL_QUIET ) {
531 "SASL/%s authentication started\n",
536 if( saslrc == SASL_INTERACT ) {
538 if( !interact ) break;
539 res = (interact)( ld, flags, defaults, prompts );
540 if( res != LDAP_SUCCESS ) {
544 } while ( saslrc == SASL_INTERACT );
546 ccred.bv_len = credlen;
548 if ( (saslrc != SASL_OK) && (saslrc != SASL_CONTINUE) ) {
549 ld->ld_errno = sasl_err2ldap( saslrc );
554 struct berval *scred;
559 rc = ldap_sasl_bind_s( ld, dn, mech, &ccred, sctrls, cctrls, &scred );
561 if ( ccred.bv_val != NULL ) {
562 LDAP_FREE( ccred.bv_val );
566 if ( rc != LDAP_SUCCESS && rc != LDAP_SASL_BIND_IN_PROGRESS ) {
568 /* and server provided us with data? */
569 Debug( LDAP_DEBUG_TRACE,
570 "ldap_int_sasl_bind: rc=%d sasl=%d len=%ld\n",
571 rc, saslrc, scred->bv_len );
577 if( rc == LDAP_SUCCESS && saslrc == SASL_OK ) {
578 /* we're done, no need to step */
580 /* but server provided us with data! */
581 Debug( LDAP_DEBUG_TRACE,
582 "ldap_int_sasl_bind: rc=%d sasl=%d len=%ld\n",
583 rc, saslrc, scred->bv_len );
585 return ld->ld_errno = LDAP_LOCAL_ERROR;
591 saslrc = sasl_client_step( ctx,
592 (scred == NULL) ? NULL : scred->bv_val,
593 (scred == NULL) ? 0 : scred->bv_len,
598 Debug( LDAP_DEBUG_TRACE, "sasl_client_start: %d\n",
601 if( saslrc == SASL_INTERACT ) {
603 if( !interact ) break;
604 res = (interact)( ld, flags, defaults, prompts );
605 if( res != LDAP_SUCCESS ) {
609 } while ( saslrc == SASL_INTERACT );
611 ccred.bv_len = credlen;
614 if ( (saslrc != SASL_OK) && (saslrc != SASL_CONTINUE) ) {
615 ld->ld_errno = sasl_err2ldap( saslrc );
618 } while ( rc == LDAP_SASL_BIND_IN_PROGRESS );
620 if ( rc != LDAP_SUCCESS ) {
624 if ( saslrc != SASL_OK ) {
625 return ld->ld_errno = sasl_err2ldap( saslrc );
628 if( flags != LDAP_SASL_QUIET ) {
629 saslrc = sasl_getprop( ctx, SASL_USERNAME, (void **) &data );
630 if( saslrc == SASL_OK && data && *data ) {
631 fprintf( stderr, "SASL username: %s\n", data );
634 saslrc = sasl_getprop( ctx, SASL_REALM, (void **) &data );
635 if( saslrc == SASL_OK && data && *data ) {
636 fprintf( stderr, "SASL realm: %s\n", data );
640 saslrc = sasl_getprop( ctx, SASL_SSF, (void **) &ssf );
641 if( saslrc == SASL_OK ) {
642 if( flags != LDAP_SASL_QUIET ) {
643 fprintf( stderr, "SASL SSF: %lu\n",
644 (unsigned long) *ssf );
648 if( flags != LDAP_SASL_QUIET ) {
649 fprintf( stderr, "SASL installing layers\n" );
651 ldap_pvt_sasl_install( ld->ld_sb, ctx );
659 ldap_int_sasl_external(
666 sasl_external_properties_t extprops;
668 if( ld->ld_defconn == NULL ) {
669 return LDAP_LOCAL_ERROR;
672 ctx = ld->ld_defconn->lconn_sasl_ctx;
675 return LDAP_LOCAL_ERROR;
678 memset( &extprops, '\0', sizeof(extprops) );
680 extprops.auth_id = (char *) authid;
682 sc = sasl_setprop( ctx, SASL_SSF_EXTERNAL,
683 (void *) &extprops );
685 if ( sc != SASL_OK ) {
686 return LDAP_LOCAL_ERROR;
693 int ldap_pvt_sasl_secprops(
695 sasl_security_properties_t *secprops )
698 char **props = ldap_str2charray( in, "," );
701 sasl_ssf_t max_ssf = 0;
703 sasl_ssf_t min_ssf = 0;
705 unsigned maxbufsize = 0;
706 int got_maxbufsize = 0;
708 if( props == NULL || secprops == NULL ) {
709 return LDAP_PARAM_ERROR;
712 for( i=0; props[i]; i++ ) {
713 if( !strcasecmp(props[i], "none") ) {
716 } else if( !strcasecmp(props[i], "noplain") ) {
718 sflags |= SASL_SEC_NOPLAINTEXT;
720 } else if( !strcasecmp(props[i], "noactive") ) {
722 sflags |= SASL_SEC_NOACTIVE;
724 } else if( !strcasecmp(props[i], "nodict") ) {
726 sflags |= SASL_SEC_NODICTIONARY;
728 } else if( !strcasecmp(props[i], "forwardsec") ) {
730 sflags |= SASL_SEC_FORWARD_SECRECY;
732 } else if( !strcasecmp(props[i], "noanonymous")) {
734 sflags |= SASL_SEC_NOANONYMOUS;
736 } else if( !strcasecmp(props[i], "passcred") ) {
738 sflags |= SASL_SEC_PASS_CREDENTIALS;
740 } else if( !strncasecmp(props[i],
741 "minssf=", sizeof("minssf")) )
743 if( isdigit( props[i][sizeof("minssf")] ) ) {
745 min_ssf = atoi( &props[i][sizeof("minssf")] );
747 return LDAP_NOT_SUPPORTED;
750 } else if( !strncasecmp(props[i],
751 "maxssf=", sizeof("maxssf")) )
753 if( isdigit( props[i][sizeof("maxssf")] ) ) {
755 max_ssf = atoi( &props[i][sizeof("maxssf")] );
757 return LDAP_NOT_SUPPORTED;
760 } else if( !strncasecmp(props[i],
761 "maxbufsize=", sizeof("maxbufsize")) )
763 if( isdigit( props[i][sizeof("maxbufsize")] ) ) {
765 maxbufsize = atoi( &props[i][sizeof("maxbufsize")] );
767 return LDAP_NOT_SUPPORTED;
771 return LDAP_NOT_SUPPORTED;
776 secprops->security_flags = sflags;
779 secprops->min_ssf = min_ssf;
782 secprops->max_ssf = max_ssf;
785 secprops->maxbufsize = maxbufsize;
788 ldap_charray_free( props );
793 ldap_int_sasl_config( struct ldapoptions *lo, int option, const char *arg )
798 case LDAP_OPT_X_SASL_SECPROPS:
799 rc = ldap_pvt_sasl_secprops( arg, &lo->ldo_sasl_secprops );
800 if( rc == LDAP_SUCCESS ) return 0;
807 ldap_int_sasl_get_option( LDAP *ld, int option, void *arg )
813 case LDAP_OPT_X_SASL_MECH: {
814 *(char **)arg = ld->ld_options.ldo_def_sasl_mech
815 ? LDAP_STRDUP( ld->ld_options.ldo_def_sasl_mech ) : NULL;
817 case LDAP_OPT_X_SASL_REALM: {
818 *(char **)arg = ld->ld_options.ldo_def_sasl_realm
819 ? LDAP_STRDUP( ld->ld_options.ldo_def_sasl_realm ) : NULL;
821 case LDAP_OPT_X_SASL_AUTHCID: {
822 *(char **)arg = ld->ld_options.ldo_def_sasl_authcid
823 ? LDAP_STRDUP( ld->ld_options.ldo_def_sasl_authcid ) : NULL;
825 case LDAP_OPT_X_SASL_AUTHZID: {
826 *(char **)arg = ld->ld_options.ldo_def_sasl_authzid
827 ? LDAP_STRDUP( ld->ld_options.ldo_def_sasl_authzid ) : NULL;
830 case LDAP_OPT_X_SASL_SSF: {
835 if( ld->ld_defconn == NULL ) {
839 ctx = ld->ld_defconn->lconn_sasl_ctx;
845 sc = sasl_getprop( ctx, SASL_SSF,
848 if ( sc != SASL_OK ) {
852 *(ber_len_t *)arg = *ssf;
855 case LDAP_OPT_X_SASL_SSF_EXTERNAL:
856 /* this option is write only */
859 case LDAP_OPT_X_SASL_SSF_MIN:
860 *(ber_len_t *)arg = ld->ld_options.ldo_sasl_secprops.min_ssf;
862 case LDAP_OPT_X_SASL_SSF_MAX:
863 *(ber_len_t *)arg = ld->ld_options.ldo_sasl_secprops.max_ssf;
865 case LDAP_OPT_X_SASL_MAXBUFSIZE:
866 *(ber_len_t *)arg = ld->ld_options.ldo_sasl_secprops.maxbufsize;
869 case LDAP_OPT_X_SASL_SECPROPS:
870 /* this option is write only */
880 ldap_int_sasl_set_option( LDAP *ld, int option, void *arg )
886 case LDAP_OPT_X_SASL_SSF:
887 /* This option is read-only */
890 case LDAP_OPT_X_SASL_SSF_EXTERNAL: {
892 sasl_external_properties_t extprops;
895 if( ld->ld_defconn == NULL ) {
899 ctx = ld->ld_defconn->lconn_sasl_ctx;
905 memset(&extprops, 0L, sizeof(extprops));
907 extprops.ssf = * (ber_len_t *) arg;
909 sc = sasl_setprop( ctx, SASL_SSF_EXTERNAL,
910 (void *) &extprops );
912 if ( sc != SASL_OK ) {
917 case LDAP_OPT_X_SASL_SSF_MIN:
918 ld->ld_options.ldo_sasl_secprops.min_ssf = *(ber_len_t *)arg;
920 case LDAP_OPT_X_SASL_SSF_MAX:
921 ld->ld_options.ldo_sasl_secprops.max_ssf = *(ber_len_t *)arg;
923 case LDAP_OPT_X_SASL_MAXBUFSIZE:
924 ld->ld_options.ldo_sasl_secprops.maxbufsize = *(ber_len_t *)arg;
927 case LDAP_OPT_X_SASL_SECPROPS: {
929 sc = ldap_pvt_sasl_secprops( (char *) arg,
930 &ld->ld_options.ldo_sasl_secprops );
932 return sc == LDAP_SUCCESS ? 0 : -1;
941 #ifdef LDAP_R_COMPILE
942 void *ldap_pvt_sasl_mutex_new(void)
944 ldap_pvt_thread_mutex_t *mutex;
946 mutex = (ldap_pvt_thread_mutex_t *) LDAP_MALLOC(
947 sizeof(ldap_pvt_thread_mutex_t) );
949 if ( ldap_pvt_thread_mutex_init( mutex ) == 0 ) {
955 int ldap_pvt_sasl_mutex_lock(void *mutex)
957 return ldap_pvt_thread_mutex_lock( (ldap_pvt_thread_mutex_t *)mutex )
958 ? SASL_FAIL : SASL_OK;
961 int ldap_pvt_sasl_mutex_unlock(void *mutex)
963 return ldap_pvt_thread_mutex_unlock( (ldap_pvt_thread_mutex_t *)mutex )
964 ? SASL_FAIL : SASL_OK;
967 void ldap_pvt_sasl_mutex_dispose(void *mutex)
969 (void) ldap_pvt_thread_mutex_destroy( (ldap_pvt_thread_mutex_t *)mutex );
975 int ldap_int_sasl_init( void )
976 { return LDAP_SUCCESS; }
978 int ldap_int_sasl_close( LDAP *ld, LDAPConn *lc )
979 { return LDAP_SUCCESS; }
986 LDAPControl **sctrls,
987 LDAPControl **cctrls,
989 LDAP_SASL_INTERACT_PROC *interact,
991 { return LDAP_NOT_SUPPORTED; }
994 ldap_int_sasl_external(
998 { return LDAP_SUCCESS; }
1000 #endif /* HAVE_CYRUS_SASL */