From eccd913a07e747c805bd9ca6ba598d3f3e6f062b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 9 Jan 2006 01:25:53 +0000 Subject: [PATCH] Update variables holding protocol values to ber_*_t's Remove old grouping/txn code (pending redesign) --- include/ldap.h | 230 +++++--------------------------- libraries/libldap/Makefile.in | 4 +- libraries/libldap/groupings.c | 144 -------------------- libraries/libldap/pagectrl.c | 144 +++++++------------- libraries/libldap/sortctrl.c | 8 +- libraries/libldap/txn.c | 52 -------- libraries/libldap/vlvctrl.c | 30 ++--- libraries/libldap_r/Makefile.in | 4 +- 8 files changed, 97 insertions(+), 519 deletions(-) delete mode 100644 libraries/libldap/groupings.c delete mode 100644 libraries/libldap/txn.c diff --git a/include/ldap.h b/include/ldap.h index d16bb73f05..b0d7b1a508 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -334,22 +334,6 @@ typedef struct ldapcontrol { #define LDAP_EXOP_X_TURN "1.3.6.1.4.1.4203.666.6.4" -/* LDAP Grouping of Related Operations *//* a work in progress */ -#ifdef LDAP_DEVEL -#define LDAP_X_GROUPING_BASE "1.3.6.1.4.1.4203.666.10.3" -#define LDAP_EXOP_GROUPING_CREATE LDAP_X_GROUPING_BASE ".1" -#define LDAP_EXOP_GROUPING_END LDAP_X_GROUPING_BASE ".2" -#define LDAP_NOTICE_GROUPING_END LDAP_X_GROUPING_BASE ".3" -#define LDAP_EXOP_GROUPING_ACTION LDAP_X_GROUPING_BASE ".4" -#define LDAP_NOTICE_GROUPING_INFO LDAP_X_GROUPING_BASE ".5" -#define LDAP_CONTROL_GROUPING LDAP_X_GROUPING_BASE ".6" -#endif - -/* LDAP Grouping Types *//* a work in progress */ -#ifdef LDAP_DEVEL -#define LDAP_GROUP_TRANSACTION "1.3.6.1.4.1.4203.666.10.4" -#endif - /* LDAP Distributed Procedures */ /* a work in progress */ #ifdef LDAP_DEVEL @@ -859,111 +843,6 @@ ldap_parse_intermediate LDAP_P(( LDAPControl ***serverctrls, int freeit )); -/* - * in groupings.c: - */ -#ifdef LDAP_EXOP_GROUPING_CREATE - -LDAP_F( int ) -ldap_grouping_create LDAP_P(( - LDAP *ld, - LDAP_CONST char *grpoid, - struct berval *grpdata, - LDAPControl **serverctrls, - LDAPControl **clientctrls, - int *msgidp )); - -LDAP_F( int ) -ldap_grouping_create_s LDAP_P(( - LDAP *ld, - LDAP_CONST char *grpoid, - struct berval *grpdata, - LDAPControl **serverctrls, - LDAPControl **clientctrls, - struct berval **retgrpcookiep, - struct berval **retgrpdatap )); - -LDAP_F( int ) -ldap_parse_grouping_create_result LDAP_P(( - LDAP *ld, - LDAPMessage *res, - struct berval **retgrpcookiep, - struct berval **retgrpdatap, - LDAPControl ***serverctrls, - int freeit )); - -LDAP_F( int ) -ldap_grouping_end LDAP_P(( - LDAP *ld, - LDAP_CONST char *grpoid, - struct berval *grpdata, - LDAPControl **serverctrls, - LDAPControl **clientctrls, - int *msgidp )); - -LDAP_F( int ) -ldap_grouping_end_s LDAP_P(( - LDAP *ld, - LDAP_CONST char *grpoid, - struct berval *grpdata, - LDAPControl **serverctrls, - LDAPControl **clientctrls, - struct berval **retgrpdatap )); - -LDAP_F( int ) -ldap_parse_grouping_end_result LDAP_P(( - LDAP *ld, - LDAPMessage *res, - struct berval **retgrpdatap, - LDAPControl ***serverctrls, - int freeit )); - -LDAP_F( int ) -ldap_grouping_action_operation LDAP_P(( - LDAP *ld, - LDAP_CONST char *grpoid, - struct berval *grpdata, - LDAPControl **serverctrls, - LDAPControl **clientctrls, - int *msgidp )); - -LDAP_F( int ) -ldap_grouping_action_operation_s LDAP_P(( - LDAP *ld, - LDAP_CONST char *grpoid, - struct berval *grpdata, - LDAPControl **serverctrls, - LDAPControl **clientctrls, - struct berval **retgrpcookiep, - struct berval **retgrpdatap )); - -LDAP_F( int ) -ldap_parse_grouping_action_result LDAP_P(( - LDAP *ld, - LDAPMessage *res, - struct berval **retgrpcookiep, - struct berval **retgrpdatap, - LDAPControl ***serverctrls, - int freeit )); - -LDAP_F( int ) -ldap_parse_grouping_end_notice LDAP_P(( - LDAP *ld, - LDAPMessage *res, - struct berval **retdatap, - struct berval **retgrpcookiep, - struct berval **retgrpdatap, - int freeit )); - -LDAP_F( int ) -ldap_parse_grouping_info_notice LDAP_P(( - LDAP *ld, - LDAPMessage *res, - struct berval **retdatap, - struct berval **retgrpcookiep, - struct berval **retgrpdatap, - int freeit )); -#endif /* * in abandon.c: @@ -982,7 +861,6 @@ ldap_abandon LDAP_P(( /* deprecated */ int msgid )); #endif - /* * in add.c: */ @@ -1944,32 +1822,32 @@ ldap_turn_s LDAP_P(( LDAP *ld, LDAP_F( int ) ldap_create_page_control_value LDAP_P(( - LDAP *ld, - unsigned long pagesize, - struct berval *cookie, - struct berval *value )); + LDAP *ld, + ber_int_t pagesize, + struct berval *cookie, + struct berval *value )); LDAP_F( int ) ldap_create_page_control LDAP_P(( - LDAP *ld, - unsigned long pagesize, - struct berval *cookie, - int iscritical, - LDAPControl **ctrlp )); + LDAP *ld, + ber_int_t pagesize, + struct berval *cookie, + int iscritical, + LDAPControl **ctrlp )); LDAP_F( int ) ldap_parse_page_control LDAP_P(( - LDAP *ld, - LDAPControl **ctrls, - unsigned long *count, - struct berval **cookie )); + LDAP *ld, + LDAPControl **ctrls, + ber_int_t *count, + struct berval **cookie )); LDAP_F( int ) ldap_parse_pageresponse_control LDAP_P(( - LDAP *ld, - LDAPControl *ctrl, - unsigned long *count, - struct berval *cookie )); + LDAP *ld, + LDAPControl *ctrl, + ber_int_t *count, + struct berval *cookie )); /* * LDAP Server Side Sort @@ -1979,15 +1857,15 @@ ldap_parse_pageresponse_control LDAP_P(( /* structure for a sort-key */ typedef struct ldapsortkey { - char * attributeType; - char * orderingRule; - int reverseOrder; + char *attributeType; + char *orderingRule; + int reverseOrder; } LDAPSortKey; LDAP_F( int ) ldap_create_sort_keylist LDAP_P(( LDAPSortKey ***sortKeyList, - char *keyString )); + char *keyString )); LDAP_F( void ) ldap_free_sort_keylist LDAP_P(( @@ -2008,11 +1886,10 @@ ldap_create_sort_control LDAP_P(( LDAP_F( int ) ldap_parse_sortresponse_control LDAP_P(( - LDAP *ld, - LDAPControl *ctrl, - unsigned long *result, - char **attribute )); - + LDAP *ld, + LDAPControl *ctrl, + ber_int_t *result, + char **attribute )); /* * LDAP Virtual List View @@ -2022,11 +1899,11 @@ ldap_parse_sortresponse_control LDAP_P(( /* structure for virtual list */ typedef struct ldapvlvinfo { - int ldvlv_version; - unsigned long ldvlv_before_count; - unsigned long ldvlv_after_count; - unsigned long ldvlv_offset; - unsigned long ldvlv_count; + ber_int_t ldvlv_version; + ber_int_t ldvlv_before_count; + ber_int_t ldvlv_after_count; + ber_int_t ldvlv_offset; + ber_int_t ldvlv_count; struct berval * ldvlv_attrvalue; struct berval * ldvlv_context; void * ldvlv_extradata; @@ -2048,54 +1925,11 @@ LDAP_F( int ) ldap_parse_vlvresponse_control LDAP_P(( LDAP *ld, LDAPControl *ctrls, - unsigned long *target_posp, - unsigned long *list_countp, + ber_int_t *target_posp, + ber_int_t *list_countp, struct berval **contextp, int *errcodep )); -/* - * LDAP Transactions - * in txn.c - */ -#ifdef LDAP_GROUP_TRANSACTION -LDAP_F( int ) -ldap_parse_txn_create LDAP_P(( - LDAP *ld, - LDAPMessage *res, - struct berval **cookie )); - -LDAP_F( int ) -ldap_txn_create LDAP_P(( - LDAP *ld, - LDAPControl **sctrls, - LDAPControl **cctrls, - int *msgidp )); - -LDAP_F( int ) -ldap_txn_create_s LDAP_P(( - LDAP *ld, - struct berval **cookie, - LDAPControl **sctrls, - LDAPControl **cctrls )); - -LDAP_F( int ) -ldap_txn_end LDAP_P(( - LDAP *ld, - struct berval *cookie, - int commit, - LDAPControl **sctrls, - LDAPControl **cctrls, - int *msgidp )); - -LDAP_F( int ) -ldap_txn_end_s LDAP_P(( - LDAP *ld, - struct berval *cookie, - int commit, - LDAPControl **sctrls, - LDAPControl **cctrls )); -#endif - /* * LDAP Who Am I? * in whoami.c diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in index 2cb20610ea..86711cf16d 100644 --- a/libraries/libldap/Makefile.in +++ b/libraries/libldap/Makefile.in @@ -26,7 +26,7 @@ SRCS = bind.c open.c result.c error.c compare.c search.c \ request.c os-ip.c url.c pagectrl.c sortctrl.c vlvctrl.c \ init.c options.c print.c string.c util-int.c schema.c \ charray.c tls.c os-local.c dnssrv.c utf-8.c utf-8-conv.c \ - turn.c groupings.c txn.c ppolicy.c dds.c + turn.c ppolicy.c dds.c OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \ controls.lo messages.lo references.lo extended.lo cyrus.lo \ @@ -37,7 +37,7 @@ OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \ request.lo os-ip.lo url.lo pagectrl.o sortctrl.lo vlvctrl.lo \ init.lo options.lo print.lo string.lo util-int.lo schema.lo \ charray.lo tls.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo \ - turn.lo groupings.lo txn.lo ppolicy.lo dds.lo + turn.lo ppolicy.lo dds.lo LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries diff --git a/libraries/libldap/groupings.c b/libraries/libldap/groupings.c deleted file mode 100644 index 7c74ed35d9..0000000000 --- a/libraries/libldap/groupings.c +++ /dev/null @@ -1,144 +0,0 @@ -/* $OpenLDAP$ */ -/* This work is part of OpenLDAP Software . - * - * Copyright 2004-2006 The OpenLDAP Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted only as authorized by the OpenLDAP - * Public License. - * - * A copy of this license is available in the file LICENSE in the - * top-level directory of the distribution or, alternatively, at - * . - */ -/* ACKNOWLEDGEMENTS: - * This program was orignally developed by Kurt D. Zeilenga for inclusion in - * OpenLDAP Software. - */ - -#include "portable.h" - -#include - -#include -#include - -#include "ldap-int.h" - -#ifdef LDAP_EXOP_GROUPING_CREATE - -int ldap_grouping_create( - LDAP *ld, - LDAP_CONST char *grpoid, - struct berval *grpdata, - LDAPControl **sctrls, - LDAPControl **cctrls, - int *msgidp ) -{ - int rc; - BerElement *ber = NULL; - struct berval bv = BER_BVNULL; - - Debug( LDAP_DEBUG_TRACE, "ldap_grouping_create\n", 0, 0, 0 ); - - assert( ld != NULL ); - assert( LDAP_VALID( ld ) ); - assert( grpoid != NULL || *grpoid == '\0' ); - assert( msgidp != NULL ); - - /* build the create grouping exop */ - ber = ber_alloc_t( LBER_USE_DER ); - if( ber == NULL ) { - ld->ld_errno = LDAP_NO_MEMORY; - return( ld->ld_errno ); - } - - if ( grpdata != NULL ) { - ber_printf( ber, "{sON}", grpoid, grpdata ); - } else { - ber_printf( ber, "{sN}", grpoid ); - } - - rc = ber_flatten2( ber, &bv, 0 ); - if( rc < 0 ) { - ld->ld_errno = LDAP_ENCODING_ERROR; - return( ld->ld_errno ); - } - - rc = ldap_extended_operation( ld, LDAP_EXOP_GROUPING_CREATE, - &bv, sctrls, cctrls, msgidp ); - - ber_free( ber, 1 ); - return rc; -} - -int ldap_grouping_create_s( - LDAP *ld, - LDAP_CONST char *grpoid, - struct berval *grpdata, - LDAPControl **sctrls, - LDAPControl **cctrls, - struct berval **retgrpcookiep, - struct berval **retgrpdatap ) -{ - int rc; - int msgid; - LDAPMessage *res; - - Debug( LDAP_DEBUG_TRACE, "ldap_grouping_create_s\n", 0, 0, 0 ); - - assert( ld != NULL ); - assert( LDAP_VALID( ld ) ); - assert( grpoid != NULL || *grpoid == '\0' ); - - rc = ldap_grouping_create( ld, grpoid, grpdata, - sctrls, cctrls, &msgid ); - if ( rc != LDAP_SUCCESS ) { - return rc; - } - - if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 ) { - return ld->ld_errno; - } - - if ( retgrpcookiep != NULL ) *retgrpcookiep = NULL; - if ( retgrpdatap != NULL ) *retgrpdatap = NULL; - -#if 0 - rc = ldap_parse_extended_result( ld, res, retoidp, retdatap, 0 ); -#else - rc = LDAP_NOT_SUPPORTED; -#endif - - if( rc != LDAP_SUCCESS ) { - ldap_msgfree( res ); - return rc; - } - - return( ldap_result2error( ld, res, 1 ) ); -} - -int ldap_grouping_end( - LDAP *ld, - LDAP_CONST char *grpoid, - struct berval *grpdata, - LDAPControl **sctrls, - LDAPControl **cctrls, - int *msgidp ) -{ - return 0; -} - -int ldap_grouping_end_s( - LDAP *ld, - LDAP_CONST char *grpoid, - struct berval *grpdata, - LDAPControl **sctrls, - LDAPControl **cctrls, - struct berval **retgrpdatap ) -{ - return 0; -} - -#endif diff --git a/libraries/libldap/pagectrl.c b/libraries/libldap/pagectrl.c index d470eef167..f5ca3a54ee 100644 --- a/libraries/libldap/pagectrl.c +++ b/libraries/libldap/pagectrl.c @@ -12,23 +12,8 @@ * top-level directory of the distribution or, alternatively, at * . */ -/* Portions Copyright (C) 1999, 2000 Novell, Inc. All Rights Reserved. - * - * THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND - * TREATIES. USE, MODIFICATION, AND REDISTRIBUTION OF THIS WORK IS SUBJECT - * TO VERSION 2.0.1 OF THE OPENLDAP PUBLIC LICENSE, A COPY OF WHICH IS - * AVAILABLE AT HTTP://WWW.OPENLDAP.ORG/LICENSE.HTML OR IN THE FILE "LICENSE" - * IN THE TOP-LEVEL DIRECTORY OF THE DISTRIBUTION. ANY USE OR EXPLOITATION - * OF THIS WORK OTHER THAN AS AUTHORIZED IN VERSION 2.0.1 OF THE OPENLDAP - * PUBLIC LICENSE, OR OTHER PRIOR WRITTEN CONSENT FROM NOVELL, COULD SUBJECT - * THE PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY. - */ -/* Note: A verbatim copy of version 2.0.1 of the OpenLDAP Public License - * can be found in the file "build/LICENSE-2.0.1" in this distribution - * of OpenLDAP Software. - */ -/* Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. +/* Portions Copyright (C) The Internet Society (1999) + * ASN.1 fragments are from RFC 2696; see RFC for full legal notices. */ #include "portable.h" @@ -45,22 +30,14 @@ Create and encode the value of the paged results control (RFC 2696). - ld (IN) An LDAP session handle, as obtained from a call to - ldap_init(). - - pagesize (IN) The number of entries to return per page. - + ld (IN) An LDAP session handle + pagesize (IN) Page size requested cookie (IN) Opaque structure used by the server to track its - location in the search results. Pass in NULL on the + location in the search results. NULL on the first call. - - value (OUT) the pointer to a struct berval; it is filled by this function - with the value that must be assigned to the ldctl_value member - of the LDAPControl structure. The bv_val member of the berval - structure SHOULD be freed by calling ldap_memfree() when done. + value (OUT) Control value, SHOULD be freed by calling + ldap_memfree() when done. - Ber encoding - pagedResultsControl ::= SEQUENCE { controlType 1.2.840.113556.1.4.319, criticality BOOLEAN DEFAULT FALSE, @@ -76,8 +53,8 @@ int ldap_create_page_control_value( - LDAP *ld, - unsigned long pagesize, + LDAP *ld, + ber_int_t pagesize, struct berval *cookie, struct berval *value ) { @@ -85,7 +62,9 @@ ldap_create_page_control_value( ber_tag_t tag; struct berval null_cookie = { 0, NULL }; - if ( ld == NULL || value == NULL || pagesize > LDAP_MAXINT ) { + if ( ld == NULL || value == NULL || + pagesize < 1 || pagesize > LDAP_MAXINT ) + { ld->ld_errno = LDAP_PARAM_ERROR; return ld->ld_errno; } @@ -105,20 +84,17 @@ ldap_create_page_control_value( return ld->ld_errno; } - tag = ber_printf( ber, "{iO}", (ber_int_t)pagesize, cookie ); + tag = ber_printf( ber, "{iO}", pagesize, cookie ); if ( tag == LBER_ERROR ) { - goto error_return; + ld->ld_errno = LDAP_ENCODING_ERROR; + goto done; } if ( ber_flatten2( ber, value, 1 ) == -1 ) { ld->ld_errno = LDAP_NO_MEMORY; } - if ( 0 ) { -error_return:; - ld->ld_errno = LDAP_ENCODING_ERROR; - } - +done:; if ( ber != NULL ) { ber_free( ber, 1 ); } @@ -132,24 +108,17 @@ error_return:; Create and encode a page control. - ld (IN) An LDAP session handle, as obtained from a call to - ldap_init(). - - pagesize (IN) The number of entries to return per page. - + ld (IN) An LDAP session handle + pagesize (IN) Page size requested cookie (IN) Opaque structure used by the server to track its - location in the search results. Pass in NULL on the + location in the search results. NULL on the first call. - - iscritical (IN) 0 - The control is not critical to the operation. - non-zero - The control is critical to the operation. - - ctrlp (OUT) Returns a pointer to the LDAPControl created. This - control SHOULD be freed by calling ldap_control_free() - when done. + value (OUT) Control value, SHOULD be freed by calling + ldap_memfree() when done. + iscritical (IN) Criticality + ctrlp (OUT) LDAP control, SHOULD be freed by calling + ldap_control_free() when done. - Ber encoding - pagedResultsControl ::= SEQUENCE { controlType 1.2.840.113556.1.4.319, criticality BOOLEAN DEFAULT FALSE, @@ -166,7 +135,7 @@ error_return:; int ldap_create_page_control( LDAP *ld, - unsigned long pagesize, + ber_int_t pagesize, struct berval *cookie, int iscritical, LDAPControl **ctrlp ) @@ -178,7 +147,8 @@ ldap_create_page_control( return ld->ld_errno; } - ld->ld_errno = ldap_create_page_control_value( ld, pagesize, cookie, &value ); + ld->ld_errno = ldap_create_page_control_value( ld, + pagesize, cookie, &value ); if ( ld->ld_errno == LDAP_SUCCESS ) { ld->ld_errno = ldap_create_control( LDAP_CONTROL_PAGEDRESULTS, NULL, iscritical, ctrlp ); @@ -198,28 +168,20 @@ ldap_create_page_control( Decode a page control. - ld (IN) An LDAP session handle, as obtained from a call to - ldap_init(). - - ctrls (IN) The address of a NULL-terminated array of - LDAPControl structures, typically obtained by a - call to ldap_parse_result(). The array SHOULD include - a page control. - - count (OUT) The number of entries returned in the page. - - cookie (OUT) Opaque structure used by the server to track its - location in the search results. Use ldap_memfree() to + ld (IN) An LDAP session handle + ctrl (IN) The page response control + count (OUT) The number of entries in the page. + cookie (OUT) Opaque cookie. Use ldap_memfree() to free the bv_val member of this structure. ---------------------------------------------------------------------------*/ int ldap_parse_pageresponse_control( - LDAP *ld, - LDAPControl *ctrl, - unsigned long *countp, - struct berval *cookie ) + LDAP *ld, + LDAPControl *ctrl, + ber_int_t *countp, + struct berval *cookie ) { BerElement *ber; ber_tag_t tag; @@ -260,19 +222,11 @@ ldap_parse_pageresponse_control( Decode a page control. - ld (IN) An LDAP session handle, as obtained from a call to - ldap_init(). - - ctrls (IN) The address of a NULL-terminated array of - LDAPControl structures, typically obtained by a - call to ldap_parse_result(). The array SHOULD include - a page control. - - count (OUT) The number of entries returned in the page. - - cookie (OUT) Opaque structure used by the server to track its - location in the search results. Use ber_bvfree() to - free it. + ld (IN) An LDAP session handle + ctrls (IN) Response controls + count (OUT) The number of entries in the page. + cookie (OUT) Opaque cookie. Use ldap_memfree() to + free the bv_val member of this structure. ---------------------------------------------------------------------------*/ @@ -280,11 +234,11 @@ int ldap_parse_page_control( LDAP *ld, LDAPControl **ctrls, - unsigned long *countp, + ber_int_t *countp, struct berval **cookiep ) { + LDAPControl *c; struct berval cookie; - int i; if ( cookiep == NULL ) { ld->ld_errno = LDAP_PARAM_ERROR; @@ -296,20 +250,14 @@ ldap_parse_page_control( return ld->ld_errno; } - /* Search the list of control responses for a page control. */ - for ( i = 0; ctrls[i]; i++ ) { - if ( strcmp( LDAP_CONTROL_PAGEDRESULTS, ctrls[ i ]->ldctl_oid ) == 0 ) { - break; - } - } - - /* No page control was found. */ - if ( ctrls[ i ] == NULL ) { + c = ldap_find_control( LDAP_CONTROL_PAGEDRESULTS, ctrls ); + if ( c == NULL ) { + /* No page control was found. */ ld->ld_errno = LDAP_CONTROL_NOT_FOUND; return ld->ld_errno; } - ld->ld_errno = ldap_parse_pageresponse_control( ld, ctrls[ i ], countp, &cookie ); + ld->ld_errno = ldap_parse_pageresponse_control( ld, c, countp, &cookie ); if ( ld->ld_errno == LDAP_SUCCESS ) { *cookiep = LDAP_MALLOC( sizeof( struct berval * ) ); if ( *cookiep == NULL ) { diff --git a/libraries/libldap/sortctrl.c b/libraries/libldap/sortctrl.c index a2bd69a2fb..f4c881af7b 100644 --- a/libraries/libldap/sortctrl.c +++ b/libraries/libldap/sortctrl.c @@ -479,10 +479,10 @@ ldap_create_sort_control( int ldap_parse_sortresponse_control( - LDAP *ld, - LDAPControl *ctrl, - unsigned long *returnCode, - char **attribute ) + LDAP *ld, + LDAPControl *ctrl, + ber_int_t *returnCode, + char **attribute ) { BerElement *ber; ber_tag_t tag, berTag; diff --git a/libraries/libldap/txn.c b/libraries/libldap/txn.c deleted file mode 100644 index 7adc9ea3b1..0000000000 --- a/libraries/libldap/txn.c +++ /dev/null @@ -1,52 +0,0 @@ -/* $OpenLDAP$ */ -/* This work is part of OpenLDAP Software . - * - * Copyright 2004-2006 The OpenLDAP Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted only as authorized by the OpenLDAP - * Public License. - * - * A copy of this license is available in the file LICENSE in the - * top-level directory of the distribution or, alternatively, at - * . - */ -/* ACKNOWLEDGEMENTS: - * This program was orignally developed by Kurt D. Zeilenga for inclusion in - * OpenLDAP Software. - */ - -#include "portable.h" - -#include - -#include -#include - -#include "ldap-int.h" - -#ifdef LDAP_GROUP_TRANSACTION - -int -ldap_txn_create_s( - LDAP *ld, - struct berval **cookie, - LDAPControl **sctrls, - LDAPControl **cctrls ) -{ - return LDAP_NOT_SUPPORTED; -} - -int -ldap_txn_end_s( - LDAP *ld, - struct berval *cookie, - int commit, - LDAPControl **sctrls, - LDAPControl **cctrls ) -{ - return LDAP_NOT_SUPPORTED; -} - -#endif diff --git a/libraries/libldap/vlvctrl.c b/libraries/libldap/vlvctrl.c index ed30953816..edec49cccb 100644 --- a/libraries/libldap/vlvctrl.c +++ b/libraries/libldap/vlvctrl.c @@ -50,8 +50,7 @@ Create and encode the Virtual List View control. - ld (IN) An LDAP session handle, as obtained from a call to - ldap_init(). + ld (IN) An LDAP session handle. vlvinfop (IN) The address of an LDAPVLVInfo structure whose contents are used to construct the value of the control @@ -171,8 +170,7 @@ error_return:; Create and encode the Virtual List View control. - ld (IN) An LDAP session handle, as obtained from a call to - ldap_init(). + ld (IN) An LDAP session handle. vlvinfop (IN) The address of an LDAPVLVInfo structure whose contents are used to construct the value of the control @@ -291,15 +289,15 @@ ldap_create_vlv_control( int ldap_parse_vlvresponse_control( - LDAP *ld, - LDAPControl *ctrl, - unsigned long *target_posp, - unsigned long *list_countp, + LDAP *ld, + LDAPControl *ctrl, + ber_int_t *target_posp, + ber_int_t *list_countp, struct berval **contextp, - int *errcodep ) + ber_int_t *errcodep ) { BerElement *ber; - unsigned long pos, count, err; + ber_int_t long pos, count, err; ber_tag_t tag, berTag; ber_len_t berLen; @@ -356,15 +354,9 @@ ldap_parse_vlvresponse_control( ber_free(ber, 1); /* Return data to the caller for items that were requested. */ - if (target_posp) { - *target_posp = pos; - } - if (list_countp) { - *list_countp = count; - } - if (errcodep) { - *errcodep = err; - } + if (target_posp) *target_posp = pos; + if (list_countp) *list_countp = count; + if (errcodep) *errcodep = err; ld->ld_errno = LDAP_SUCCESS; return(ld->ld_errno); diff --git a/libraries/libldap_r/Makefile.in b/libraries/libldap_r/Makefile.in index a049416b66..a46396a171 100644 --- a/libraries/libldap_r/Makefile.in +++ b/libraries/libldap_r/Makefile.in @@ -28,7 +28,7 @@ XXSRCS = apitest.c test.c \ request.c os-ip.c url.c pagectrl.c sortctrl.c vlvctrl.c \ init.c options.c print.c string.c util-int.c schema.c \ charray.c tls.c os-local.c dnssrv.c utf-8.c utf-8-conv.c \ - turn.c groupings.c txn.c ppolicy.c dds.c + turn.c ppolicy.c dds.c SRCS = threads.c rdwr.c tpool.c rq.c \ thr_posix.c thr_cthreads.c thr_thr.c thr_lwp.c thr_nt.c \ thr_pth.c thr_stub.c thr_debug.c @@ -44,7 +44,7 @@ OBJS = threads.lo rdwr.lo tpool.lo rq.lo \ request.lo os-ip.lo url.lo pagectrl.o sortctrl.lo vlvctrl.lo \ init.lo options.lo print.lo string.lo util-int.lo schema.lo \ charray.lo tls.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo \ - turn.lo groupings.lo txn.lo ppolicy.lo dds.lo + turn.lo ppolicy.lo dds.lo LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries -- 2.39.5