From: Kurt Zeilenga Date: Sun, 9 Aug 1998 03:04:12 +0000 (+0000) Subject: LDAPworldP15: Internal LDAP function rename X-Git-Tag: LDAP_3_3+prerelease~27^2~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=29eda9c7997e57c4907534e817850389e966c23a;p=openldap LDAPworldP15: Internal LDAP function rename --- diff --git a/libraries/libldap/abandon.c b/libraries/libldap/abandon.c index 18324260bd..377beb7eb3 100644 --- a/libraries/libldap/abandon.c +++ b/libraries/libldap/abandon.c @@ -107,7 +107,7 @@ do_abandon( LDAP *ld, int origid, int msgid ) err = 0; if ( sendabandon ) { /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { err = -1; ld->ld_errno = LDAP_NO_MEMORY; } else { @@ -151,10 +151,10 @@ do_abandon( LDAP *ld, int origid, int msgid ) #ifdef LDAP_REFERRALS if ( lr != NULL ) { if ( sendabandon ) { - free_connection( ld, lr->lr_conn, 0, 1 ); + ldap_free_connection( ld, lr->lr_conn, 0, 1 ); } if ( origid == msgid ) { - free_request( ld, lr ); + ldap_free_request( ld, lr ); } } #endif /* LDAP_REFERRALS */ diff --git a/libraries/libldap/add.c b/libraries/libldap/add.c index b79cd09b9d..143e36e161 100644 --- a/libraries/libldap/add.c +++ b/libraries/libldap/add.c @@ -69,7 +69,7 @@ ldap_add( LDAP *ld, char *dn, LDAPMod **attrs ) Debug( LDAP_DEBUG_TRACE, "ldap_add\n", 0, 0, 0 ); /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( -1 ); } @@ -103,7 +103,7 @@ ldap_add( LDAP *ld, char *dn, LDAPMod **attrs ) } /* send the message */ - return( send_initial_request( ld, LDAP_REQ_ADD, dn, ber )); + return( ldap_send_initial_request( ld, LDAP_REQ_ADD, dn, ber )); } int diff --git a/libraries/libldap/cache.c b/libraries/libldap/cache.c index 197f4fb9e3..7925f08fe0 100644 --- a/libraries/libldap/cache.c +++ b/libraries/libldap/cache.c @@ -214,12 +214,12 @@ uncache_entry_or_req( LDAP *ld, void -add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) +ldap_add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) { LDAPMessage *new; long len; - Debug( LDAP_DEBUG_TRACE, "add_request_to_cache\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_add_request_to_cache\n", 0, 0, 0 ); ld->ld_errno = LDAP_SUCCESS; if ( ld->ld_cache == NULLLDCACHE || @@ -229,7 +229,7 @@ add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) if (( new = (LDAPMessage *) calloc( 1, sizeof(LDAPMessage) )) != NULL ) { - if (( new->lm_ber = alloc_ber_with_options( ld )) == NULLBER ) { + if (( new->lm_ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { free( (char *)new ); return; } @@ -256,12 +256,12 @@ add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) void -add_result_to_cache( LDAP *ld, LDAPMessage *result ) +ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result ) { LDAPMessage *m, **mp, *req, *new, *prev; int err, keep; - Debug( LDAP_DEBUG_TRACE, "add_result_to_cache: id %d, type %d\n", + Debug( LDAP_DEBUG_TRACE, "ldap_add_result_to_cache: id %d, type %d\n", result->lm_msgid, result->lm_msgtype, 0 ); if ( ld->ld_cache == NULLLDCACHE || @@ -369,14 +369,14 @@ add_result_to_cache( LDAP *ld, LDAPMessage *result ) * will find them. */ int -check_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) +ldap_check_cache( LDAP *ld, unsigned long msgtype, BerElement *request ) { LDAPMessage *m, *new, *prev, *next; BerElement reqber; int first, hash; unsigned long validtime; - Debug( LDAP_DEBUG_TRACE, "check_cache\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_check_cache\n", 0, 0, 0 ); if ( ld->ld_cache == NULLLDCACHE || ( ld->ld_cache->lc_enabled == 0 )) { diff --git a/libraries/libldap/cldap.c b/libraries/libldap/cldap.c index 19782f77d8..806a6ce91c 100644 --- a/libraries/libldap/cldap.c +++ b/libraries/libldap/cldap.c @@ -170,7 +170,7 @@ cldap_open( char *host, int port ) if ( ld->ld_sb.sb_addrs == NULL #ifdef LDAP_REFERRALS - || ( ld->ld_defconn = new_connection( ld, NULL, 1,0,0 )) == NULL + || ( ld->ld_defconn = ldap_new_connection( ld, NULL, 1,0,0 )) == NULL #endif /* LDAP_REFERRALS */ ) { free( ld ); @@ -316,7 +316,7 @@ cldap_result( LDAP *ld, int msgid, LDAPMessage **res, "cldap_result waiting up to %d seconds for a response\n", tv.tv_sec, 0, 0 ); ber_init( &ber, 0 ); - set_ber_options( ld, &ber ); + ldap_set_ber_options( ld, &ber ); if ( cldap_getmsg( ld, &tv, &ber ) == -1 ) { ret = ld->ld_errno; @@ -432,7 +432,7 @@ cldap_parsemsg( LDAP *ld, int msgid, BerElement *ber, tag != LBER_DEFAULT && rc != LDAP_SUCCESS; tag = ber_next_element( ber, &len, cookie )) { if (( ldm = (LDAPMessage *)calloc( 1, sizeof(LDAPMessage))) - == NULL || ( ldm->lm_ber = alloc_ber_with_options( ld )) + == NULL || ( ldm->lm_ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { rc = LDAP_NO_MEMORY; break; /* return w/error*/ @@ -506,7 +506,7 @@ cldap_parsemsg( LDAP *ld, int msgid, BerElement *ber, #ifndef NO_CACHE if ( ld->ld_cache != NULL ) { - add_result_to_cache( ld, ldm ); + ldap_add_result_to_cache( ld, ldm ); } #endif /* NO_CACHE */ diff --git a/libraries/libldap/compare.c b/libraries/libldap/compare.c index 74388f1cea..ba9f89850c 100644 --- a/libraries/libldap/compare.c +++ b/libraries/libldap/compare.c @@ -52,7 +52,7 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value ) Debug( LDAP_DEBUG_TRACE, "ldap_compare\n", 0, 0, 0 ); /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( -1 ); } @@ -65,17 +65,17 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value ) #ifndef NO_CACHE if ( ld->ld_cache != NULL ) { - if ( check_cache( ld, LDAP_REQ_COMPARE, ber ) == 0 ) { + if ( ldap_check_cache( ld, LDAP_REQ_COMPARE, ber ) == 0 ) { ber_free( ber, 1 ); ld->ld_errno = LDAP_SUCCESS; return( ld->ld_msgid ); } - add_request_to_cache( ld, LDAP_REQ_COMPARE, ber ); + ldap_add_request_to_cache( ld, LDAP_REQ_COMPARE, ber ); } #endif /* NO_CACHE */ /* send the message */ - return ( send_initial_request( ld, LDAP_REQ_COMPARE, dn, ber )); + return ( ldap_send_initial_request( ld, LDAP_REQ_COMPARE, dn, ber )); } int diff --git a/libraries/libldap/delete.c b/libraries/libldap/delete.c index 47e240ea6a..75344ddd88 100644 --- a/libraries/libldap/delete.c +++ b/libraries/libldap/delete.c @@ -51,7 +51,7 @@ ldap_delete( LDAP *ld, char *dn ) Debug( LDAP_DEBUG_TRACE, "ldap_delete\n", 0, 0, 0 ); /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( -1 ); } @@ -63,7 +63,7 @@ ldap_delete( LDAP *ld, char *dn ) } /* send the message */ - return ( send_initial_request( ld, LDAP_REQ_DELETE, dn, ber )); + return ( ldap_send_initial_request( ld, LDAP_REQ_DELETE, dn, ber )); } diff --git a/libraries/libldap/getattr.c b/libraries/libldap/getattr.c index 50caa774c5..f893529e8c 100644 --- a/libraries/libldap/getattr.c +++ b/libraries/libldap/getattr.c @@ -36,7 +36,7 @@ ldap_first_attribute( LDAP *ld, LDAPMessage *entry, BerElement **ber ) Debug( LDAP_DEBUG_TRACE, "ldap_first_attribute\n", 0, 0, 0 ); - if ( (*ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (*ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( NULL ); } diff --git a/libraries/libldap/getdxbyname.c b/libraries/libldap/getdxbyname.c index 50683f6c37..833af5adae 100644 --- a/libraries/libldap/getdxbyname.c +++ b/libraries/libldap/getdxbyname.c @@ -3,7 +3,7 @@ * Copyright (c) 1995 Regents of the University of Michigan. * All rights reserved. * - * getdxbyname - retrieve DX records from the DNS (from TXT records for now) + * ldap_getdxbyname - retrieve DX records from the DNS (from TXT records for now) */ #include #include @@ -47,17 +47,17 @@ extern char *h_errlist[]; /* - * getdxbyname - lookup DNS DX records for domain and return an ordered + * ldap_getdxbyname - lookup DNS DX records for domain and return an ordered * array. */ char ** -getdxbyname( char *domain ) +ldap_getdxbyname( char *domain ) { unsigned char buf[ PACKETSZ ]; char **dxs; int rc; - Debug( LDAP_DEBUG_TRACE, "getdxbyname( %s )\n", domain, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_getdxbyname( %s )\n", domain, 0, 0 ); memset( buf, 0, sizeof( buf )); diff --git a/libraries/libldap/kbind.c b/libraries/libldap/kbind.c index ce4a8a7f6d..6ed05253c0 100644 --- a/libraries/libldap/kbind.c +++ b/libraries/libldap/kbind.c @@ -52,7 +52,7 @@ ldap_kerberos_bind1( LDAP *ld, char *dn ) BerElement *ber; char *cred; int rc, credlen; - char *get_kerberosv4_credentials(); + char *ldap_get_kerberosv4_credentials(); #ifdef STR_TRANSLATION int str_translation_on; #endif /* STR_TRANSLATION */ @@ -75,13 +75,13 @@ ldap_kerberos_bind1( LDAP *ld, char *dn ) if ( dn == NULL ) dn = ""; - if ( (cred = get_kerberosv4_credentials( ld, dn, "ldapserver", + if ( (cred = ldap_get_kerberosv4_credentials( ld, dn, "ldapserver", &credlen )) == NULL ) { return( -1 ); /* ld_errno should already be set */ } /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { free( cred ); return( -1 ); } @@ -119,7 +119,7 @@ ldap_kerberos_bind1( LDAP *ld, char *dn ) #endif /* !NO_CACHE */ /* send the message */ - return ( send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); + return ( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); } int @@ -159,7 +159,7 @@ ldap_kerberos_bind2( LDAP *ld, char *dn ) BerElement *ber; char *cred; int rc, credlen; - char *get_kerberosv4_credentials(); + char *ldap_get_kerberosv4_credentials(); #ifdef STR_TRANSLATION int str_translation_on; #endif /* STR_TRANSLATION */ @@ -169,13 +169,13 @@ ldap_kerberos_bind2( LDAP *ld, char *dn ) if ( dn == NULL ) dn = ""; - if ( (cred = get_kerberosv4_credentials( ld, dn, "x500dsa", &credlen )) + if ( (cred = ldap_get_kerberosv4_credentials( ld, dn, "x500dsa", &credlen )) == NULL ) { return( -1 ); /* ld_errno should already be set */ } /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { free( cred ); return( -1 ); } @@ -207,7 +207,7 @@ ldap_kerberos_bind2( LDAP *ld, char *dn ) } /* send the message */ - return ( send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); + return ( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); } /* synchronous bind to DSA using kerberos */ @@ -249,19 +249,19 @@ ldap_kerberos_bind_s( LDAP *ld, char *dn ) #ifndef AUTHMAN /* - * get_kerberosv4_credentials - obtain kerberos v4 credentials for ldap. + * ldap_get_kerberosv4_credentials - obtain kerberos v4 credentials for ldap. * The dn of the entry to which to bind is supplied. It's assumed the * user already has a tgt. */ char * -get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ) +ldap_get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ) { KTEXT_ST ktxt; int err; char realm[REALM_SZ], *cred, *krbinstance; - Debug( LDAP_DEBUG_TRACE, "get_kerberosv4_credentials\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_get_kerberosv4_credentials\n", 0, 0, 0 ); if ( (err = krb_get_tf_realm( tkt_string(), realm )) != KSUCCESS ) { #ifndef NO_USERINTERFACE diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index c44c5910e8..e841a35b5b 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -27,14 +27,14 @@ * in cache.c */ #ifdef NEEDPROTOS -void add_request_to_cache( LDAP *ld, unsigned long msgtype, +void ldap_add_request_to_cache( LDAP *ld, unsigned long msgtype, BerElement *request ); -void add_result_to_cache( LDAP *ld, LDAPMessage *result ); -int check_cache( LDAP *ld, unsigned long msgtype, BerElement *request ); +void ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result ); +int ldap_check_cache( LDAP *ld, unsigned long msgtype, BerElement *request ); #else /* NEEDPROTOS */ -void add_request_to_cache(); -void add_result_to_cache(); -int check_cache(); +void ldap_add_request_to_cache(); +void ldap_add_result_to_cache(); +int ldap_check_cache(); #endif /* NEEDPROTOS */ @@ -43,10 +43,10 @@ int check_cache(); * in kerberos.c */ #ifdef NEEDPROTOS -char *get_kerberosv4_credentials( LDAP *ld, char *who, char *service, +char *ldap_get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ); #else /* NEEDPROTOS */ -char *get_kerberosv4_credentials(); +char *ldap_get_kerberosv4_credentials(); #endif /* NEEDPROTOS */ #endif /* KERBEROS */ @@ -67,17 +67,17 @@ int open_ldap_connection(); * in os-ip.c */ #ifdef NEEDPROTOS -int connect_to_host( Sockbuf *sb, char *host, unsigned long address, int port, +int ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address, int port, int async ); -void close_connection( Sockbuf *sb ); +void ldap_close_connection( Sockbuf *sb ); #else /* NEEDPROTOS */ -int connect_to_host(); -void close_connection(); +int ldap_connect_to_host(); +void ldap_close_connection(); #endif /* NEEDPROTOS */ #ifdef KERBEROS #ifdef NEEDPROTOS -char *host_connected_to( Sockbuf *sb ); +char *ldap_host_connected_to( Sockbuf *sb ); #else /* NEEDPROTOS */ char *host_connected_to(); #endif /* NEEDPROTOS */ @@ -86,22 +86,22 @@ char *host_connected_to(); #ifdef LDAP_REFERRALS #ifdef NEEDPROTOS int do_ldap_select( LDAP *ld, struct timeval *timeout ); -void *new_select_info( void ); -void free_select_info( void *sip ); -void mark_select_write( LDAP *ld, Sockbuf *sb ); -void mark_select_read( LDAP *ld, Sockbuf *sb ); -void mark_select_clear( LDAP *ld, Sockbuf *sb ); -int is_read_ready( LDAP *ld, Sockbuf *sb ); -int is_write_ready( LDAP *ld, Sockbuf *sb ); +void *ldap_new_select_info( void ); +void ldap_free_select_info( void *sip ); +void ldap_mark_select_write( LDAP *ld, Sockbuf *sb ); +void ldap_mark_select_read( LDAP *ld, Sockbuf *sb ); +void ldap_mark_select_clear( LDAP *ld, Sockbuf *sb ); +int ldap_is_read_ready( LDAP *ld, Sockbuf *sb ); +int ldap_is_write_ready( LDAP *ld, Sockbuf *sb ); #else /* NEEDPROTOS */ int do_ldap_select(); -void *new_select_info(); -void free_select_info(); -void mark_select_write(); -void mark_select_read(); -void mark_select_clear(); -int is_read_ready(); -int is_write_ready(); +void *ldap_new_select_info(); +void ldap_free_select_info(); +void ldap_mark_select_write(); +void ldap_mark_select_read(); +void ldap_mark_select_clear(); +int ldap_is_read_ready(); +int ldap_is_write_ready(); #endif /* NEEDPROTOS */ #endif /* LDAP_REFERRALS */ @@ -110,46 +110,46 @@ int is_write_ready(); * in request.c */ #ifdef NEEDPROTOS -int send_initial_request( LDAP *ld, unsigned long msgtype, +int ldap_send_initial_request( LDAP *ld, unsigned long msgtype, char *dn, BerElement *ber ); -BerElement *alloc_ber_with_options( LDAP *ld ); -void set_ber_options( LDAP *ld, BerElement *ber ); +BerElement *ldap_alloc_ber_with_options( LDAP *ld ); +void ldap_set_ber_options( LDAP *ld, BerElement *ber ); #else /* NEEDPROTOS */ -int send_initial_request(); -BerElement *alloc_ber_with_options(); -void set_ber_options(); +int ldap_send_initial_request(); +BerElement *ldap_alloc_ber_with_options(); +void ldap_set_ber_options(); #endif /* NEEDPROTOS */ #if defined( LDAP_REFERRALS ) || defined( LDAP_DNS ) #ifdef NEEDPROTOS -int send_server_request( LDAP *ld, BerElement *ber, int msgid, +int ldap_send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest *parentreq, LDAPServer *srvlist, LDAPConn *lc, int bind ); -LDAPConn *new_connection( LDAP *ld, LDAPServer **srvlistp, int use_ldsb, +LDAPConn *ldap_new_connection( LDAP *ld, LDAPServer **srvlistp, int use_ldsb, int connect, int bind ); -LDAPRequest *find_request_by_msgid( LDAP *ld, int msgid ); -void free_request( LDAP *ld, LDAPRequest *lr ); -void free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ); -void dump_connection( LDAP *ld, LDAPConn *lconns, int all ); -void dump_requests_and_responses( LDAP *ld ); +LDAPRequest *ldap_find_request_by_msgid( LDAP *ld, int msgid ); +void ldap_free_request( LDAP *ld, LDAPRequest *lr ); +void ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ); +void ldap_dump_connection( LDAP *ld, LDAPConn *lconns, int all ); +void ldap_dump_requests_and_responses( LDAP *ld ); #else /* NEEDPROTOS */ -int send_server_request(); -LDAPConn *new_connection(); -LDAPRequest *find_request_by_msgid(); -void free_request(); -void free_connection(); -void dump_connection(); -void dump_requests_and_responses(); +int ldap_send_server_request(); +LDAPConn *ldap_new_connection(); +LDAPRequest *ldap_find_request_by_msgid(); +void ldap_free_request(); +void ldap_free_connection(); +void ldap_dump_connection(); +void ldap_dump_requests_and_responses(); #endif /* NEEDPROTOS */ #endif /* LDAP_REFERRALS || LDAP_DNS */ #ifdef LDAP_REFERRALS #ifdef NEEDPROTOS -int chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ); -int append_referral( LDAP *ld, char **referralsp, char *s ); +int ldap_chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ); +int ldap_append_referral( LDAP *ld, char **referralsp, char *s ); #else /* NEEDPROTOS */ -int chase_referrals(); -int append_referral(); +int ldap_chase_referrals(); +int ldap_append_referral(); #endif /* NEEDPROTOS */ #endif /* LDAP_REFERRALS */ @@ -170,10 +170,10 @@ BerElement *ldap_build_search_req(); */ #ifdef NEEDPROTOS int ldap_ld_free( LDAP *ld, int close ); -int send_unbind( LDAP *ld, Sockbuf *sb ); +int ldap_send_unbind( LDAP *ld, Sockbuf *sb ); #else /* NEEDPROTOS */ int ldap_ld_free(); -int send_unbind(); +int ldap_send_unbind(); #endif /* NEEDPROTOS */ @@ -182,9 +182,9 @@ int send_unbind(); * in getdxbyname.c */ #ifdef NEEDPROTOS -char **getdxbyname( char *domain ); +char **ldap_getdxbyname( char *domain ); #else /* NEEDPROTOS */ -char **getdxbyname(); +char **ldap_getdxbyname(); #endif /* NEEDPROTOS */ #endif /* LDAP_DNS */ diff --git a/libraries/libldap/modify.c b/libraries/libldap/modify.c index 316dde787f..63f1cdc023 100644 --- a/libraries/libldap/modify.c +++ b/libraries/libldap/modify.c @@ -69,7 +69,7 @@ ldap_modify( LDAP *ld, char *dn, LDAPMod **mods ) Debug( LDAP_DEBUG_TRACE, "ldap_modify\n", 0, 0, 0 ); /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( -1 ); } @@ -105,7 +105,7 @@ ldap_modify( LDAP *ld, char *dn, LDAPMod **mods ) } /* send the message */ - return( send_initial_request( ld, LDAP_REQ_MODIFY, dn, ber )); + return( ldap_send_initial_request( ld, LDAP_REQ_MODIFY, dn, ber )); } int diff --git a/libraries/libldap/modrdn.c b/libraries/libldap/modrdn.c index f4624a919a..1532f86917 100644 --- a/libraries/libldap/modrdn.c +++ b/libraries/libldap/modrdn.c @@ -53,7 +53,7 @@ ldap_modrdn2( LDAP *ld, char *dn, char *newrdn, int deleteoldrdn ) Debug( LDAP_DEBUG_TRACE, "ldap_modrdn\n", 0, 0, 0 ); /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( -1 ); } @@ -65,7 +65,7 @@ ldap_modrdn2( LDAP *ld, char *dn, char *newrdn, int deleteoldrdn ) } /* send the message */ - return ( send_initial_request( ld, LDAP_REQ_MODRDN, dn, ber )); + return ( ldap_send_initial_request( ld, LDAP_REQ_MODRDN, dn, ber )); } int diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index 3ca73f336d..a145ca0783 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -81,7 +81,7 @@ ldap_open( char *host, int port ) } srv->lsrv_port = ld->ld_defport; - if (( ld->ld_defconn = new_connection( ld, &srv, 1,1,0 )) == NULL ) { + if (( ld->ld_defconn = ldap_new_connection( ld, &srv, 1,1,0 )) == NULL ) { if ( ld->ld_defhost != NULL ) free( srv->lsrv_host ); free( (char *)srv ); ldap_ld_free( ld, 0 ); @@ -126,7 +126,7 @@ ldap_init( char *defhost, int defport ) } #ifdef LDAP_REFERRALS - if (( ld->ld_selectinfo = new_select_info()) == NULL ) { + if (( ld->ld_selectinfo = ldap_new_select_info()) == NULL ) { free( (char*)ld ); return( NULL ); } @@ -136,7 +136,7 @@ ldap_init( char *defhost, int defport ) if ( defhost != NULL && ( ld->ld_defhost = strdup( defhost )) == NULL ) { #ifdef LDAP_REFERRALS - free_select_info( ld->ld_selectinfo ); + ldap_free_select_info( ld->ld_selectinfo ); #endif /* LDAP_REFERRALS */ free( (char*)ld ); return( NULL ); @@ -201,13 +201,13 @@ open_ldap_connection( LDAP *ld, Sockbuf *sb, char *host, int defport, port = defport; } - if (( rc = connect_to_host( sb, curhost, 0L, + if (( rc = ldap_connect_to_host( sb, curhost, 0L, port, async )) != -1 ) { break; } } } else { - rc = connect_to_host( sb, NULL, htonl( INADDR_LOOPBACK ), + rc = ldap_connect_to_host( sb, NULL, htonl( INADDR_LOOPBACK ), defport, async ); } @@ -217,7 +217,7 @@ open_ldap_connection( LDAP *ld, Sockbuf *sb, char *host, int defport, if ( krbinstancep != NULL ) { #ifdef KERBEROS - if (( *krbinstancep = host_connected_to( sb )) != NULL && + if (( *krbinstancep = ldap_host_connected_to( sb )) != NULL && ( p = strchr( *krbinstancep, '.' )) != NULL ) { *p = '\0'; } diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index ce1ab0e2a8..955a5fab52 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -64,9 +64,10 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of #endif /* DOS */ #endif /* MACOS */ +#include "ldap-int.h" int -connect_to_host( Sockbuf *sb, char *host, unsigned long address, +ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address, int port, int async ) /* * if host == NULL, connect using address @@ -85,7 +86,7 @@ connect_to_host( Sockbuf *sb, char *host, unsigned long address, #endif /* LDAP_REFERRALS */ #endif /* notyet */ - Debug( LDAP_DEBUG_TRACE, "connect_to_host: %s:%d\n", + Debug( LDAP_DEBUG_TRACE, "ldap_connect_to_host: %s:%d\n", ( host == NULL ) ? "(by address)" : host, ntohs( port ), 0 ); connected = use_hp = 0; @@ -174,7 +175,7 @@ connect_to_host( Sockbuf *sb, char *host, unsigned long address, void -close_connection( Sockbuf *sb ) +ldap_close_connection( Sockbuf *sb ) { tcp_close( sb->sb_sd ); } @@ -182,7 +183,7 @@ close_connection( Sockbuf *sb ) #ifdef KERBEROS char * -host_connected_to( Sockbuf *sb ) +ldap_host_connected_to( Sockbuf *sb ) { struct hostent *hp; char *p; @@ -223,7 +224,7 @@ struct selectinfo { void -mark_select_write( LDAP *ld, Sockbuf *sb ) +ldap_mark_select_write( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; @@ -236,7 +237,7 @@ mark_select_write( LDAP *ld, Sockbuf *sb ) void -mark_select_read( LDAP *ld, Sockbuf *sb ) +ldap_mark_select_read( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; @@ -249,7 +250,7 @@ mark_select_read( LDAP *ld, Sockbuf *sb ) void -mark_select_clear( LDAP *ld, Sockbuf *sb ) +ldap_mark_select_clear( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; @@ -261,7 +262,7 @@ mark_select_clear( LDAP *ld, Sockbuf *sb ) int -is_write_ready( LDAP *ld, Sockbuf *sb ) +ldap_is_write_ready( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; @@ -272,7 +273,7 @@ is_write_ready( LDAP *ld, Sockbuf *sb ) int -is_read_ready( LDAP *ld, Sockbuf *sb ) +ldap_is_read_ready( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; @@ -283,7 +284,7 @@ is_read_ready( LDAP *ld, Sockbuf *sb ) void * -new_select_info() +ldap_new_select_info() { struct selectinfo *sip; @@ -298,7 +299,7 @@ new_select_info() void -free_select_info( void *sip ) +ldap_free_select_info( void *sip ) { free( sip ); } diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index 5e44c47824..1bbfab9219 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -83,7 +83,7 @@ static BerElement *re_encode_request(); BerElement * -alloc_ber_with_options( LDAP *ld ) +ldap_alloc_ber_with_options( LDAP *ld ) { BerElement *ber; @@ -91,7 +91,7 @@ alloc_ber_with_options( LDAP *ld ) ld->ld_errno = LDAP_NO_MEMORY; #ifdef STR_TRANSLATION } else { - set_ber_options( ld, ber ); + ldap_set_ber_options( ld, ber ); #endif /* STR_TRANSLATION */ } @@ -100,7 +100,7 @@ alloc_ber_with_options( LDAP *ld ) void -set_ber_options( LDAP *ld, BerElement *ber ) +ldap_set_ber_options( LDAP *ld, BerElement *ber ) { ber->ber_options = ld->ld_lberoptions; #ifdef STR_TRANSLATION @@ -114,14 +114,14 @@ set_ber_options( LDAP *ld, BerElement *ber ) int -send_initial_request( LDAP *ld, unsigned long msgtype, char *dn, +ldap_send_initial_request( LDAP *ld, unsigned long msgtype, char *dn, BerElement *ber ) { #if defined( LDAP_REFERRALS ) || defined( LDAP_DNS ) LDAPServer *servers; #endif /* LDAP_REFERRALS || LDAP_DNS */ - Debug( LDAP_DEBUG_TRACE, "send_initial_request\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_send_initial_request\n", 0, 0, 0 ); #if !defined( LDAP_REFERRALS ) && !defined( LDAP_DNS ) if ( ber_flush( &ld->ld_sb, ber, 1 ) != 0 ) { @@ -165,7 +165,7 @@ send_initial_request( LDAP *ld, unsigned long msgtype, char *dn, } #endif /* LDAP_DNS */ - return( send_server_request( ld, ber, ld->ld_msgid, NULL, servers, + return( ldap_send_server_request( ld, ber, ld->ld_msgid, NULL, servers, NULL, 0 )); #endif /* !LDAP_REFERRALS && !LDAP_DNS */ } @@ -174,13 +174,13 @@ send_initial_request( LDAP *ld, unsigned long msgtype, char *dn, #if defined( LDAP_REFERRALS ) || defined( LDAP_DNS ) int -send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest +ldap_send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest *parentreq, LDAPServer *srvlist, LDAPConn *lc, int bind ) { LDAPRequest *lr; int incparent; - Debug( LDAP_DEBUG_TRACE, "send_server_request\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_send_server_request\n", 0, 0, 0 ); incparent = 0; ld->ld_errno = LDAP_SUCCESS; /* optimistic */ @@ -196,7 +196,7 @@ send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest incparent = 1; ++parentreq->lr_outrefcnt; } - lc = new_connection( ld, &srvlist, 0, 1, bind ); + lc = ldap_new_connection( ld, &srvlist, 0, 1, bind ); } free_servers( srvlist ); } @@ -218,7 +218,7 @@ send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest if (( lr = (LDAPRequest *)calloc( 1, sizeof( LDAPRequest ))) == NULL ) { ld->ld_errno = LDAP_NO_MEMORY; - free_connection( ld, lc, 0, 0 ); + ldap_free_connection( ld, lc, 0, 0 ); ber_free( ber, 1 ); if ( incparent ) { /* Forget about the bind */ @@ -258,12 +258,12 @@ send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest if ( errno == EWOULDBLOCK ) { /* need to continue write later */ lr->lr_status = LDAP_REQST_WRITING; - mark_select_write( ld, lc->lconn_sb ); + ldap_mark_select_write( ld, lc->lconn_sb ); } else { #else /* notyet */ ld->ld_errno = LDAP_SERVER_DOWN; - free_request( ld, lr ); - free_connection( ld, lc, 0, 0 ); + ldap_free_request( ld, lr ); + ldap_free_connection( ld, lc, 0, 0 ); return( -1 ); #endif /* notyet */ #ifdef notyet @@ -276,7 +276,7 @@ send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest } /* sent -- waiting for a response */ - mark_select_read( ld, lc->lconn_sb ); + ldap_mark_select_read( ld, lc->lconn_sb ); } ld->ld_errno = LDAP_SUCCESS; @@ -285,7 +285,7 @@ send_server_request( LDAP *ld, BerElement *ber, int msgid, LDAPRequest LDAPConn * -new_connection( LDAP *ld, LDAPServer **srvlistp, int use_ldsb, +ldap_new_connection( LDAP *ld, LDAPServer **srvlistp, int use_ldsb, int connect, int bind ) { LDAPConn *lc; @@ -385,7 +385,7 @@ new_connection( LDAP *ld, LDAPServer **srvlistp, int use_ldsb, } if ( err != 0 ) { - free_connection( ld, lc, 1, 0 ); + ldap_free_connection( ld, lc, 1, 0 ); lc = NULL; } } @@ -432,19 +432,19 @@ use_connection( LDAP *ld, LDAPConn *lc ) void -free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ) +ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ) { LDAPConn *tmplc, *prevlc; - Debug( LDAP_DEBUG_TRACE, "free_connection\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_free_connection\n", 0, 0, 0 ); if ( force || --lc->lconn_refcnt <= 0 ) { if ( lc->lconn_status == LDAP_CONNST_CONNECTED ) { - mark_select_clear( ld, lc->lconn_sb ); + ldap_mark_select_clear( ld, lc->lconn_sb ); if ( unbind ) { - send_unbind( ld, lc->lconn_sb ); + ldap_send_unbind( ld, lc->lconn_sb ); } - close_connection( lc->lconn_sb ); + ldap_close_connection( lc->lconn_sb ); if ( lc->lconn_sb->sb_ber.ber_buf != NULL ) { free( lc->lconn_sb->sb_ber.ber_buf ); } @@ -470,11 +470,11 @@ free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ) free( (char *)lc->lconn_sb ); } free( lc ); - Debug( LDAP_DEBUG_TRACE, "free_connection: actually freed\n", + Debug( LDAP_DEBUG_TRACE, "ldap_free_connection: actually freed\n", 0, 0, 0 ); } else { lc->lconn_lastused = time( 0 ); - Debug( LDAP_DEBUG_TRACE, "free_connection: refcnt %d\n", + Debug( LDAP_DEBUG_TRACE, "ldap_free_connection: refcnt %d\n", lc->lconn_refcnt, 0, 0 ); } } @@ -482,7 +482,7 @@ free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind ) #ifdef LDAP_DEBUG void -dump_connection( LDAP *ld, LDAPConn *lconns, int all ) +ldap_dump_connection( LDAP *ld, LDAPConn *lconns, int all ) { LDAPConn *lc; @@ -509,7 +509,7 @@ dump_connection( LDAP *ld, LDAPConn *lconns, int all ) void -dump_requests_and_responses( LDAP *ld ) +ldap_dump_requests_and_responses( LDAP *ld ) { LDAPRequest *lr; LDAPMessage *lm, *l; @@ -550,11 +550,11 @@ dump_requests_and_responses( LDAP *ld ) void -free_request( LDAP *ld, LDAPRequest *lr ) +ldap_free_request( LDAP *ld, LDAPRequest *lr ) { LDAPRequest *tmplr, *nextlr; - Debug( LDAP_DEBUG_TRACE, "free_request (origid %d, msgid %d)\n", + Debug( LDAP_DEBUG_TRACE, "ldap_free_request (origid %d, msgid %d)\n", lr->lr_origid, lr->lr_msgid, 0 ); if ( lr->lr_parent != NULL ) { @@ -563,7 +563,7 @@ free_request( LDAP *ld, LDAPRequest *lr ) /* free all referrals (child requests) */ for ( tmplr = lr->lr_refnext; tmplr != NULL; tmplr = nextlr ) { nextlr = tmplr->lr_refnext; - free_request( ld, tmplr ); + ldap_free_request( ld, tmplr ); } } @@ -618,7 +618,7 @@ free_servers( LDAPServer *srvlist ) * XXX merging of errors in this routine needs to be improved */ int -chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ) +ldap_chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ) { int rc, count, len, newdn; #ifdef LDAP_DNS @@ -629,7 +629,7 @@ chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ) LDAPServer *srv; BerElement *ber; - Debug( LDAP_DEBUG_TRACE, "chase_referrals\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_chase_referrals\n", 0, 0, 0 ); ld->ld_errno = LDAP_SUCCESS; /* optimistic */ *hadrefp = 0; @@ -700,7 +700,7 @@ chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ) } else { Debug( LDAP_DEBUG_TRACE, "ignoring unknown referral <%s>\n", ref, 0, 0 ); - rc = append_referral( ld, &unfollowed, ref ); + rc = ldap_append_referral( ld, &unfollowed, ref ); *hadrefp = 1; continue; } @@ -747,14 +747,14 @@ chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ) } #endif /* LDAP_DNS */ - if ( srv != NULL && send_server_request( ld, ber, ld->ld_msgid, + if ( srv != NULL && ldap_send_server_request( ld, ber, ld->ld_msgid, lr, srv, NULL, 1 ) >= 0 ) { ++count; } else { Debug( LDAP_DEBUG_ANY, "Unable to chase referral (%s)\n", ldap_err2string( ld->ld_errno ), 0, 0 ); - rc = append_referral( ld, &unfollowed, ref ); + rc = ldap_append_referral( ld, &unfollowed, ref ); } if ( !newdn && refdn != NULL ) { @@ -770,7 +770,7 @@ chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp ) int -append_referral( LDAP *ld, char **referralsp, char *s ) +ldap_append_referral( LDAP *ld, char **referralsp, char *s ) { int first; @@ -829,7 +829,7 @@ re_encode_request( LDAP *ld, BerElement *origber, int msgid, char **dnp ) return( NULL ); } - if (( ber = alloc_ber_with_options( ld )) == NULLBER ) { + if (( ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( NULL ); } @@ -885,7 +885,7 @@ re_encode_request( LDAP *ld, BerElement *origber, int msgid, char **dnp ) LDAPRequest * -find_request_by_msgid( LDAP *ld, int msgid ) +ldap_find_request_by_msgid( LDAP *ld, int msgid ) { LDAPRequest *lr; @@ -914,7 +914,7 @@ dn2servers( LDAP *ld, char *dn ) /* dn can also be a domain.... */ domain = dn; } - if (( dxs = getdxbyname( domain )) == NULL ) { + if (( dxs = ldap_getdxbyname( domain )) == NULL ) { ld->ld_errno = LDAP_NO_MEMORY; return( NULL ); } diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 3f8408df18..90698939d6 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -231,8 +231,8 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout, #else /* !LDAP_REFERRALS */ #ifdef LDAP_DEBUG if ( ldap_debug & LDAP_DEBUG_TRACE ) { - dump_connection( ld, ld->ld_conns, 1 ); - dump_requests_and_responses( ld ); + ldap_dump_connection( ld, ld->ld_conns, 1 ); + ldap_dump_requests_and_responses( ld ); } #endif /* LDAP_DEBUG */ for ( lc = ld->ld_conns; lc != NULL; lc = lc->lconn_next ) { @@ -276,7 +276,7 @@ wait4msg( LDAP *ld, int msgid, int all, struct timeval *timeout, nextlc = lc->lconn_next; if ( lc->lconn_status == LDAP_CONNST_CONNECTED && - is_read_ready( ld, + ldap_is_read_ready( ld, lc->lconn_sb )) { rc = read1msg( ld, msgid, all, lc->lconn_sb, lc, result ); @@ -326,7 +326,7 @@ read1msg( LDAP *ld, int msgid, int all, Sockbuf *sb, Debug( LDAP_DEBUG_TRACE, "read1msg\n", 0, 0, 0 ); ber_init( &ber, 0 ); - set_ber_options( ld, &ber ); + ldap_set_ber_options( ld, &ber ); /* get the next message */ if ( (tag = ber_get_next( sb, &len, &ber )) @@ -349,7 +349,7 @@ read1msg( LDAP *ld, int msgid, int all, Sockbuf *sb, } #ifdef LDAP_REFERRALS - if (( lr = find_request_by_msgid( ld, id )) == NULL ) { + if (( lr = ldap_find_request_by_msgid( ld, id )) == NULL ) { Debug( LDAP_DEBUG_ANY, "no request for response with msgid %ld (tossing)\n", id, 0, 0 ); @@ -384,7 +384,7 @@ read1msg( LDAP *ld, int msgid, int all, Sockbuf *sb, != LBER_ERROR ) { if ( lderr != LDAP_SUCCESS ) { /* referrals are in error string */ - refer_cnt = chase_referrals( ld, lr, + refer_cnt = ldap_chase_referrals( ld, lr, &lr->lr_res_error, &hadref ); } @@ -455,11 +455,11 @@ lr->lr_res_matched ? lr->lr_res_matched : "" ); } } - free_request( ld, lr ); + ldap_free_request( ld, lr ); } if ( lc != NULL ) { - free_connection( ld, lc, 0, 1 ); + ldap_free_connection( ld, lc, 0, 1 ); } } } @@ -481,7 +481,7 @@ lr->lr_res_matched ? lr->lr_res_matched : "" ); #ifndef NO_CACHE if ( ld->ld_cache != NULL ) { - add_result_to_cache( ld, new ); + ldap_add_result_to_cache( ld, new ); } #endif /* NO_CACHE */ @@ -557,7 +557,7 @@ build_result_ber( LDAP *ld, BerElement *ber, LDAPRequest *lr ) long along; ber_init( ber, 0 ); - set_ber_options( ld, ber ); + ldap_set_ber_options( ld, ber ); if ( ber_printf( ber, "{it{ess}}", lr->lr_msgid, (long)lr->lr_res_msgtype, lr->lr_res_errno, lr->lr_res_matched ? lr->lr_res_matched : "", @@ -587,7 +587,7 @@ merge_error_info( LDAP *ld, LDAPRequest *parentr, LDAPRequest *lr ) if ( lr->lr_res_errno == LDAP_PARTIAL_RESULTS ) { parentr->lr_res_errno = lr->lr_res_errno; if ( lr->lr_res_error != NULL ) { - (void)append_referral( ld, &parentr->lr_res_error, + (void)ldap_append_referral( ld, &parentr->lr_res_error, lr->lr_res_error ); } } else if ( lr->lr_res_errno != LDAP_SUCCESS && diff --git a/libraries/libldap/sbind.c b/libraries/libldap/sbind.c index 656c722f15..9421b07fee 100644 --- a/libraries/libldap/sbind.c +++ b/libraries/libldap/sbind.c @@ -61,7 +61,7 @@ ldap_simple_bind( LDAP *ld, char *dn, char *passwd ) passwd = ""; /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( -1 ); } @@ -80,7 +80,7 @@ ldap_simple_bind( LDAP *ld, char *dn, char *passwd ) #endif /* !NO_CACHE */ /* send the message */ - return( send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); + return( ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber )); } /* diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index 2b73ddd07e..c9f984a511 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -80,17 +80,17 @@ ldap_search( LDAP *ld, char *base, int scope, char *filter, #ifndef NO_CACHE if ( ld->ld_cache != NULL ) { - if ( check_cache( ld, LDAP_REQ_SEARCH, ber ) == 0 ) { + if ( ldap_check_cache( ld, LDAP_REQ_SEARCH, ber ) == 0 ) { ber_free( ber, 1 ); ld->ld_errno = LDAP_SUCCESS; return( ld->ld_msgid ); } - add_request_to_cache( ld, LDAP_REQ_SEARCH, ber ); + ldap_add_request_to_cache( ld, LDAP_REQ_SEARCH, ber ); } #endif /* NO_CACHE */ /* send the message */ - return ( send_initial_request( ld, LDAP_REQ_SEARCH, base, ber )); + return ( ldap_send_initial_request( ld, LDAP_REQ_SEARCH, base, ber )); } @@ -126,7 +126,7 @@ ldap_build_search_req( LDAP *ld, char *base, int scope, char *filter, */ /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( NULLBER ); } diff --git a/libraries/libldap/unbind.c b/libraries/libldap/unbind.c index e7b5c401e6..69231f7db9 100644 --- a/libraries/libldap/unbind.c +++ b/libraries/libldap/unbind.c @@ -55,17 +55,17 @@ ldap_ld_free( LDAP *ld, int close ) /* free LDAP structure and outstanding requests/responses */ for ( lr = ld->ld_requests; lr != NULL; lr = nextlr ) { nextlr = lr->lr_next; - free_request( ld, lr ); + ldap_free_request( ld, lr ); } /* free and unbind from all open connections */ while ( ld->ld_conns != NULL ) { - free_connection( ld, ld->ld_conns, 1, close ); + ldap_free_connection( ld, ld->ld_conns, 1, close ); } #else /* LDAP_REFERRALS */ if ( close ) { - err = send_unbind( ld, &ld->ld_sb ); - close_connection( &ld->ld_sb ); + err = ldap_send_unbind( ld, &ld->ld_sb ); + ldap_close_connection( &ld->ld_sb ); } #endif /* LDAP_REFERRALS */ } else { @@ -106,7 +106,7 @@ ldap_ld_free( LDAP *ld, int close ) #ifdef LDAP_REFERRALS if ( ld->ld_selectinfo != NULL ) - free_select_info( ld->ld_selectinfo ); + ldap_free_select_info( ld->ld_selectinfo ); #endif /* LDAP_REFERRALS */ if ( ld->ld_defhost != NULL ) @@ -125,14 +125,14 @@ ldap_unbind_s( LDAP *ld ) int -send_unbind( LDAP *ld, Sockbuf *sb ) +ldap_send_unbind( LDAP *ld, Sockbuf *sb ) { BerElement *ber; - Debug( LDAP_DEBUG_TRACE, "send_unbind\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_send_unbind\n", 0, 0, 0 ); /* create a message to send */ - if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { + if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) { return( ld->ld_errno ); } diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c index 08b47efd6b..204f2978ff 100644 --- a/libraries/libldap/url.c +++ b/libraries/libldap/url.c @@ -305,10 +305,10 @@ ldap_url_search( LDAP *ld, char *url, int attrsonly ) ber_free( ber, 1 ); } else { #ifdef LDAP_REFERRALS - err = send_server_request( ld, ber, ld->ld_msgid, NULL, srv, + err = ldap_send_server_request( ld, ber, ld->ld_msgid, NULL, srv, NULL, 1 ); #else /* LDAP_REFERRALS */ - err = send_initial_request( ld, LDAP_REQ_SEARCH, + err = ldap_send_initial_request( ld, LDAP_REQ_SEARCH, ludp->lud_dn, ber ); #endif /* LDAP_REFERRALS */ } diff --git a/libraries/macintosh/kerberos-macos.c b/libraries/macintosh/kerberos-macos.c index ee9c31c6b1..cb973795bb 100644 --- a/libraries/macintosh/kerberos-macos.c +++ b/libraries/macintosh/kerberos-macos.c @@ -29,12 +29,12 @@ static char copyright[] = "@(#) Copyright (c) 1994 Regents of the University of #include "ldap-int.h" /* - * get_kerberosv4_credentials - obtain kerberos v4 credentials for ldap. + * ldap_get_kerberosv4_credentials - obtain kerberos v4 credentials for ldap. */ /* ARGSUSED */ char * -get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ) +ldap_get_kerberosv4_credentials( LDAP *ld, char *who, char *service, int *len ) { static short authman_refnum = 0; char *cred, ticket[ MAX_KTXT_LEN ]; diff --git a/libraries/macintosh/macos-ip.c b/libraries/macintosh/macos-ip.c index 3a6a1805c2..011bdf7bf6 100644 --- a/libraries/macintosh/macos-ip.c +++ b/libraries/macintosh/macos-ip.c @@ -19,7 +19,7 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of #include "ldap-int.h" int -connect_to_host( Sockbuf *sb, char *host, unsigned long address, +ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address, int port, int async ) /* * if host == NULL, connect using address @@ -37,7 +37,7 @@ connect_to_host( Sockbuf *sb, char *host, unsigned long address, struct hostInfo hi; #endif /* SUPPORT_OPENTRANSPORT */ - Debug( LDAP_DEBUG_TRACE, "connect_to_host: %s:%d\n", + Debug( LDAP_DEBUG_TRACE, "ldap_connect_to_host: %s:%d\n", ( host == NULL ) ? "(by address)" : host, ntohs( port ), 0 ); if ( host != NULL && gethostinfobyname( host, &hi ) != noErr ) { @@ -78,7 +78,7 @@ connect_to_host( Sockbuf *sb, char *host, unsigned long address, void -close_connection( Sockbuf *sb ) +ldap_close_connection( Sockbuf *sb ) { tcpclose( (tcpstream *)sb->sb_sd ); } @@ -86,7 +86,7 @@ close_connection( Sockbuf *sb ) #ifdef KERBEROS char * -host_connected_to( Sockbuf *sb ) +ldap_host_connected_to( Sockbuf *sb ) { ip_addr addr; @@ -131,13 +131,13 @@ struct selectinfo { void -mark_select_read( LDAP *ld, Sockbuf *sb ) +ldap_mark_select_read( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; struct tcpstreaminfo *tcpsip; short i; - Debug( LDAP_DEBUG_TRACE, "mark_select_read: stream %x\n", (tcpstream *)sb->sb_sd, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_mark_select_read: stream %x\n", (tcpstream *)sb->sb_sd, 0, 0 ); if (( sip = (struct selectinfo *)ld->ld_selectinfo ) == NULL ) { return; @@ -170,12 +170,12 @@ mark_select_read( LDAP *ld, Sockbuf *sb ) void -mark_select_clear( LDAP *ld, Sockbuf *sb ) +ldap_mark_select_clear( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; short i; - Debug( LDAP_DEBUG_TRACE, "mark_select_clear: stream %x\n", (tcpstream *)sb->sb_sd, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_mark_select_clear: stream %x\n", (tcpstream *)sb->sb_sd, 0, 0 ); sip = (struct selectinfo *)ld->ld_selectinfo; if ( sip != NULL && sip->si_count > 0 && sip->si_streaminfo != NULL ) { @@ -196,7 +196,7 @@ mark_select_clear( LDAP *ld, Sockbuf *sb ) int -is_read_ready( LDAP *ld, Sockbuf *sb ) +ldap_is_read_ready( LDAP *ld, Sockbuf *sb ) { struct selectinfo *sip; short i; @@ -207,10 +207,10 @@ is_read_ready( LDAP *ld, Sockbuf *sb ) if ( sip->si_streaminfo[ i ].tcpsi_stream == (tcpstream *)sb->sb_sd ) { #ifdef LDAP_DEBUG if ( sip->si_streaminfo[ i ].tcpsi_is_read_ready ) { - Debug( LDAP_DEBUG_TRACE, "is_read_ready: stream %x READY\n", + Debug( LDAP_DEBUG_TRACE, "ldap_is_read_ready: stream %x READY\n", (tcpstream *)sb->sb_sd, 0, 0 ); } else { - Debug( LDAP_DEBUG_TRACE, "is_read_ready: stream %x Not Ready\n", + Debug( LDAP_DEBUG_TRACE, "ldap_is_read_ready: stream %x Not Ready\n", (tcpstream *)sb->sb_sd, 0, 0 ); } #endif /* LDAP_DEBUG */ @@ -219,20 +219,20 @@ is_read_ready( LDAP *ld, Sockbuf *sb ) } } - Debug( LDAP_DEBUG_TRACE, "is_read_ready: stream %x: NOT FOUND\n", (tcpstream *)sb->sb_sd, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "ldap_is_read_ready: stream %x: NOT FOUND\n", (tcpstream *)sb->sb_sd, 0, 0 ); return( 0 ); } void * -new_select_info() +ldap_new_select_info() { return( (void *)calloc( 1, sizeof( struct selectinfo ))); } void -free_select_info( void *sip ) +ldap_free_select_info( void *sip ) { if ( sip != NULL ) { free( sip );