From db3cc3ea229fa1ee4596fac828994f22e5a81634 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Fri, 22 Jul 2005 09:35:27 +0000 Subject: [PATCH] Cleanup SLAPI headers --- servers/slapd/slapi/ibm_pblock_params.h | 77 ----- servers/slapd/slapi/proto-slapi.h | 398 +++--------------------- servers/slapd/slapi/slapi.h | 350 +-------------------- servers/slapd/slapi/slapi_pblock.c | 27 -- 4 files changed, 54 insertions(+), 798 deletions(-) delete mode 100644 servers/slapd/slapi/ibm_pblock_params.h diff --git a/servers/slapd/slapi/ibm_pblock_params.h b/servers/slapd/slapi/ibm_pblock_params.h deleted file mode 100644 index 460e03cea4..0000000000 --- a/servers/slapd/slapi/ibm_pblock_params.h +++ /dev/null @@ -1,77 +0,0 @@ -/* $OpenLDAP$ */ -/* This work is part of OpenLDAP Software . - * - * Copyright 2002-2005 The OpenLDAP Foundation. - * Portions Copyright 1997,2002-2003 IBM Corporation. - * 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 work was initially developed by IBM Corporation for use in - * IBM products and subsequently ported to OpenLDAP Software by - * Steve Omrani. - */ - -#ifndef _ibm_pblock_params_H -#define _ibm_pblock_params_H - -#define FIRST_PARAM -1 -#define LAST_IBM_PARAM -48 -#define NETSCAPE_RESERVED(p) (p >= 280) && (p <= 299) -#define IBM_RESERVED(p) (p >= LAST_IBM_PARAM) && (p <= FIRST_PARAM) - -#define SLAPI_IBM_THREAD_CONTROL (FIRST_PARAM - 1) -#define SLAPI_IBM_PBLOCK (FIRST_PARAM - 2) -#define SLAPI_IBM_CONNECTION_PTR (FIRST_PARAM - 3) -#define SLAPI_IBM_BACKENDS (FIRST_PARAM - 4) -#define SLAPI_PRE_BIND_ALL (FIRST_PARAM - 5) -#define SLAPI_POST_BIND_ALL (FIRST_PARAM - 6) -#define SLAPI_IBM_ADMIN_DN (FIRST_PARAM - 7) -#define SLAPI_CONFIG_STATE (FIRST_PARAM - 8) -#define SLAPI_PLUGIN_DB_REGISTER_SERVICE_FN (FIRST_PARAM - 9) -#define SLAPI_PLUGIN_DB_INSERT_REPL_ENTRIES_FN (FIRST_PARAM - 10) -#define SLAPI_PLUGIN_DB_GET_REPL_ENTRIES_FN (FIRST_PARAM - 11) -#define SLAPI_PLUGIN_DB_REPLICA_DONE_FN (FIRST_PARAM - 12) -#define SLAPI_PLUGIN_DB_INIT_REPL_LIST_FN (FIRST_PARAM - 13) -#define SLAPI_PLUGIN_DB_THREAD_INITIALIZE_FN (FIRST_PARAM - 14) -#define SLAPI_PLUGIN_DB_THREAD_TERMINATE_FN (FIRST_PARAM - 15) -#define SLAPI_PLUGIN_DB_SCHEMA_MODIFY_ATTRTYPE_FN (FIRST_PARAM - 16) -#define SLAPI_PLUGIN_DB_SCHEMA_MODIFY_OBJCLASS_FN (FIRST_PARAM - 17) -#define SLAPI_PLUGIN_DB_INIT_FN (FIRST_PARAM - 18) -#define SLAPI_IBM_EXTENDED_OPS (FIRST_PARAM - 19) -#define SLAPI_IBM_CONTROLS (FIRST_PARAM - 20) -#define SLAPI_IBM_SASLMECHANISMS (FIRST_PARAM - 21) -#define SLAPI_IBM_BROADCAST_BE (FIRST_PARAM - 22) -#define SLAPI_IBM_NOTIFY_BIND_FN (FIRST_PARAM - 23) -#define SLAPI_IBM_SECRET (FIRST_PARAM - 24) -#define SLAPI_IBM_CL_START_FN (FIRST_PARAM - 25) -#define SLAPI_IBM_REPLICATE (FIRST_PARAM - 26) -#define SLAPI_IBM_CL_CLASS (FIRST_PARAM - 27) -#define SLAPI_IBM_CL_SUFFIX (FIRST_PARAM - 28) -#define SLAPI_IBM_CL_MAX_ENTRIES (FIRST_PARAM - 29) -#define SLAPI_IBM_CONNINFO (FIRST_PARAM - 30) -#define SLAPI_IBM_CL_FIRST_ENTRY (FIRST_PARAM - 31) -#define SLAPI_IBM_CL_LAST_ENTRY (FIRST_PARAM - 32) -#define SLAPI_IBM_CONN_DN_ALT (FIRST_PARAM - 33) -#define SLAPI_IBM_GSSAPI_CONTEXT (FIRST_PARAM - 34) -#define SLAPI_IBM_ADD_ENTRY (FIRST_PARAM - 35) -#define SLAPI_IBM_DELETE_ENTRY (FIRST_PARAM - 36) -#define SLAPI_IBM_MODIFY_ENTRY (FIRST_PARAM - 37) -#define SLAPI_IBM_MODIFY_MODS (FIRST_PARAM - 38) -#define SLAPI_IBM_MODRDN_ENTRY (FIRST_PARAM - 39) -#define SLAPI_IBM_MODRDN_NEWDN (FIRST_PARAM - 40) -#define SLAPI_IBM_EVENT_ENABLED (FIRST_PARAM - 41) -#define SLAPI_IBM_EVENT_MAXREG (FIRST_PARAM - 42) -#define SLAPI_IBM_EVENT_REGPERCONN (FIRST_PARAM - 43) -#define SLAPI_IBM_EVENT_CURREG (FIRST_PARAM - 44) -#define SLAPI_IBM_EVENT_SENTREG (FIRST_PARAM - 45) -#define SLAPI_IBM_CONN_DN_ORIG (FIRST_PARAM - 46) -#define SLAPI_PLUGIN_DB_DELETE_PROGRESS_FN (FIRST_PARAM - 47) -#endif /* _ibm_pblock_params_H */ diff --git a/servers/slapd/slapi/proto-slapi.h b/servers/slapd/slapi/proto-slapi.h index 326f263bfa..180d353f22 100644 --- a/servers/slapd/slapi/proto-slapi.h +++ b/servers/slapd/slapi/proto-slapi.h @@ -25,359 +25,51 @@ LDAP_BEGIN_DECL -/* - * Was: slapi_utils.h - */ - -extern int slapi_log_error( int severity, char *subsystem, char *fmt, ... ); -extern Slapi_Entry *slapi_str2entry( char *s, int flags ); -extern char *slapi_entry2str( Slapi_Entry *e, int *len ); -extern int slapi_entry_attr_merge( Slapi_Entry *e, char *type, struct berval **vals ); -extern int slapi_entry_attr_find( Slapi_Entry *e, char *type, Slapi_Attr **attr ); -extern char *slapi_entry_attr_get_charptr( const Slapi_Entry *e, const char *type ); -extern int slapi_entry_attr_delete( Slapi_Entry *e, char *type ); -extern int slapi_entry_attr_get_int( const Slapi_Entry *e, const char *type ); -extern long slapi_entry_attr_get_long( const Slapi_Entry *e, const char *type ); -extern unsigned int slapi_entry_attr_get_uint( const Slapi_Entry *e, const char *type ); -extern unsigned long slapi_entry_attr_get_ulong( const Slapi_Entry *e, const char *type ); -extern int slapi_entry_attr_hasvalue( Slapi_Entry *e, const char *type, const char *value ); -extern int slapi_entry_attr_merge_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals ); -extern void slapi_entry_attr_set_charptr(Slapi_Entry* e, const char *type, const char *value); -extern void slapi_entry_attr_set_int( Slapi_Entry* e, const char *type, int l); -extern void slapi_entry_attr_set_uint( Slapi_Entry* e, const char *type, unsigned int l); -extern void slapi_entry_attr_set_long(Slapi_Entry* e, const char *type, long l); -extern void slapi_entry_attr_set_ulong(Slapi_Entry* e, const char *type, unsigned long l); -extern int slapi_is_rootdse( const char *dn ); -extern int slapi_entry_has_children(const Slapi_Entry *e); -size_t slapi_entry_size(Slapi_Entry *e); -extern int slapi_entry_attr_merge_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals ); -extern int slapi_entry_add_values_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals ); -extern int slapi_entry_add_valueset(Slapi_Entry *e, const char *type, Slapi_ValueSet *vs); -extern int slapi_entry_delete_values_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals ); -extern int slapi_entry_merge_values_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals ); -extern int slapi_entry_attr_replace_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals ); -extern int slapi_entry_add_value(Slapi_Entry *e, const char *type, const Slapi_Value *value); -extern int slapi_entry_add_string(Slapi_Entry *e, const char *type, const char *value); -extern int slapi_entry_delete_string(Slapi_Entry *e, const char *type, const char *value); -extern int slapi_entry_first_attr( const Slapi_Entry *e, Slapi_Attr **attr ); -extern int slapi_entry_next_attr( const Slapi_Entry *e, Slapi_Attr *prevattr, Slapi_Attr **attr ); -extern const char *slapi_entry_get_uniqueid( const Slapi_Entry *e ); -extern void slapi_entry_set_uniqueid( Slapi_Entry *e, char *uniqueid ); -extern int slapi_entry_schema_check( Slapi_PBlock *pb, Slapi_Entry *e ); -extern int slapi_entry_rdn_values_present( const Slapi_Entry *e ); -extern int slapi_entry_add_rdn_values( Slapi_Entry *e ); - -extern char *slapi_entry_get_dn( Slapi_Entry *e ); -extern int slapi_x_entry_get_id( Slapi_Entry *e ); -extern void slapi_entry_set_dn( Slapi_Entry *e, char *dn ); -extern Slapi_Entry *slapi_entry_dup( Slapi_Entry *e ); -extern Slapi_Entry *slapi_entry_alloc(); -extern void slapi_entry_free( Slapi_Entry *e ); -extern int slapi_attr_get_values( Slapi_Attr *attr, struct berval ***vals ); - -/* DS 5.x SLAPI */ -extern int slapi_access_allowed( Slapi_PBlock *pb, Slapi_Entry *e, char *attr, - struct berval *val, int access ); -extern int slapi_acl_check_mods( Slapi_PBlock *pb, Slapi_Entry *e, LDAPMod **mods, - char **errbuf ); -extern Slapi_Attr *slapi_attr_new( void ); -extern Slapi_Attr *slapi_attr_init( Slapi_Attr *a, const char *type ); -extern void slapi_attr_free( Slapi_Attr **a ); -extern Slapi_Attr *slapi_attr_dup( const Slapi_Attr *attr ); -extern int slapi_attr_add_value( Slapi_Attr *a, const Slapi_Value *v ); -extern int slapi_attr_type2plugin( const char *type, void **pi ); -extern int slapi_attr_get_type( const Slapi_Attr *attr, char **type ); -extern int slapi_attr_get_oid_copy( const Slapi_Attr *attr, char **oidp ); -extern int slapi_attr_get_flags( const Slapi_Attr *attr, unsigned long *flags ); -extern int slapi_attr_flag_is_set( const Slapi_Attr *attr, unsigned long flag ); -extern int slapi_attr_value_cmp( const Slapi_Attr *attr, const struct berval *v1, - const struct berval *v2 ); -extern int slapi_attr_value_find( const Slapi_Attr *a, struct berval *v ); -#if 0 -#define SLAPI_TYPE_CMP_EXACT 0 -#define SLAPI_TYPE_CMP_BASE 1 -#define SLAPI_TYPE_CMP_SUBTYPE 2 -#endif -extern int slapi_attr_type_cmp( const char *t1, const char *t2, int opt ); -extern int slapi_attr_types_equivalent( const char *t1, const char *t2 ); -extern int slapi_attr_first_value( Slapi_Attr *a, Slapi_Value **v ); -extern int slapi_attr_next_value( Slapi_Attr *a, int hint, Slapi_Value **v ); -extern int slapi_attr_get_numvalues( const Slapi_Attr *a, int *numValues ); -extern int slapi_attr_get_valueset( const Slapi_Attr *a, Slapi_ValueSet **vs ); -extern int slapi_attr_get_bervals_copy( Slapi_Attr *a, struct berval ***vals ); -extern char *slapi_attr_syntax_normalize( const char *s ); - -extern Slapi_Value *slapi_value_new( void ); -extern Slapi_Value *slapi_value_new_berval(const struct berval *bval); -extern Slapi_Value *slapi_value_new_value(const Slapi_Value *v); -extern Slapi_Value *slapi_value_new_string(const char *s); -extern Slapi_Value *slapi_value_init(Slapi_Value *v); -extern Slapi_Value *slapi_value_init_berval(Slapi_Value *v, struct berval *bval); -extern Slapi_Value *slapi_value_init_string(Slapi_Value *v,const char *s); -extern Slapi_Value *slapi_value_dup(const Slapi_Value *v); -extern void slapi_value_free(Slapi_Value **value); -extern const struct berval *slapi_value_get_berval( const Slapi_Value *value ); -extern Slapi_Value *slapi_value_set_berval( Slapi_Value *value, const struct berval *bval ); -extern Slapi_Value *slapi_value_set_value( Slapi_Value *value, const Slapi_Value *vfrom); -extern Slapi_Value *slapi_value_set( Slapi_Value *value, void *val, unsigned long len); -extern int slapi_value_set_string(Slapi_Value *value, const char *strVal); -extern int slapi_value_set_int(Slapi_Value *value, int intVal); -extern const char*slapi_value_get_string(const Slapi_Value *value); -extern int slapi_value_get_int(const Slapi_Value *value); -extern unsigned int slapi_value_get_uint(const Slapi_Value *value); -extern long slapi_value_get_long(const Slapi_Value *value); -extern unsigned long slapi_value_get_ulong(const Slapi_Value *value); -extern size_t slapi_value_get_length(const Slapi_Value *value); -extern int slapi_value_compare(const Slapi_Attr *a,const Slapi_Value *v1,const Slapi_Value *v2); - -extern Slapi_ValueSet *slapi_valueset_new( void ); -extern void slapi_valueset_free(Slapi_ValueSet *vs); -extern void slapi_valueset_init(Slapi_ValueSet *vs); -extern void slapi_valueset_done(Slapi_ValueSet *vs); -extern void slapi_valueset_add_value(Slapi_ValueSet *vs, const Slapi_Value *addval); -extern int slapi_valueset_first_value( Slapi_ValueSet *vs, Slapi_Value **v ); -extern int slapi_valueset_next_value( Slapi_ValueSet *vs, int index, Slapi_Value **v); -extern int slapi_valueset_count( const Slapi_ValueSet *vs); -extern void slapi_valueset_set_valueset(Slapi_ValueSet *vs1, const Slapi_ValueSet *vs2); - -extern Slapi_Mutex *slapi_new_mutex( void ); -extern void slapi_destroy_mutex( Slapi_Mutex *mutex ); -extern void slapi_lock_mutex( Slapi_Mutex *mutex ); -extern int slapi_unlock_mutex( Slapi_Mutex *mutex ); -extern Slapi_CondVar *slapi_new_condvar( Slapi_Mutex *mutex ); -extern void slapi_destroy_condvar( Slapi_CondVar *cvar ); -extern int slapi_wait_condvar( Slapi_CondVar *cvar, struct timeval *timeout ); -extern int slapi_notify_condvar( Slapi_CondVar *cvar, int notify_all ); - -extern LDAP *slapi_ldap_init( char *ldaphost, int ldapport, int secure, int shared ); -extern void slapi_ldap_unbind( LDAP *ld ); - -extern char *slapi_ch_malloc( unsigned long size ); -extern void slapi_ch_free( void **ptr ); -extern void slapi_ch_free_string( char **s ); -extern char *slapi_ch_calloc( unsigned long nelem, unsigned long size ); -extern char *slapi_ch_realloc( char *block, unsigned long size ); -extern char *slapi_ch_strdup( char *s ); -extern void slapi_ch_array_free( char **arrayp ); -extern struct berval *slapi_ch_bvdup(const struct berval *v); -extern struct berval **slapi_ch_bvecdup(const struct berval **v); - -/* - * FIXME: these two were missing, but widely used in a couple of .c files - */ -extern size_t slapi_strlen(char *s ); -#define slapi_ch_stlen(s) slapi_strlen(s) -/* - * end of FIXME - */ -extern char *slapi_dn_normalize( char *dn ); -extern char *slapi_dn_normalize_case( char *dn ); -extern char * slapi_esc_dn_normalize( char *dn ); -extern char * slapi_esc_dn_normalize_case( char *dn ); -extern int slapi_dn_isroot( Slapi_PBlock *pb, char *dn ); -extern int slapi_dn_issuffix( char *dn, char *suffix ); -char *slapi_dn_beparent( Slapi_PBlock *pb, const char *dn ); -char *slapi_dn_parent( const char *dn ); -int slapi_dn_isparent( const char *parentdn, const char *childdn ); -extern char *slapi_dn_ignore_case( char *dn ); -extern char *slapi_get_hostname(); -extern void slapi_register_supported_saslmechanism( char *mechanism ); -extern void slapi_send_ldap_result( Slapi_PBlock *pb, int err, - char *matched, char *text, int nentries, struct berval **urls ); -extern int slapi_send_ldap_extended_response(Connection *conn, Operation *op, - int errornum, char *respName, struct berval *response); -extern int slapi_send_ldap_search_entry( Slapi_PBlock *pb, Slapi_Entry *e, - LDAPControl **ectrls, char **attrs, int attrsonly ); -extern int slapi_send_ldap_search_reference( Slapi_PBlock *pb, Slapi_Entry *e, - struct berval **references, LDAPControl **ectrls, struct berval **v2refs ); - -extern void slapi_register_supported_control(char *controloid, - unsigned long controlops); -extern int slapi_get_supported_controls(char ***ctrloidsp, unsigned long **ctrlopsp); -extern int slapi_control_present( LDAPControl **controls, char *oid, - struct berval **val, int *iscritical); -extern LDAPControl *slapi_dup_control(LDAPControl *control); -extern void slapi_register_supported_saslmechanism(char *mechanism); -extern char **slapi_get_supported_saslmechanisms(); -extern char **slapi_get_supported_extended_ops(void); -extern int checkControlHonored(LDAPControl **controls, char *pControlOid, - unsigned long operation, int *isHonored ); -extern void slapi_broadcast_be(int funcType, Slapi_PBlock *pPB); -extern Slapi_Filter *slapi_str2filter( char *str ); -extern Slapi_Filter *slapi_filter_dup( Slapi_Filter *f ); -extern void slapi_filter_free( Slapi_Filter *f, int recurse ); -extern int slapi_filter_get_choice( Slapi_Filter *f); -extern int slapi_filter_get_ava( Slapi_Filter *f, char **type, struct berval **bval ); -extern Slapi_Filter *slapi_filter_list_first( Slapi_Filter *f ); -extern Slapi_Filter *slapi_filter_list_next( Slapi_Filter *f, Slapi_Filter *fprev ); -extern int slapi_filter_get_attribute_type( Slapi_Filter *f, char **type ); -extern int slapi_x_filter_set_attribute_type( Slapi_Filter *f, const char *type ); -extern int slapi_filter_get_subfilt( Slapi_Filter *f, char **type, char **initial, - char ***any, char **final ); -extern Slapi_Filter *slapi_filter_join( int ftype, Slapi_Filter *f1, Slapi_Filter *f2); -extern int slapi_x_filter_append( int choice, Slapi_Filter **pContainingFilter, - Slapi_Filter **pNextFilter, Slapi_Filter *filterToAppend ); -extern int slapi_filter_test( Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Filter *f, - int verify_access ); -extern int slapi_filter_apply( Slapi_Filter *f, FILTER_APPLY_FN fn, void *arg, int *error_code ); -extern int slapi_filter_test_simple( Slapi_Entry *e, Slapi_Filter *f); -extern void slapi_free_search_results_internal(Slapi_PBlock *pb); -extern int slapi_is_connection_ssl(Slapi_PBlock *pPB, int *isSSL); -extern int slapi_get_client_port(Slapi_PBlock *pPB, int *fromPort); -extern int slapi_get_num_be(char *type); -extern unsigned long slapi_timer_current_time(); -extern unsigned long slapi_timer_get_time(char *label); -extern void slapi_timer_elapsed_time(char *label,unsigned long start); -extern int slapi_audit_init_header( Connection *conn, Operation *op, - Audit_record **arp, void **audit_op_str, - int audit_op, int audit_ext_op, int audit_op_str_len); -extern int slapi_audit_send_record( Slapi_PBlock *pb, Connection *conn, - Operation *op, int rc); - -extern int slapi_int_pblock_set_operation( Slapi_PBlock *pb, Operation *op ); - -extern LDAPMod **slapi_int_modifications2ldapmods(Modifications **); -extern Modifications *slapi_int_ldapmods2modifications(LDAPMod **); -extern void slapi_int_free_ldapmods(LDAPMod **); - -extern int slapi_compute_add_evaluator(slapi_compute_callback_t function); -extern int slapi_compute_add_search_rewriter(slapi_search_rewrite_callback_t function); -extern int compute_rewrite_search_filter(Slapi_PBlock *pb); -extern int compute_evaluator(computed_attr_context *c, char *type, Slapi_Entry *e, slapi_compute_output_t outputfn); -extern int slapi_int_compute_output_ber(computed_attr_context *c, Slapi_Attr *a, Slapi_Entry *e); -extern int slapi_x_compute_get_pblock(computed_attr_context *c, Slapi_PBlock **pb); - -extern int slapi_int_access_allowed(Operation *op, Entry *entry, AttributeDescription *desc, struct berval *val, slap_access_t access, AccessControlState *state); - -extern int slapi_x_backend_get_flags( const Slapi_Backend *be, unsigned long *flags ); - -extern ldap_pvt_thread_mutex_t slapi_hn_mutex; -extern ldap_pvt_thread_mutex_t slapi_time_mutex; -extern ldap_pvt_thread_mutex_t slapi_printmessage_mutex; -extern char *slapi_log_file; -extern int slapi_log_level; - - -/* - * Was: slapi_pblock.h - */ - -extern Slapi_PBlock *slapi_pblock_new( void ); -extern void slapi_pblock_destroy( Slapi_PBlock* ); -extern int slapi_pblock_get( Slapi_PBlock *pb, int arg, void *value ); -extern int slapi_pblock_set( Slapi_PBlock *pb, int arg, void *value ); -extern void slapi_pblock_check_params( Slapi_PBlock *pb, int flag ); -extern int slapi_pblock_delete_param( Slapi_PBlock *p, int param ); -extern void slapi_pblock_clear( Slapi_PBlock *pb ); - -/* - * OpenLDAP extensions - */ -extern int slapi_int_pblock_get_first( Backend *be, Slapi_PBlock **pb ); -extern int slapi_int_pblock_get_next( Slapi_PBlock **pb ); - - -/* - * Was: plugin.h - */ - -extern int slapi_int_register_plugin(Backend *be, Slapi_PBlock *pPB); -extern int slapi_int_call_plugins(Backend *be, int funcType, Slapi_PBlock * pPB); -extern int slapi_int_get_plugins(Backend *be, int functype, SLAPI_FUNC **ppFuncPtrs); -extern int slapi_int_register_extop(Backend *pBE, ExtendedOp **opList, Slapi_PBlock *pPB); -extern int slapi_int_get_extop_plugin(struct berval *reqoid, SLAPI_FUNC *pFuncAddr ); -extern int slapi_int_read_config(Backend *be, const char *fname, int lineno, - int argc, char **argv ); -extern void slapi_int_plugin_unparse(Backend *be, BerVarray *out ); -extern int slapi_int_initialize(void); - - -/* - * Was: slapi_ops.h - */ - -extern Slapi_PBlock *slapi_search_internal( char *base, int scope, char *filter, - LDAPControl **controls, char **attrs, int attrsonly ); -extern Slapi_PBlock *slapi_modify_internal( char *dn, LDAPMod **mods, - LDAPControl **controls, int log_change ); -extern Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry * e, - LDAPControl **controls, int log_change ); -extern Slapi_PBlock *slapi_add_internal( char * dn, LDAPMod **attrs, - LDAPControl **controls, int log_changes ); -extern Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry * e, - LDAPControl **controls, int log_change ); -extern Slapi_PBlock *slapi_delete_internal( char * dn, LDAPControl **controls, - int log_change ); -extern Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn, - int deloldrdn, LDAPControl **controls, int log_change); - -int slapi_search_internal_pb( Slapi_PBlock *pb ); -int slapi_search_internal_callback_pb( Slapi_PBlock *pb, void *callback_data, - plugin_result_callback prc, plugin_search_entry_callback psec, - plugin_referral_entry_callback prec ); -int slapi_add_internal_pb( Slapi_PBlock *pb ); -int slapi_modify_internal_pb( Slapi_PBlock *pb ); -int slapi_modrdn_internal_pb( Slapi_PBlock *pb ); -int slapi_delete_internal_pb( Slapi_PBlock *pb ); - -int slapi_seq_internal_callback_pb(Slapi_PBlock *pb, void *callback_data, - plugin_result_callback res_callback, - plugin_search_entry_callback srch_callback, - plugin_referral_entry_callback ref_callback); - -void slapi_search_internal_set_pb( Slapi_PBlock *pb, const char *base, - int scope, const char *filter, char **attrs, int attrsonly, - LDAPControl **controls, const char *uniqueid, - Slapi_ComponentId *plugin_identity, int operation_flags ); -void slapi_add_entry_internal_set_pb( Slapi_PBlock *pb, Slapi_Entry *e, - LDAPControl **controls, Slapi_ComponentId *plugin_identity, - int operation_flags ); -int slapi_add_internal_set_pb( Slapi_PBlock *pb, const char *dn, - LDAPMod **attrs, LDAPControl **controls, - Slapi_ComponentId *plugin_identity, int operation_flags ); -void slapi_modify_internal_set_pb( Slapi_PBlock *pb, const char *dn, - LDAPMod **mods, LDAPControl **controls, const char *uniqueid, - Slapi_ComponentId *plugin_identity, int operation_flags ); -void slapi_rename_internal_set_pb( Slapi_PBlock *pb, const char *olddn, - const char *newrdn, const char *newsuperior, int deloldrdn, - LDAPControl **controls, const char *uniqueid, - Slapi_ComponentId *plugin_identity, int operation_flags ); -void slapi_delete_internal_set_pb( Slapi_PBlock *pb, const char *dn, - LDAPControl **controls, const char *uniqueid, - Slapi_ComponentId *plugin_identity, int operation_flags ); -void slapi_seq_internal_set_pb( Slapi_PBlock *pb, char *ibase, int type, - char *attrname, char *val, char **attrs, int attrsonly, - LDAPControl **controls, Slapi_ComponentId *plugin_identity, - int operation_flags ); - -extern char **slapi_get_supported_extended_ops(void); -extern struct berval *slapi_int_get_supported_extop( int ); -extern int slapi_int_init_connection(Slapi_PBlock *pb, SlapReply *rs, int OpType, Connection **pConn); -extern void slapi_int_connection_destroy( Connection **pConn ); - -/* - * Was: slapi_cl.h - */ - -extern void slapi_register_changelog_suffix(char *suffix); -extern char **slapi_get_changelog_suffixes(); -extern void slapi_update_changelog_counters(long curNum, long numEntries); -extern char *slapi_get_cl_firstNum(); -extern char *slapi_get_cl_lastNum(); -extern int slapi_add_to_changelog(Slapi_Entry *ent, char *suffix, - char *chNum, Operation* op); -extern int slapi_delete_changelog(char *dn, char *suffix, - char *chNum, Operation* op); -extern int slapi_modify_changelog(char *dn, LDAPMod *mods,char *suffix, - char *chNum, Operation* op); -extern int slapi_modifyrdn_changelog(char *olddn, char *newRdn, int delRdn, - char *suffix, char *chNum, Operation* op); -extern Backend * slapi_cl_get_be(char *dn); - -int slapi_int_init_object_extensions(void); -int slapi_int_free_object_extensions(int objecttype, void *object); -int slapi_int_create_object_extensions(int objecttype, void *object); -int slapi_int_clear_object_extensions(int objecttype, void *object); +/* slapi_utils.c */ +LDAP_SLAPI_F (int) slapi_int_pblock_set_operation LDAP_P(( Slapi_PBlock *pb, Operation *op )); + +LDAP_SLAPI_F (LDAPMod **) slapi_int_modifications2ldapmods LDAP_P((Modifications **)); +LDAP_SLAPI_F (Modifications *) slapi_int_ldapmods2modifications LDAP_P((LDAPMod **)); +LDAP_SLAPI_F (void) slapi_int_free_ldapmods LDAP_P((LDAPMod **)); + +LDAP_SLAPI_F (int) slapi_int_access_allowed LDAP_P((Operation *op, + Entry *entry, + AttributeDescription *desc, + struct berval *val, + slap_access_t access, + AccessControlState *state )); + +LDAP_SLAPI_F (char **) slapi_get_supported_extended_ops LDAP_P((void)); + +/* slapi_ops.c */ +LDAP_SLAPI_F (int) slapi_int_init_connection LDAP_P((Slapi_PBlock *pb, SlapReply *rs, int OpType, Connection **pConn)); +LDAP_SLAPI_F (void) slapi_int_connection_destroy LDAP_P(( Connection **pConn )); + +/* slapi_pblock.c */ +LDAP_SLAPI_F (void) slapi_pblock_check_params LDAP_P(( Slapi_PBlock *pb, int flag )); +LDAP_SLAPI_F (int) slapi_pblock_delete_param LDAP_P(( Slapi_PBlock *p, int param )); +LDAP_SLAPI_F (void) slapi_pblock_clear LDAP_P(( Slapi_PBlock *pb )); + +LDAP_SLAPI_F (int) slapi_int_pblock_get_first LDAP_P(( Backend *be, Slapi_PBlock **pb )); +LDAP_SLAPI_F (int) slapi_int_pblock_get_next LDAP_P(( Slapi_PBlock **pb )); + +/* plugin.c */ +LDAP_SLAPI_F (int) slapi_int_register_plugin LDAP_P((Backend *be, Slapi_PBlock *pPB)); +LDAP_SLAPI_F (int) slapi_int_call_plugins LDAP_P((Backend *be, int funcType, Slapi_PBlock * pPB)); +LDAP_SLAPI_F (int) slapi_int_get_plugins LDAP_P((Backend *be, int functype, SLAPI_FUNC **ppFuncPtrs)); +LDAP_SLAPI_F (int) slapi_int_register_extop LDAP_P((Backend *pBE, ExtendedOp **opList, Slapi_PBlock *pPB)); +LDAP_SLAPI_F (int) slapi_int_get_extop_plugin LDAP_P((struct berval *reqoid, SLAPI_FUNC *pFuncAddr )); +LDAP_SLAPI_F (struct berval *) slapi_int_get_supported_extop LDAP_P(( int )); +LDAP_SLAPI_F (int) slapi_int_read_config LDAP_P((Backend *be, const char *fname, int lineno, + int argc, char **argv )); +LDAP_SLAPI_F (void) slapi_int_plugin_unparse LDAP_P((Backend *be, BerVarray *out )); +LDAP_SLAPI_F (int) slapi_int_initialize LDAP_P((void)); + +/* slapi_ext.c */ +LDAP_SLAPI_F (int) slapi_int_init_object_extensions LDAP_P((void)); +LDAP_SLAPI_F (int) slapi_int_free_object_extensions LDAP_P((int objecttype, void *object)); +LDAP_SLAPI_F (int) slapi_int_create_object_extensions LDAP_P((int objecttype, void *object)); +LDAP_SLAPI_F (int) slapi_int_clear_object_extensions LDAP_P((int objecttype, void *object)); LDAP_END_DECL diff --git a/servers/slapd/slapi/slapi.h b/servers/slapd/slapi/slapi.h index 78aef6f6ef..7c56f2e9dc 100644 --- a/servers/slapd/slapi/slapi.h +++ b/servers/slapd/slapi/slapi.h @@ -25,8 +25,6 @@ #ifndef _SLAPI_H #define _SLAPI_H -#include "ibm_pblock_params.h" - LDAP_BEGIN_DECL /* @@ -35,7 +33,7 @@ LDAP_BEGIN_DECL #define slapi_entry slap_entry #define slapi_attr slap_attr #define slapi_value berval -#define slapi_valueset berval* +#define slapi_valueset berval * #define slapi_filter slap_filter LDAP_END_DECL @@ -44,15 +42,6 @@ LDAP_END_DECL LDAP_BEGIN_DECL -/* - * Was: slapi_common.h - */ - -/* - * Was: slapi_utils.h - */ -typedef struct _Audit_record Audit_record; - #define SLAPI_OVERLAY_NAME "slapi" #define SLAPI_OPERATION_PBLOCK(_op) ((_op)->o_callback->sc_private) @@ -134,88 +123,6 @@ struct slapi_pblock { #define SLAPI_PLUGIN_IS_POST_FN(x) ((x) >= SLAPI_PLUGIN_POST_BIND_FN && (x) <= SLAPI_PLUGIN_POST_RESULT_FN) -/* - * Attribute flags returned by slapi_attr_get_flags() - */ -#define SLAPI_ATTR_FLAG_SINGLE 0x0001 -#define SLAPI_ATTR_FLAG_OPATTR 0x0002 -#define SLAPI_ATTR_FLAG_READONLY 0x0004 -#define SLAPI_ATTR_FLAG_STD_ATTR SLAPI_ATTR_FLAG_READONLY -#define SLAPI_ATTR_FLAG_OBSOLETE 0x0040 -#define SLAPI_ATTR_FLAG_COLLECTIVE 0x0080 -#define SLAPI_ATTR_FLAG_NOUSERMOD 0x0100 - -/* - * ACL levels - */ -#define SLAPI_ACL_COMPARE 0x01 -#define SLAPI_ACL_SEARCH 0x02 -#define SLAPI_ACL_READ 0x04 -#define SLAPI_ACL_WRITE 0x08 -#define SLAPI_ACL_DELETE 0x10 -#define SLAPI_ACL_ADD 0x20 -#define SLAPI_ACL_SELF 0x40 -#define SLAPI_ACL_PROXY 0x80 -#define SLAPI_ACL_ALL 0x7f - -/* - * Plugin types universally supported by SLAPI - * implementations - */ -#define SLAPI_PLUGIN_DATABASE 1 -#define SLAPI_PLUGIN_EXTENDEDOP 2 -#define SLAPI_PLUGIN_PREOPERATION 3 -#define SLAPI_PLUGIN_POSTOPERATION 4 -#define SLAPI_PLUGIN_MATCHINGRULE 5 -#define SLAPI_PLUGIN_SYNTAX 6 -/* XXX this is SLAPI_PLUGIN_ACL in SunDS */ -#define SLAPI_PLUGIN_AUDIT 7 -/* - * The following plugin types are reserved for future - * Sun ONE DS compatability. - */ -#define SLAPI_PLUGIN_BEPREOPERATION 8 -#define SLAPI_PLUGIN_BEPOSTOPERATION 9 -#define SLAPI_PLUGIN_ENTRY 10 -#define SLAPI_PLUGIN_TYPE_OBJECT 11 -#define SLAPI_PLUGIN_INTERNAL_PREOPERATION 12 -#define SLAPI_PLUGIN_INTERNAL_POSTOPERATION 13 -#define SLAPI_PLUGIN_PWD_STORAGE_SCHEME 14 -#define SLAPI_PLUGIN_VATTR_SP 15 -#define SLAPI_PLUGIN_REVER_PWD_STORAGE_SCHEME 16 - -#define SLAPI_PLUGIN_EXTENDED_SENT_RESULT -1 -#define SLAPI_PLUGIN_EXTENDED_NOT_HANDLED -2 - -#define SLAPI_BIND_SUCCESS 0 -#define SLAPI_BIND_FAIL 2 -#define SLAPI_BIND_ANONYMOUS 3 - -#define SLAPI_BACKEND 130 -#define SLAPI_CONNECTION 131 -#define SLAPI_OPERATION 132 -#define SLAPI_REQUESTOR_ISROOT 133 -#define SLAPI_BE_MONITORDN 134 -#define SLAPI_BE_TYPE 135 -#define SLAPI_BE_READONLY 136 -#define SLAPI_BE_LASTMOD 137 -#define SLAPI_OPERATION_PARAMETERS 138 -#define SLAPI_CONN_ID 139 - -#define SLAPI_OPINITIATED_TIME 140 -#define SLAPI_REQUESTOR_DN 141 -#define SLAPI_REQUESTOR_ISUPDATEDN 142 -#define SLAPI_IS_REPLICATED_OPERATION SLAPI_REQUESTOR_ISUPDATEDN -#define SLAPI_CONN_DN 143 -#define SLAPI_CONN_AUTHTYPE 144 -#define SLAPI_CONN_CLIENTIP 145 -#define SLAPI_CONN_SERVERIP 146 -#define SLAPI_X_CONN_CLIENTPATH 1300 -#define SLAPI_X_CONN_SERVERPATH 1301 -#define SLAPI_X_CONN_IS_UDP 1302 -#define SLAPI_X_CONN_SSF 1303 -#define SLAPI_X_CONN_SASL_CONTEXT 1304 - /* really private stuff */ #define SLAPI_X_CONFIG_ARGV 1400 #define SLAPI_X_INTOP_FLAGS 1401 @@ -224,225 +131,20 @@ struct slapi_pblock { #define SLAPI_X_INTOP_REFERRAL_ENTRY_CALLBACK 1404 #define SLAPI_X_INTOP_CALLBACK_DATA 1405 -#define SLAPD_AUTH_NONE "none" -#define SLAPD_AUTH_SIMPLE "simple" -#define SLAPD_AUTH_SSL "SSL" -#define SLAPD_AUTH_SASL "SASL " - -#define SLAPI_PLUGIN 3 -#define SLAPI_PLUGIN_PRIVATE 4 -#define SLAPI_PLUGIN_TYPE 5 -#define SLAPI_PLUGIN_ARGV 6 -#define SLAPI_PLUGIN_ARGC 7 -#define SLAPI_PLUGIN_VERSION 8 - -#define SLAPI_PLUGIN_OPRETURN 9 -#define SLAPI_PLUGIN_OBJECT 10 -#define SLAPI_PLUGIN_DESTROY_FN 11 - -#define SLAPI_PLUGIN_DESCRIPTION 12 - -#define SLAPI_PLUGIN_INTOP_RESULT 15 -#define SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES 16 -#define SLAPI_PLUGIN_INTOP_SEARCH_REFERRALS 17 - -#define SLAPI_PLUGIN_DB_BIND_FN 200 -#define SLAPI_PLUGIN_DB_UNBIND_FN 201 -#define SLAPI_PLUGIN_DB_SEARCH_FN 202 -#define SLAPI_PLUGIN_DB_COMPARE_FN 203 -#define SLAPI_PLUGIN_DB_MODIFY_FN 204 -#define SLAPI_PLUGIN_DB_MODRDN_FN 205 -#define SLAPI_PLUGIN_DB_ADD_FN 206 -#define SLAPI_PLUGIN_DB_DELETE_FN 207 -#define SLAPI_PLUGIN_DB_ABANDON_FN 208 -#define SLAPI_PLUGIN_DB_CONFIG_FN 209 -#define SLAPI_PLUGIN_CLOSE_FN 210 -#define SLAPI_PLUGIN_DB_FLUSH_FN 211 -#define SLAPI_PLUGIN_START_FN 212 -#define SLAPI_PLUGIN_DB_SEQ_FN 213 -#define SLAPI_PLUGIN_DB_ENTRY_FN 214 -#define SLAPI_PLUGIN_DB_REFERRAL_FN 215 -#define SLAPI_PLUGIN_DB_RESULT_FN 216 -#define SLAPI_PLUGIN_DB_LDIF2DB_FN 217 -#define SLAPI_PLUGIN_DB_DB2LDIF_FN 218 -#define SLAPI_PLUGIN_DB_BEGIN_FN 219 -#define SLAPI_PLUGIN_DB_COMMIT_FN 220 -#define SLAPI_PLUGIN_DB_ABORT_FN 221 -#define SLAPI_PLUGIN_DB_ARCHIVE2DB_FN 222 -#define SLAPI_PLUGIN_DB_DB2ARCHIVE_FN 223 -#define SLAPI_PLUGIN_DB_NEXT_SEARCH_ENTRY_FN 224 -#define SLAPI_PLUGIN_DB_FREE_RESULT_SET_FN 225 -#define SLAPI_PLUGIN_DB_SIZE_FN 226 +#define SLAPI_OPERATION_PARAMETERS 138 + #define SLAPI_PLUGIN_DB_TEST_FN 227 #define SLAPI_PLUGIN_DB_NO_ACL 250 -#define SLAPI_PLUGIN_EXT_OP_FN 300 -#define SLAPI_PLUGIN_EXT_OP_OIDLIST 301 -#define SLAPI_PLUGIN_PRE_BIND_FN 401 -#define SLAPI_PLUGIN_PRE_UNBIND_FN 402 -#define SLAPI_PLUGIN_PRE_SEARCH_FN 403 -#define SLAPI_PLUGIN_PRE_COMPARE_FN 404 -#define SLAPI_PLUGIN_PRE_MODIFY_FN 405 -#define SLAPI_PLUGIN_PRE_MODRDN_FN 406 -#define SLAPI_PLUGIN_PRE_ADD_FN 407 -#define SLAPI_PLUGIN_PRE_DELETE_FN 408 -#define SLAPI_PLUGIN_PRE_ABANDON_FN 409 -#define SLAPI_PLUGIN_PRE_ENTRY_FN 410 -#define SLAPI_PLUGIN_PRE_REFERRAL_FN 411 -#define SLAPI_PLUGIN_PRE_RESULT_FN 412 -#define SLAPI_PLUGIN_POST_BIND_FN 501 -#define SLAPI_PLUGIN_POST_UNBIND_FN 502 -#define SLAPI_PLUGIN_POST_SEARCH_FN 503 -#define SLAPI_PLUGIN_POST_COMPARE_FN 504 -#define SLAPI_PLUGIN_POST_MODIFY_FN 505 -#define SLAPI_PLUGIN_POST_MODRDN_FN 506 -#define SLAPI_PLUGIN_POST_ADD_FN 507 -#define SLAPI_PLUGIN_POST_DELETE_FN 508 -#define SLAPI_PLUGIN_POST_ABANDON_FN 509 -#define SLAPI_PLUGIN_POST_ENTRY_FN 510 -#define SLAPI_PLUGIN_POST_REFERRAL_FN 511 -#define SLAPI_PLUGIN_POST_RESULT_FN 512 - -#define SLAPI_OPERATION_TYPE 590 - -#define SLAPI_PLUGIN_MR_FILTER_CREATE_FN 600 -#define SLAPI_PLUGIN_MR_INDEXER_CREATE_FN 601 -#define SLAPI_PLUGIN_MR_FILTER_MATCH_FN 602 -#define SLAPI_PLUGIN_MR_FILTER_INDEX_FN 603 -#define SLAPI_PLUGIN_MR_FILTER_RESET_FN 604 -#define SLAPI_PLUGIN_MR_INDEX_FN 605 -#define SLAPI_PLUGIN_MR_OID 610 -#define SLAPI_PLUGIN_MR_TYPE 611 -#define SLAPI_PLUGIN_MR_VALUE 612 -#define SLAPI_PLUGIN_MR_VALUES 613 -#define SLAPI_PLUGIN_MR_KEYS 614 -#define SLAPI_PLUGIN_MR_FILTER_REUSABLE 615 -#define SLAPI_PLUGIN_MR_QUERY_OPERATOR 616 -#define SLAPI_PLUGIN_MR_USAGE 617 - -#define SLAPI_OP_LESS 1 -#define SLAPI_OP_LESS_OR_EQUAL 2 -#define SLAPI_OP_EQUAL 3 -#define SLAPI_OP_GREATER_OR_EQUAL 4 -#define SLAPI_OP_GREATER 5 -#define SLAPI_OP_SUBSTRING 6 - -#define SLAPI_PLUGIN_MR_USAGE_INDEX 0 -#define SLAPI_PLUGIN_MR_USAGE_SORT 1 - -#define SLAPI_MATCHINGRULE_NAME 1 -#define SLAPI_MATCHINGRULE_OID 2 -#define SLAPI_MATCHINGRULE_DESC 3 -#define SLAPI_MATCHINGRULE_SYNTAX 4 -#define SLAPI_MATCHINGRULE_OBSOLETE 5 - -#define SLAPI_PLUGIN_SYNTAX_FILTER_AVA 700 -#define SLAPI_PLUGIN_SYNTAX_FILTER_SUB 701 -#define SLAPI_PLUGIN_SYNTAX_VALUES2KEYS 702 -#define SLAPI_PLUGIN_SYNTAX_ASSERTION2KEYS_AVA 703 -#define SLAPI_PLUGIN_SYNTAX_ASSERTION2KEYS_SUB 704 -#define SLAPI_PLUGIN_SYNTAX_NAMES 705 -#define SLAPI_PLUGIN_SYNTAX_OID 706 -#define SLAPI_PLUGIN_SYNTAX_FLAGS 707 -#define SLAPI_PLUGIN_SYNTAX_COMPARE 708 - -#define SLAPI_PLUGIN_ACL_INIT 730 -#define SLAPI_PLUGIN_ACL_SYNTAX_CHECK 731 -#define SLAPI_PLUGIN_ACL_ALLOW_ACCESS 732 -#define SLAPI_PLUGIN_ACL_MODS_ALLOWED 733 -#define SLAPI_PLUGIN_ACL_MODS_UPDATE 734 - -#define SLAPI_OPERATION_AUTHTYPE 741 -#define SLAPI_OPERATION_ID 742 -#define SLAPI_CONN_CERT 743 -#define SLAPI_CONN_AUTHMETHOD 746 - -#define SLAPI_RESULT_CODE 881 -#define SLAPI_RESULT_TEXT 882 -#define SLAPI_RESULT_MATCHED 883 - -#define SLAPI_PLUGIN_SYNTAX_FLAG_ORKEYS 1 -#define SLAPI_PLUGIN_SYNTAX_FLAG_ORDERING 2 - -#define SLAPI_PLUGIN_AUDIT_DATA 1100 -#define SLAPI_PLUGIN_AUDIT_FN 1101 - /* DS 5.x Computed Attribute Callbacks (not exposed) */ #define SLAPI_PLUGIN_COMPUTE_EVALUATOR_FN 1200 #define SLAPI_PLUGIN_COMPUTE_SEARCH_REWRITER_FN 1201 -#define SLAPI_X_PLUGIN_PRE_GROUP_FN 1202 -#define SLAPI_X_PLUGIN_POST_GROUP_FN 1203 - -/* backend_group extension */ -#define SLAPI_X_GROUP_ENTRY 1250 /* e */ -#define SLAPI_X_GROUP_ATTRIBUTE 1251 /* group_at */ -#define SLAPI_X_GROUP_OPERATION_DN 1252 /* op_ndn */ -#define SLAPI_X_GROUP_TARGET_ENTRY 1253 /* target */ - -#define SLAPI_MANAGEDSAIT 1000 - -#define SLAPI_CONFIG_FILENAME 40 -#define SLAPI_CONFIG_LINENO 41 -#define SLAPI_CONFIG_ARGC 42 -#define SLAPI_CONFIG_ARGV 43 - -#define SLAPI_TARGET_ADDRESS 48 -#define SLAPI_TARGET_UNIQUEID 49 -#define SLAPI_TARGET_DN 50 -#define SLAPI_REQCONTROLS 51 - #define SLAPI_ENTRY_PRE_OP 52 #define SLAPI_ENTRY_POST_OP 53 -#define SLAPI_RESCONTROLS 55 /* This is the spelling in the SunOne 5.2 docs */ #define SLAPI_RES_CONTROLS SLAPI_RESCONTROLS -#define SLAPI_ADD_RESCONTROL 56 - -#define SLAPI_ADD_TARGET SLAPI_TARGET_DN -#define SLAPI_ADD_ENTRY 60 -#define SLAPI_ADD_EXISTING_DN_ENTRY 61 -#define SLAPI_ADD_PARENT_ENTRY 62 -#define SLAPI_ADD_PARENT_UNIQUEID 63 -#define SLAPI_ADD_EXISTING_UNIQUEID_ENTRY 64 - -#define SLAPI_BIND_TARGET SLAPI_TARGET_DN -#define SLAPI_BIND_METHOD 70 -#define SLAPI_BIND_CREDENTIALS 71 -#define SLAPI_BIND_SASLMECHANISM 72 -#define SLAPI_BIND_RET_SASLCREDS 73 - -#define SLAPI_COMPARE_TARGET SLAPI_TARGET_DN -#define SLAPI_COMPARE_TYPE 80 -#define SLAPI_COMPARE_VALUE 81 - -#define SLAPI_DELETE_TARGET SLAPI_TARGET_DN -#define SLAPI_DELETE_EXISTING_ENTRY SLAPI_ADD_EXISTING_DN_ENTRY - -#define SLAPI_MODIFY_TARGET SLAPI_TARGET_DN -#define SLAPI_MODIFY_MODS 90 -#define SLAPI_MODIFY_EXISTING_ENTRY SLAPI_ADD_EXISTING_DN_ENTRY - -#define SLAPI_MODRDN_TARGET SLAPI_TARGET_DN -#define SLAPI_MODRDN_NEWRDN 100 -#define SLAPI_MODRDN_DELOLDRDN 101 -#define SLAPI_MODRDN_NEWSUPERIOR 102 -#define SLAPI_MODRDN_EXISTING_ENTRY SLAPI_ADD_EXISTING_DN_ENTRY -#define SLAPI_MODRDN_PARENT_ENTRY 104 -#define SLAPI_MODRDN_NEWPARENT_ENTRY 105 -#define SLAPI_MODRDN_TARGET_ENTRY 106 -#define SLAPI_MODRDN_NEWSUPERIOR_ADDRESS 107 - -#define SLAPI_SEARCH_TARGET SLAPI_TARGET_DN -#define SLAPI_SEARCH_SCOPE 110 -#define SLAPI_SEARCH_DEREF 111 -#define SLAPI_SEARCH_SIZELIMIT 112 -#define SLAPI_SEARCH_TIMELIMIT 113 -#define SLAPI_SEARCH_FILTER 114 -#define SLAPI_SEARCH_STRFILTER 115 -#define SLAPI_SEARCH_ATTRS 116 -#define SLAPI_SEARCH_ATTRSONLY 117 #define SLAPI_ABANDON_MSGID 120 @@ -450,11 +152,6 @@ struct slapi_pblock { #define SLAPI_SEQ_ATTRNAME 151 #define SLAPI_SEQ_VAL 152 -#define SLAPI_EXT_OP_REQ_OID 160 -#define SLAPI_EXT_OP_REQ_VALUE 161 -#define SLAPI_EXT_OP_RET_OID 162 -#define SLAPI_EXT_OP_RET_VALUE 163 - #define SLAPI_MR_FILTER_ENTRY 170 #define SLAPI_MR_FILTER_TYPE 171 #define SLAPI_MR_FILTER_VALUE 172 @@ -469,47 +166,18 @@ struct slapi_pblock { #define SLAPI_PARENT_TXN 190 #define SLAPI_TXN 191 -#define SLAPI_SEARCH_RESULT_SET 193 -#define SLAPI_SEARCH_RESULT_ENTRY 194 -#define SLAPI_NENTRIES 195 -#define SLAPI_SEARCH_REFERRALS 196 - #define SLAPI_CHANGENUMBER 197 #define SLAPI_LOG_OPERATION 198 #define SLAPI_DBSIZE 199 -#define SLAPI_LOG_FATAL 0 -#define SLAPI_LOG_TRACE 1 -#define SLAPI_LOG_PACKETS 2 -#define SLAPI_LOG_ARGS 3 -#define SLAPI_LOG_CONNS 4 -#define SLAPI_LOG_BER 5 -#define SLAPI_LOG_FILTER 6 -#define SLAPI_LOG_CONFIG 7 -#define SLAPI_LOG_ACL 8 -#define SLAPI_LOG_SHELL 9 -#define SLAPI_LOG_PARSE 10 -#define SLAPI_LOG_HOUSE 11 -#define SLAPI_LOG_REPL 12 -#define SLAPI_LOG_CACHE 13 -#define SLAPI_LOG_PLUGIN 14 - -#define SLAPI_OPERATION_BIND 0x00000001L -#define SLAPI_OPERATION_UNBIND 0x00000002L -#define SLAPI_OPERATION_SEARCH 0x00000004L -#define SLAPI_OPERATION_MODIFY 0x00000008L -#define SLAPI_OPERATION_ADD 0x00000010L -#define SLAPI_OPERATION_DELETE 0x00000020L -#define SLAPI_OPERATION_MODDN 0x00000040L -#define SLAPI_OPERATION_MODRDN SLAPI_OPERATION_MODDN -#define SLAPI_OPERATION_COMPARE 0x00000080L -#define SLAPI_OPERATION_ABANDON 0x00000100L -#define SLAPI_OPERATION_EXTENDED 0x00000200L -#define SLAPI_OPERATION_ANY 0xFFFFFFFFL -#define SLAPI_OPERATION_NONE 0x00000000L +#define SLAPI_IBM_PBLOCK -3 -LDAP_END_DECL +LDAP_SLAPI_V (ldap_pvt_thread_mutex_t) slapi_hn_mutex; +LDAP_SLAPI_V (ldap_pvt_thread_mutex_t) slapi_time_mutex; +LDAP_SLAPI_V (ldap_pvt_thread_mutex_t) slapi_printmessage_mutex; +LDAP_SLAPI_V (char *) slapi_log_file; +LDAP_SLAPI_V (int) slapi_log_level; #include "proto-slapi.h" diff --git a/servers/slapd/slapi/slapi_pblock.c b/servers/slapd/slapi/slapi_pblock.c index e05e1c52e1..ddcd67d5ec 100644 --- a/servers/slapd/slapi/slapi_pblock.c +++ b/servers/slapd/slapi/slapi_pblock.c @@ -51,14 +51,6 @@ getPBlockClass( int param ) case SLAPI_DB2LDIF_PRINTKEY: case SLAPI_LDIF2DB_REMOVEDUPVALS: case SLAPI_MANAGEDSAIT: - case SLAPI_IBM_BROADCAST_BE: - case SLAPI_IBM_REPLICATE: - case SLAPI_IBM_CL_MAX_ENTRIES: - case SLAPI_IBM_CL_FIRST_ENTRY: - case SLAPI_IBM_CL_LAST_ENTRY: - case SLAPI_IBM_EVENT_ENABLED: - case SLAPI_IBM_EVENT_MAXREG: - case SLAPI_IBM_EVENT_REGPERCONN: case SLAPI_REQUESTOR_ISUPDATEDN: case SLAPI_X_CONN_IS_UDP: case SLAPI_X_CONN_SSF: @@ -73,7 +65,6 @@ getPBlockClass( int param ) return PBLOCK_CLASS_LONG_INTEGER; break; - case SLAPI_PLUGIN_DB_INIT_FN: case SLAPI_PLUGIN_DESTROY_FN: case SLAPI_PLUGIN_DB_BIND_FN: case SLAPI_PLUGIN_DB_UNBIND_FN: @@ -169,9 +160,6 @@ getPBlockClass( int param ) case SLAPI_X_INTOP_SEARCH_ENTRY_CALLBACK: case SLAPI_X_INTOP_REFERRAL_ENTRY_CALLBACK: case SLAPI_X_INTOP_CALLBACK_DATA: - case SLAPI_IBM_CONN_DN_ALT: - case SLAPI_IBM_CONN_DN_ORIG: - case SLAPI_IBM_GSSAPI_CONTEXT: case SLAPI_PLUGIN_MR_OID: case SLAPI_PLUGIN_MR_TYPE: case SLAPI_PLUGIN_MR_VALUE: @@ -355,8 +343,6 @@ set( Slapi_PBlock *pb, int param, void *val ) switch ( param ) { case SLAPI_CONN_DN: case SLAPI_CONN_AUTHMETHOD: - case SLAPI_IBM_CONN_DN_ALT: - case SLAPI_IBM_CONN_DN_ORIG: case SLAPI_RESULT_TEXT: case SLAPI_RESULT_MATCHED: freeit = 1; @@ -477,17 +463,6 @@ slapi_pblock_destroy( Slapi_PBlock* pb ) str = NULL; } - get( pb, SLAPI_IBM_CONN_DN_ALT, (void **)&str ); - if ( str != NULL ) { - ch_free( str ); - str = NULL; - } - - get( pb, SLAPI_IBM_CONN_DN_ORIG, (void **)&str ); - if ( str != NULL ) { - ch_free( str ); - } - get( pb, SLAPI_RESULT_TEXT, (void **)&str ); if ( str != NULL ) { ch_free( str ); @@ -530,8 +505,6 @@ slapi_pblock_set( Slapi_PBlock *pb, int arg, void *value ) switch ( arg ) { case SLAPI_CONN_DN: case SLAPI_CONN_AUTHMETHOD: - case SLAPI_IBM_CONN_DN_ALT: - case SLAPI_IBM_CONN_DN_ORIG: case SLAPI_RESULT_TEXT: case SLAPI_RESULT_MATCHED: if ( value != NULL ) { -- 2.39.5