Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include
File: slapi-plugin.h
/* $OpenLDAP$ */
[0] Fix | Delete
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
[1] Fix | Delete
*
[2] Fix | Delete
* Copyright 1998-2018 The OpenLDAP Foundation.
[3] Fix | Delete
* Portions Copyright 1997,2002,2003 IBM Corporation.
[4] Fix | Delete
* All rights reserved.
[5] Fix | Delete
*
[6] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[7] Fix | Delete
* modification, are permitted only as authorized by the OpenLDAP
[8] Fix | Delete
* Public License.
[9] Fix | Delete
*
[10] Fix | Delete
* A copy of this license is available in file LICENSE in the
[11] Fix | Delete
* top-level directory of the distribution or, alternatively, at
[12] Fix | Delete
* <http://www.OpenLDAP.org/license.html>.
[13] Fix | Delete
*/
[14] Fix | Delete
[15] Fix | Delete
/*
[16] Fix | Delete
* This header is used in development of SLAPI plugins for
[17] Fix | Delete
* OpenLDAP slapd(8) and other directory servers supporting
[18] Fix | Delete
* this interface. Your portability mileage may vary.
[19] Fix | Delete
*/
[20] Fix | Delete
[21] Fix | Delete
#ifndef _SLAPI_PLUGIN_H
[22] Fix | Delete
#define _SLAPI_PLUGIN_H
[23] Fix | Delete
[24] Fix | Delete
#include <ldap.h>
[25] Fix | Delete
[26] Fix | Delete
typedef struct slapi_pblock Slapi_PBlock;
[27] Fix | Delete
typedef struct slapi_entry Slapi_Entry;
[28] Fix | Delete
typedef struct slapi_attr Slapi_Attr;
[29] Fix | Delete
typedef struct slapi_value Slapi_Value;
[30] Fix | Delete
typedef struct slapi_valueset Slapi_ValueSet;
[31] Fix | Delete
typedef struct slapi_filter Slapi_Filter;
[32] Fix | Delete
typedef struct BackendDB Slapi_Backend;
[33] Fix | Delete
typedef struct Operation Slapi_Operation;
[34] Fix | Delete
typedef struct Connection Slapi_Connection;
[35] Fix | Delete
typedef struct slapi_dn Slapi_DN;
[36] Fix | Delete
typedef struct slapi_rdn Slapi_RDN;
[37] Fix | Delete
typedef struct slapi_mod Slapi_Mod;
[38] Fix | Delete
typedef struct slapi_mods Slapi_Mods;
[39] Fix | Delete
typedef struct slapi_componentid Slapi_ComponentId;
[40] Fix | Delete
[41] Fix | Delete
#define SLAPI_ATTR_UNIQUEID "entryUUID"
[42] Fix | Delete
#define SLAPI_ATTR_OBJECTCLASS "objectClass"
[43] Fix | Delete
[44] Fix | Delete
/* pblock routines */
[45] Fix | Delete
int slapi_pblock_get( Slapi_PBlock *pb, int arg, void *value );
[46] Fix | Delete
int slapi_pblock_set( Slapi_PBlock *pb, int arg, void *value );
[47] Fix | Delete
Slapi_PBlock *slapi_pblock_new( void );
[48] Fix | Delete
void slapi_pblock_destroy( Slapi_PBlock *pb );
[49] Fix | Delete
[50] Fix | Delete
/* entry/attr/dn routines */
[51] Fix | Delete
Slapi_Entry *slapi_str2entry( char *s, int flags );
[52] Fix | Delete
#define SLAPI_STR2ENTRY_REMOVEDUPVALS 1
[53] Fix | Delete
#define SLAPI_STR2ENTRY_ADDRDNVALS 2
[54] Fix | Delete
#define SLAPI_STR2ENTRY_BIGENTRY 4
[55] Fix | Delete
#define SLAPI_STR2ENTRY_TOMBSTONE_CHECK 8
[56] Fix | Delete
#define SLAPI_STR2ENTRY_IGNORE_STATE 16
[57] Fix | Delete
#define SLAPI_STR2ENTRY_INCLUDE_VERSION_STR 32
[58] Fix | Delete
#define SLAPI_STR2ENTRY_EXPAND_OBJECTCLASSES 64
[59] Fix | Delete
#define SLAPI_STR2ENTRY_NOT_WELL_FORMED_LDIF 128
[60] Fix | Delete
char *slapi_entry2str( Slapi_Entry *e, int *len );
[61] Fix | Delete
char *slapi_entry_get_dn( Slapi_Entry *e );
[62] Fix | Delete
int slapi_x_entry_get_id( Slapi_Entry *e );
[63] Fix | Delete
void slapi_entry_set_dn( Slapi_Entry *e, char *dn );
[64] Fix | Delete
Slapi_Entry *slapi_entry_dup( Slapi_Entry *e );
[65] Fix | Delete
int slapi_entry_attr_delete( Slapi_Entry *e, char *type );
[66] Fix | Delete
Slapi_Entry *slapi_entry_alloc();
[67] Fix | Delete
void slapi_entry_free( Slapi_Entry *e );
[68] Fix | Delete
int slapi_entry_attr_merge( Slapi_Entry *e, char *type, struct berval **vals );
[69] Fix | Delete
int slapi_entry_attr_find( Slapi_Entry *e, char *type, Slapi_Attr **attr );
[70] Fix | Delete
char *slapi_entry_attr_get_charptr( const Slapi_Entry *e, const char *type );
[71] Fix | Delete
int slapi_entry_attr_get_int( const Slapi_Entry *e, const char *type );
[72] Fix | Delete
long slapi_entry_attr_get_long( const Slapi_Entry *e, const char *type );
[73] Fix | Delete
unsigned int slapi_entry_attr_get_uint( const Slapi_Entry *e, const char *type );
[74] Fix | Delete
unsigned long slapi_entry_attr_get_ulong( const Slapi_Entry *e, const char *type );
[75] Fix | Delete
int slapi_attr_get_values( Slapi_Attr *attr, struct berval ***vals );
[76] Fix | Delete
char *slapi_dn_normalize( char *dn );
[77] Fix | Delete
char *slapi_dn_normalize_case( char *dn );
[78] Fix | Delete
int slapi_dn_issuffix( char *dn, char *suffix );
[79] Fix | Delete
char *slapi_dn_beparent( Slapi_PBlock *pb, const char *dn );
[80] Fix | Delete
int slapi_dn_isbesuffix( Slapi_PBlock *pb, char *dn );
[81] Fix | Delete
char *slapi_dn_parent( const char *dn );
[82] Fix | Delete
int slapi_dn_isparent( const char *parentdn, const char *childdn );
[83] Fix | Delete
char *slapi_dn_ignore_case( char *dn );
[84] Fix | Delete
int slapi_rdn2typeval( char *rdn, char **type, struct berval *bv );
[85] Fix | Delete
char *slapi_dn_plus_rdn(const char *dn, const char *rdn);
[86] Fix | Delete
[87] Fix | Delete
/* DS 5.x SLAPI */
[88] Fix | Delete
int slapi_access_allowed( Slapi_PBlock *pb, Slapi_Entry *e, char *attr, struct berval *val, int access );
[89] Fix | Delete
int slapi_acl_check_mods( Slapi_PBlock *pb, Slapi_Entry *e, LDAPMod **mods, char **errbuf );
[90] Fix | Delete
Slapi_Attr *slapi_attr_new( void );
[91] Fix | Delete
Slapi_Attr *slapi_attr_init( Slapi_Attr *a, const char *type );
[92] Fix | Delete
void slapi_attr_free( Slapi_Attr **a );
[93] Fix | Delete
Slapi_Attr *slapi_attr_dup( const Slapi_Attr *attr );
[94] Fix | Delete
int slapi_attr_add_value( Slapi_Attr *a, const Slapi_Value *v );
[95] Fix | Delete
int slapi_attr_type2plugin( const char *type, void **pi );
[96] Fix | Delete
int slapi_attr_get_type( const Slapi_Attr *attr, char **type );
[97] Fix | Delete
int slapi_attr_get_oid_copy( const Slapi_Attr *attr, char **oidp );
[98] Fix | Delete
int slapi_attr_get_flags( const Slapi_Attr *attr, unsigned long *flags );
[99] Fix | Delete
int slapi_attr_flag_is_set( const Slapi_Attr *attr, unsigned long flag );
[100] Fix | Delete
int slapi_attr_value_cmp( const Slapi_Attr *attr, const struct berval *v1, const struct berval *v2 );
[101] Fix | Delete
int slapi_attr_value_find( const Slapi_Attr *a, struct berval *v );
[102] Fix | Delete
#define SLAPI_TYPE_CMP_EXACT 0
[103] Fix | Delete
#define SLAPI_TYPE_CMP_BASE 1
[104] Fix | Delete
#define SLAPI_TYPE_CMP_SUBTYPE 2
[105] Fix | Delete
int slapi_attr_type_cmp( const char *t1, const char *t2, int opt );
[106] Fix | Delete
int slapi_attr_types_equivalent( const char *t1, const char *t2 );
[107] Fix | Delete
int slapi_attr_first_value( Slapi_Attr *a, Slapi_Value **v );
[108] Fix | Delete
int slapi_attr_next_value( Slapi_Attr *a, int hint, Slapi_Value **v );
[109] Fix | Delete
int slapi_attr_get_numvalues( const Slapi_Attr *a, int *numValues );
[110] Fix | Delete
int slapi_attr_get_valueset( const Slapi_Attr *a, Slapi_ValueSet **vs );
[111] Fix | Delete
int slapi_attr_get_bervals_copy( Slapi_Attr *a, struct berval ***vals );
[112] Fix | Delete
int slapi_entry_attr_hasvalue( Slapi_Entry *e, const char *type, const char *value );
[113] Fix | Delete
int slapi_entry_attr_merge_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals );
[114] Fix | Delete
void slapi_entry_attr_set_charptr(Slapi_Entry* e, const char *type, const char *value);
[115] Fix | Delete
void slapi_entry_attr_set_int( Slapi_Entry* e, const char *type, int l);
[116] Fix | Delete
void slapi_entry_attr_set_uint( Slapi_Entry* e, const char *type, unsigned int l);
[117] Fix | Delete
void slapi_entry_attr_set_long(Slapi_Entry* e, const char *type, long l);
[118] Fix | Delete
void slapi_entry_attr_set_ulong(Slapi_Entry* e, const char *type, unsigned long l);
[119] Fix | Delete
int slapi_entry_has_children(const Slapi_Entry *e);
[120] Fix | Delete
size_t slapi_entry_size(Slapi_Entry *e);
[121] Fix | Delete
int slapi_is_rootdse( const char *dn );
[122] Fix | Delete
int slapi_entry_attr_merge_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals );
[123] Fix | Delete
int slapi_entry_add_values_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals );
[124] Fix | Delete
int slapi_entry_add_valueset(Slapi_Entry *e, const char *type, Slapi_ValueSet *vs);
[125] Fix | Delete
int slapi_entry_delete_values_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals );
[126] Fix | Delete
int slapi_entry_merge_values_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals );
[127] Fix | Delete
int slapi_entry_attr_replace_sv( Slapi_Entry *e, const char *type, Slapi_Value **vals );
[128] Fix | Delete
int slapi_entry_add_value(Slapi_Entry *e, const char *type, const Slapi_Value *value);
[129] Fix | Delete
int slapi_entry_add_string(Slapi_Entry *e, const char *type, const char *value);
[130] Fix | Delete
int slapi_entry_delete_string(Slapi_Entry *e, const char *type, const char *value);
[131] Fix | Delete
int slapi_entry_first_attr( const Slapi_Entry *e, Slapi_Attr **attr );
[132] Fix | Delete
int slapi_entry_next_attr( const Slapi_Entry *e, Slapi_Attr *prevattr, Slapi_Attr **attr );
[133] Fix | Delete
const char *slapi_entry_get_uniqueid( const Slapi_Entry *e );
[134] Fix | Delete
void slapi_entry_set_uniqueid( Slapi_Entry *e, char *uniqueid );
[135] Fix | Delete
int slapi_entry_schema_check( Slapi_PBlock *pb, Slapi_Entry *e );
[136] Fix | Delete
int slapi_entry_rdn_values_present( const Slapi_Entry *e );
[137] Fix | Delete
int slapi_entry_add_rdn_values( Slapi_Entry *e );
[138] Fix | Delete
char *slapi_attr_syntax_normalize( const char *s );
[139] Fix | Delete
[140] Fix | Delete
Slapi_Value *slapi_value_new( void );
[141] Fix | Delete
Slapi_Value *slapi_value_new_berval(const struct berval *bval);
[142] Fix | Delete
Slapi_Value *slapi_value_new_value(const Slapi_Value *v);
[143] Fix | Delete
Slapi_Value *slapi_value_new_string(const char *s);
[144] Fix | Delete
Slapi_Value *slapi_value_init(Slapi_Value *v);
[145] Fix | Delete
Slapi_Value *slapi_value_init_berval(Slapi_Value *v, struct berval *bval);
[146] Fix | Delete
Slapi_Value *slapi_value_init_string(Slapi_Value *v, const char *s);
[147] Fix | Delete
Slapi_Value *slapi_value_dup(const Slapi_Value *v);
[148] Fix | Delete
void slapi_value_free(Slapi_Value **value);
[149] Fix | Delete
const struct berval *slapi_value_get_berval( const Slapi_Value *value );
[150] Fix | Delete
Slapi_Value *slapi_value_set_berval( Slapi_Value *value, const struct berval *bval );
[151] Fix | Delete
Slapi_Value *slapi_value_set_value( Slapi_Value *value, const Slapi_Value *vfrom);
[152] Fix | Delete
Slapi_Value *slapi_value_set( Slapi_Value *value, void *val, unsigned long len);
[153] Fix | Delete
int slapi_value_set_string(Slapi_Value *value, const char *strVal);
[154] Fix | Delete
int slapi_value_set_int(Slapi_Value *value, int intVal);
[155] Fix | Delete
const char*slapi_value_get_string(const Slapi_Value *value);
[156] Fix | Delete
int slapi_value_get_int(const Slapi_Value *value);
[157] Fix | Delete
unsigned int slapi_value_get_uint(const Slapi_Value *value);
[158] Fix | Delete
long slapi_value_get_long(const Slapi_Value *value);
[159] Fix | Delete
unsigned long slapi_value_get_ulong(const Slapi_Value *value);
[160] Fix | Delete
size_t slapi_value_get_length(const Slapi_Value *value);
[161] Fix | Delete
int slapi_value_compare(const Slapi_Attr *a, const Slapi_Value *v1, const Slapi_Value *v2);
[162] Fix | Delete
[163] Fix | Delete
Slapi_ValueSet *slapi_valueset_new( void );
[164] Fix | Delete
void slapi_valueset_free(Slapi_ValueSet *vs);
[165] Fix | Delete
void slapi_valueset_init(Slapi_ValueSet *vs);
[166] Fix | Delete
void slapi_valueset_done(Slapi_ValueSet *vs);
[167] Fix | Delete
void slapi_valueset_add_value(Slapi_ValueSet *vs, const Slapi_Value *addval);
[168] Fix | Delete
int slapi_valueset_first_value( Slapi_ValueSet *vs, Slapi_Value **v );
[169] Fix | Delete
int slapi_valueset_next_value( Slapi_ValueSet *vs, int index, Slapi_Value **v);
[170] Fix | Delete
int slapi_valueset_count( const Slapi_ValueSet *vs);
[171] Fix | Delete
void slapi_valueset_set_valueset(Slapi_ValueSet *vs1, const Slapi_ValueSet *vs2);
[172] Fix | Delete
[173] Fix | Delete
/* DNs */
[174] Fix | Delete
Slapi_DN *slapi_sdn_new( void );
[175] Fix | Delete
Slapi_DN *slapi_sdn_new_dn_byval( const char *dn );
[176] Fix | Delete
Slapi_DN *slapi_sdn_new_ndn_byval( const char *ndn );
[177] Fix | Delete
Slapi_DN *slapi_sdn_new_dn_byref( const char *dn );
[178] Fix | Delete
Slapi_DN *slapi_sdn_new_ndn_byref( const char *ndn );
[179] Fix | Delete
Slapi_DN *slapi_sdn_new_dn_passin( const char *dn );
[180] Fix | Delete
Slapi_DN *slapi_sdn_set_dn_byval( Slapi_DN *sdn, const char *dn );
[181] Fix | Delete
Slapi_DN *slapi_sdn_set_dn_byref( Slapi_DN *sdn, const char *dn );
[182] Fix | Delete
Slapi_DN *slapi_sdn_set_dn_passin( Slapi_DN *sdn, const char *dn );
[183] Fix | Delete
Slapi_DN *slapi_sdn_set_ndn_byval( Slapi_DN *sdn, const char *ndn );
[184] Fix | Delete
Slapi_DN *slapi_sdn_set_ndn_byref( Slapi_DN *sdn, const char *ndn );
[185] Fix | Delete
void slapi_sdn_done( Slapi_DN *sdn );
[186] Fix | Delete
void slapi_sdn_free( Slapi_DN **sdn );
[187] Fix | Delete
const char * slapi_sdn_get_dn( const Slapi_DN *sdn );
[188] Fix | Delete
const char * slapi_sdn_get_ndn( const Slapi_DN *sdn );
[189] Fix | Delete
void slapi_sdn_get_parent( const Slapi_DN *sdn,Slapi_DN *sdn_parent );
[190] Fix | Delete
void slapi_sdn_get_backend_parent( const Slapi_DN *sdn, Slapi_DN *sdn_parent, const Slapi_Backend *backend );
[191] Fix | Delete
Slapi_DN * slapi_sdn_dup( const Slapi_DN *sdn );
[192] Fix | Delete
void slapi_sdn_copy( const Slapi_DN *from, Slapi_DN *to );
[193] Fix | Delete
int slapi_sdn_compare( const Slapi_DN *sdn1, const Slapi_DN *sdn2 );
[194] Fix | Delete
int slapi_sdn_isempty( const Slapi_DN *sdn );
[195] Fix | Delete
int slapi_sdn_issuffix(const Slapi_DN *sdn, const Slapi_DN *suffixsdn );
[196] Fix | Delete
int slapi_sdn_isparent( const Slapi_DN *parent, const Slapi_DN *child );
[197] Fix | Delete
int slapi_sdn_isgrandparent( const Slapi_DN *parent, const Slapi_DN *child );
[198] Fix | Delete
int slapi_sdn_get_ndn_len( const Slapi_DN *sdn );
[199] Fix | Delete
int slapi_sdn_scope_test( const Slapi_DN *dn, const Slapi_DN *base, int scope );
[200] Fix | Delete
void slapi_sdn_get_rdn( const Slapi_DN *sdn,Slapi_RDN *rdn );
[201] Fix | Delete
Slapi_DN *slapi_sdn_set_rdn( Slapi_DN *sdn, const Slapi_RDN *rdn );
[202] Fix | Delete
Slapi_DN *slapi_sdn_set_parent( Slapi_DN *sdn, const Slapi_DN *parentdn );
[203] Fix | Delete
int slapi_sdn_is_rdn_component( const Slapi_DN *rdn, const Slapi_Attr *a, const Slapi_Value *v );
[204] Fix | Delete
char * slapi_moddn_get_newdn( Slapi_DN *dn_olddn, char *newrdn, char *newsuperiordn );
[205] Fix | Delete
[206] Fix | Delete
/* RDNs */
[207] Fix | Delete
Slapi_RDN *slapi_rdn_new( void );
[208] Fix | Delete
Slapi_RDN *slapi_rdn_new_dn( const char *dn );
[209] Fix | Delete
Slapi_RDN *slapi_rdn_new_sdn( const Slapi_DN *sdn );
[210] Fix | Delete
Slapi_RDN *slapi_rdn_new_rdn( const Slapi_RDN *fromrdn );
[211] Fix | Delete
void slapi_rdn_init( Slapi_RDN *rdn );
[212] Fix | Delete
void slapi_rdn_init_dn( Slapi_RDN *rdn, const char *dn );
[213] Fix | Delete
void slapi_rdn_init_sdn( Slapi_RDN *rdn, const Slapi_DN *sdn );
[214] Fix | Delete
void slapi_rdn_init_rdn( Slapi_RDN *rdn, const Slapi_RDN *fromrdn );
[215] Fix | Delete
void slapi_rdn_set_dn( Slapi_RDN *rdn, const char *dn );
[216] Fix | Delete
void slapi_rdn_set_sdn( Slapi_RDN *rdn, const Slapi_DN *sdn );
[217] Fix | Delete
void slapi_rdn_set_rdn( Slapi_RDN *rdn, const Slapi_RDN *fromrdn );
[218] Fix | Delete
void slapi_rdn_free( Slapi_RDN **rdn );
[219] Fix | Delete
void slapi_rdn_done( Slapi_RDN *rdn );
[220] Fix | Delete
int slapi_rdn_get_first( Slapi_RDN *rdn, char **type, char **value );
[221] Fix | Delete
int slapi_rdn_get_next( Slapi_RDN *rdn, int index, char **type, char **value );
[222] Fix | Delete
int slapi_rdn_get_index( Slapi_RDN *rdn, const char *type, const char *value, size_t length );
[223] Fix | Delete
int slapi_rdn_get_index_attr( Slapi_RDN *rdn, const char *type, char **value );
[224] Fix | Delete
int slapi_rdn_contains( Slapi_RDN *rdn, const char *type, const char *value,size_t length );
[225] Fix | Delete
int slapi_rdn_contains_attr( Slapi_RDN *rdn, const char *type, char **value );
[226] Fix | Delete
int slapi_rdn_add( Slapi_RDN *rdn, const char *type, const char *value );
[227] Fix | Delete
int slapi_rdn_remove_index( Slapi_RDN *rdn, int atindex );
[228] Fix | Delete
int slapi_rdn_remove( Slapi_RDN *rdn, const char *type, const char *value, size_t length );
[229] Fix | Delete
int slapi_rdn_remove_attr( Slapi_RDN *rdn, const char *type );
[230] Fix | Delete
int slapi_rdn_isempty( const Slapi_RDN *rdn );
[231] Fix | Delete
int slapi_rdn_get_num_components( Slapi_RDN *rdn );
[232] Fix | Delete
int slapi_rdn_compare( Slapi_RDN *rdn1, Slapi_RDN *rdn2 );
[233] Fix | Delete
const char *slapi_rdn_get_rdn( const Slapi_RDN *rdn );
[234] Fix | Delete
const char *slapi_rdn_get_nrdn( const Slapi_RDN *rdn );
[235] Fix | Delete
Slapi_DN *slapi_sdn_add_rdn( Slapi_DN *sdn, const Slapi_RDN *rdn );
[236] Fix | Delete
[237] Fix | Delete
/* locks and synchronization */
[238] Fix | Delete
typedef struct slapi_mutex Slapi_Mutex;
[239] Fix | Delete
typedef struct slapi_condvar Slapi_CondVar;
[240] Fix | Delete
Slapi_Mutex *slapi_new_mutex( void );
[241] Fix | Delete
void slapi_destroy_mutex( Slapi_Mutex *mutex );
[242] Fix | Delete
void slapi_lock_mutex( Slapi_Mutex *mutex );
[243] Fix | Delete
int slapi_unlock_mutex( Slapi_Mutex *mutex );
[244] Fix | Delete
Slapi_CondVar *slapi_new_condvar( Slapi_Mutex *mutex );
[245] Fix | Delete
void slapi_destroy_condvar( Slapi_CondVar *cvar );
[246] Fix | Delete
int slapi_wait_condvar( Slapi_CondVar *cvar, struct timeval *timeout );
[247] Fix | Delete
int slapi_notify_condvar( Slapi_CondVar *cvar, int notify_all );
[248] Fix | Delete
[249] Fix | Delete
/* thread-safe LDAP connections */
[250] Fix | Delete
LDAP *slapi_ldap_init( char *ldaphost, int ldapport, int secure, int shared );
[251] Fix | Delete
void slapi_ldap_unbind( LDAP *ld );
[252] Fix | Delete
[253] Fix | Delete
char *slapi_ch_malloc( unsigned long size );
[254] Fix | Delete
void slapi_ch_free( void **ptr );
[255] Fix | Delete
void slapi_ch_free_string( char **ptr );
[256] Fix | Delete
char *slapi_ch_calloc( unsigned long nelem, unsigned long size );
[257] Fix | Delete
char *slapi_ch_realloc( char *block, unsigned long size );
[258] Fix | Delete
char *slapi_ch_strdup( const char *s );
[259] Fix | Delete
void slapi_ch_array_free( char **arrayp );
[260] Fix | Delete
struct berval *slapi_ch_bvdup(const struct berval *v);
[261] Fix | Delete
struct berval **slapi_ch_bvecdup(const struct berval **v);
[262] Fix | Delete
[263] Fix | Delete
/* LDAP V3 routines */
[264] Fix | Delete
int slapi_control_present( LDAPControl **controls, char *oid,
[265] Fix | Delete
struct berval **val, int *iscritical);
[266] Fix | Delete
void slapi_register_supported_control(char *controloid,
[267] Fix | Delete
unsigned long controlops);
[268] Fix | Delete
#define SLAPI_OPERATION_BIND 0x00000001L
[269] Fix | Delete
#define SLAPI_OPERATION_UNBIND 0x00000002L
[270] Fix | Delete
#define SLAPI_OPERATION_SEARCH 0x00000004L
[271] Fix | Delete
#define SLAPI_OPERATION_MODIFY 0x00000008L
[272] Fix | Delete
#define SLAPI_OPERATION_ADD 0x00000010L
[273] Fix | Delete
#define SLAPI_OPERATION_DELETE 0x00000020L
[274] Fix | Delete
#define SLAPI_OPERATION_MODDN 0x00000040L
[275] Fix | Delete
#define SLAPI_OPERATION_MODRDN SLAPI_OPERATION_MODDN
[276] Fix | Delete
#define SLAPI_OPERATION_COMPARE 0x00000080L
[277] Fix | Delete
#define SLAPI_OPERATION_ABANDON 0x00000100L
[278] Fix | Delete
#define SLAPI_OPERATION_EXTENDED 0x00000200L
[279] Fix | Delete
#define SLAPI_OPERATION_ANY 0xFFFFFFFFL
[280] Fix | Delete
#define SLAPI_OPERATION_NONE 0x00000000L
[281] Fix | Delete
int slapi_get_supported_controls(char ***ctrloidsp, unsigned long **ctrlopsp);
[282] Fix | Delete
LDAPControl *slapi_dup_control(LDAPControl *ctrl);
[283] Fix | Delete
void slapi_register_supported_saslmechanism(char *mechanism);
[284] Fix | Delete
char **slapi_get_supported_saslmechanisms();
[285] Fix | Delete
char **slapi_get_supported_extended_ops(void);
[286] Fix | Delete
[287] Fix | Delete
/* operation */
[288] Fix | Delete
int slapi_op_abandoned( Slapi_PBlock *pb );
[289] Fix | Delete
unsigned long slapi_op_get_type(Slapi_Operation * op);
[290] Fix | Delete
void slapi_operation_set_flag(Slapi_Operation *op, unsigned long flag);
[291] Fix | Delete
void slapi_operation_clear_flag(Slapi_Operation *op, unsigned long flag);
[292] Fix | Delete
int slapi_operation_is_flag_set(Slapi_Operation *op, unsigned long flag);
[293] Fix | Delete
char *slapi_op_type_to_string(unsigned long type);
[294] Fix | Delete
[295] Fix | Delete
/* send ldap result back */
[296] Fix | Delete
void slapi_send_ldap_result( Slapi_PBlock *pb, int err, char *matched,
[297] Fix | Delete
char *text, int nentries, struct berval **urls );
[298] Fix | Delete
int slapi_send_ldap_search_entry( Slapi_PBlock *pb, Slapi_Entry *e,
[299] Fix | Delete
LDAPControl **ectrls, char **attrs, int attrsonly );
[300] Fix | Delete
int slapi_send_ldap_search_reference( Slapi_PBlock *pb, Slapi_Entry *e,
[301] Fix | Delete
struct berval **urls, LDAPControl **ectrls, struct berval **v2refs );
[302] Fix | Delete
[303] Fix | Delete
/* filter routines */
[304] Fix | Delete
Slapi_Filter *slapi_str2filter( char *str );
[305] Fix | Delete
Slapi_Filter *slapi_filter_dup( Slapi_Filter *f );
[306] Fix | Delete
void slapi_filter_free( Slapi_Filter *f, int recurse );
[307] Fix | Delete
int slapi_filter_get_choice( Slapi_Filter *f);
[308] Fix | Delete
int slapi_filter_get_ava( Slapi_Filter *f, char **type, struct berval **bval );
[309] Fix | Delete
Slapi_Filter *slapi_filter_list_first( Slapi_Filter *f );
[310] Fix | Delete
Slapi_Filter *slapi_filter_list_next( Slapi_Filter *f, Slapi_Filter *fprev );
[311] Fix | Delete
int slapi_filter_get_attribute_type( Slapi_Filter *f, char **type );
[312] Fix | Delete
int slapi_x_filter_set_attribute_type( Slapi_Filter *f, const char *type );
[313] Fix | Delete
int slapi_filter_get_subfilt( Slapi_Filter *f, char **type, char **initial,
[314] Fix | Delete
char ***any, char **final );
[315] Fix | Delete
Slapi_Filter *slapi_filter_join( int ftype, Slapi_Filter *f1, Slapi_Filter *f2);
[316] Fix | Delete
int slapi_x_filter_append( int choice, Slapi_Filter **pContainingFilter,
[317] Fix | Delete
Slapi_Filter **pNextFilter, Slapi_Filter *filterToAppend );
[318] Fix | Delete
int slapi_filter_test( Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Filter *f,
[319] Fix | Delete
int verify_access );
[320] Fix | Delete
int slapi_filter_test_simple( Slapi_Entry *e, Slapi_Filter *f );
[321] Fix | Delete
typedef int (*FILTER_APPLY_FN)( Slapi_Filter *f, void *arg );
[322] Fix | Delete
int slapi_filter_apply( Slapi_Filter *f, FILTER_APPLY_FN fn, void *arg, int *error_code );
[323] Fix | Delete
#define SLAPI_FILTER_SCAN_STOP -1 /* set by callback */
[324] Fix | Delete
#define SLAPI_FILTER_SCAN_ERROR -2 /* set by callback */
[325] Fix | Delete
#define SLAPI_FILTER_SCAN_NOMORE 0 /* set by callback */
[326] Fix | Delete
#define SLAPI_FILTER_SCAN_CONTINUE 1 /* set by callback */
[327] Fix | Delete
#define SLAPI_FILTER_UNKNOWN_FILTER_TYPE 2 /* set by slapi_filter_apply() */
[328] Fix | Delete
[329] Fix | Delete
/* internal add/delete/search/modify routines */
[330] Fix | Delete
Slapi_PBlock *slapi_search_internal( char *base, int scope, char *filter,
[331] Fix | Delete
LDAPControl **controls, char **attrs, int attrsonly );
[332] Fix | Delete
Slapi_PBlock *slapi_modify_internal( char *dn, LDAPMod **mods,
[333] Fix | Delete
LDAPControl **controls, int log_change );
[334] Fix | Delete
Slapi_PBlock *slapi_add_internal( char * dn, LDAPMod **attrs,
[335] Fix | Delete
LDAPControl **controls, int log_changes );
[336] Fix | Delete
Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry * e,
[337] Fix | Delete
LDAPControl **controls, int log_change );
[338] Fix | Delete
Slapi_PBlock *slapi_delete_internal( char * dn, LDAPControl **controls,
[339] Fix | Delete
int log_change );
[340] Fix | Delete
Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn,
[341] Fix | Delete
int deloldrdn, LDAPControl **controls,
[342] Fix | Delete
int log_change );
[343] Fix | Delete
Slapi_PBlock *slapi_rename_internal( const char * olddn, const char *newrdn,
[344] Fix | Delete
const char *newsuperior, int delolrdn,
[345] Fix | Delete
LDAPControl **controls, int log_change );
[346] Fix | Delete
void slapi_free_search_results_internal(Slapi_PBlock *pb);
[347] Fix | Delete
[348] Fix | Delete
/* new internal add/delete/search/modify routines */
[349] Fix | Delete
typedef void (*plugin_result_callback)( int rc, void *callback_data );
[350] Fix | Delete
typedef int (*plugin_referral_entry_callback)( char * referral,
[351] Fix | Delete
void *callback_data );
[352] Fix | Delete
typedef int (*plugin_search_entry_callback)( Slapi_Entry *e,
[353] Fix | Delete
void *callback_data );
[354] Fix | Delete
void slapi_free_search_results_internal( Slapi_PBlock *pb );
[355] Fix | Delete
[356] Fix | Delete
#define SLAPI_OP_FLAG_NEVER_CHAIN 0x0800
[357] Fix | Delete
[358] Fix | Delete
int slapi_search_internal_pb( Slapi_PBlock *pb );
[359] Fix | Delete
int slapi_search_internal_callback_pb( Slapi_PBlock *pb, void *callback_data,
[360] Fix | Delete
plugin_result_callback prc, plugin_search_entry_callback psec,
[361] Fix | Delete
plugin_referral_entry_callback prec );
[362] Fix | Delete
int slapi_add_internal_pb( Slapi_PBlock *pb );
[363] Fix | Delete
int slapi_modify_internal_pb( Slapi_PBlock *pb );
[364] Fix | Delete
int slapi_modrdn_internal_pb( Slapi_PBlock *pb );
[365] Fix | Delete
int slapi_delete_internal_pb( Slapi_PBlock *pb );
[366] Fix | Delete
[367] Fix | Delete
int slapi_seq_internal_callback_pb(Slapi_PBlock *pb, void *callback_data,
[368] Fix | Delete
plugin_result_callback res_callback,
[369] Fix | Delete
plugin_search_entry_callback srch_callback,
[370] Fix | Delete
plugin_referral_entry_callback ref_callback);
[371] Fix | Delete
[372] Fix | Delete
void slapi_search_internal_set_pb( Slapi_PBlock *pb, const char *base,
[373] Fix | Delete
int scope, const char *filter, char **attrs, int attrsonly,
[374] Fix | Delete
LDAPControl **controls, const char *uniqueid,
[375] Fix | Delete
Slapi_ComponentId *plugin_identity, int operation_flags );
[376] Fix | Delete
void slapi_add_entry_internal_set_pb( Slapi_PBlock *pb, Slapi_Entry *e,
[377] Fix | Delete
LDAPControl **controls, Slapi_ComponentId *plugin_identity,
[378] Fix | Delete
int operation_flags );
[379] Fix | Delete
int slapi_add_internal_set_pb( Slapi_PBlock *pb, const char *dn,
[380] Fix | Delete
LDAPMod **attrs, LDAPControl **controls,
[381] Fix | Delete
Slapi_ComponentId *plugin_identity, int operation_flags );
[382] Fix | Delete
void slapi_modify_internal_set_pb( Slapi_PBlock *pb, const char *dn,
[383] Fix | Delete
LDAPMod **mods, LDAPControl **controls, const char *uniqueid,
[384] Fix | Delete
Slapi_ComponentId *plugin_identity, int operation_flags );
[385] Fix | Delete
void slapi_rename_internal_set_pb( Slapi_PBlock *pb, const char *olddn,
[386] Fix | Delete
const char *newrdn, const char *newsuperior, int deloldrdn,
[387] Fix | Delete
LDAPControl **controls, const char *uniqueid,
[388] Fix | Delete
Slapi_ComponentId *plugin_identity, int operation_flags );
[389] Fix | Delete
void slapi_delete_internal_set_pb( Slapi_PBlock *pb, const char *dn,
[390] Fix | Delete
LDAPControl **controls, const char *uniqueid,
[391] Fix | Delete
Slapi_ComponentId *plugin_identity, int operation_flags );
[392] Fix | Delete
void slapi_seq_internal_set_pb( Slapi_PBlock *pb, char *ibase, int type,
[393] Fix | Delete
char *attrname, char *val, char **attrs, int attrsonly,
[394] Fix | Delete
LDAPControl **controls, Slapi_ComponentId *plugin_identity,
[395] Fix | Delete
int operation_flags );
[396] Fix | Delete
[397] Fix | Delete
/* connection related routines */
[398] Fix | Delete
int slapi_is_connection_ssl(Slapi_PBlock *pPB, int *isSSL);
[399] Fix | Delete
int slapi_get_client_port(Slapi_PBlock *pPB, int *fromPort);
[400] Fix | Delete
int slapi_get_client_ip(Slapi_PBlock *pb, char **clientIP);
[401] Fix | Delete
void slapi_free_client_ip(char **clientIP);
[402] Fix | Delete
[403] Fix | Delete
/* computed attributes */
[404] Fix | Delete
typedef struct _computed_attr_context computed_attr_context;
[405] Fix | Delete
typedef int (*slapi_compute_output_t)(computed_attr_context *c, Slapi_Attr *a, Slapi_Entry *e);
[406] Fix | Delete
typedef int (*slapi_compute_callback_t)(computed_attr_context *c, char *type, Slapi_Entry *e, slapi_compute_output_t outputfn);
[407] Fix | Delete
typedef int (*slapi_search_rewrite_callback_t)(Slapi_PBlock *pb);
[408] Fix | Delete
int slapi_compute_add_evaluator(slapi_compute_callback_t function);
[409] Fix | Delete
int slapi_compute_add_search_rewriter(slapi_search_rewrite_callback_t function);
[410] Fix | Delete
int compute_rewrite_search_filter(Slapi_PBlock *pb);
[411] Fix | Delete
int compute_evaluator(computed_attr_context *c, char *type, Slapi_Entry *e, slapi_compute_output_t outputfn);
[412] Fix | Delete
int slapi_x_compute_get_pblock(computed_attr_context *c, Slapi_PBlock **pb);
[413] Fix | Delete
[414] Fix | Delete
/* backend routines */
[415] Fix | Delete
void slapi_be_set_readonly( Slapi_Backend *be, int readonly );
[416] Fix | Delete
int slapi_be_get_readonly( Slapi_Backend *be );
[417] Fix | Delete
const char *slapi_x_be_get_updatedn( Slapi_Backend *be );
[418] Fix | Delete
Slapi_Backend *slapi_be_select( const Slapi_DN *sdn );
[419] Fix | Delete
[420] Fix | Delete
/* ACL plugins; only SLAPI_PLUGIN_ACL_ALLOW_ACCESS supported now */
[421] Fix | Delete
typedef int (*slapi_acl_callback_t)(Slapi_PBlock *pb,
[422] Fix | Delete
Slapi_Entry *e,
[423] Fix | Delete
const char *attr,
[424] Fix | Delete
struct berval *berval,
[425] Fix | Delete
int access,
[426] Fix | Delete
void *state);
[427] Fix | Delete
[428] Fix | Delete
/* object extensions */
[429] Fix | Delete
typedef void *(*slapi_extension_constructor_fnptr)(void *object, void *parent);
[430] Fix | Delete
[431] Fix | Delete
typedef void (*slapi_extension_destructor_fnptr)(void *extension,
[432] Fix | Delete
void *object, void *parent);
[433] Fix | Delete
[434] Fix | Delete
int slapi_register_object_extension( const char *pluginname,
[435] Fix | Delete
const char *objectname, slapi_extension_constructor_fnptr constructor,
[436] Fix | Delete
slapi_extension_destructor_fnptr destructor, int *objecttype,
[437] Fix | Delete
int *extensionhandle);
[438] Fix | Delete
[439] Fix | Delete
#define SLAPI_EXT_CONNECTION "Connection"
[440] Fix | Delete
#define SLAPI_EXT_OPERATION "Operation"
[441] Fix | Delete
#define SLAPI_EXT_ENTRY "Entry"
[442] Fix | Delete
#define SLAPI_EXT_MTNODE "Mapping Tree Node"
[443] Fix | Delete
[444] Fix | Delete
void *slapi_get_object_extension(int objecttype, void *object,
[445] Fix | Delete
int extensionhandle);
[446] Fix | Delete
void slapi_set_object_extension(int objecttype, void *object,
[447] Fix | Delete
int extensionhandle, void *extension);
[448] Fix | Delete
[449] Fix | Delete
int slapi_x_backend_get_flags( const Slapi_Backend *be, unsigned long *flags );
[450] Fix | Delete
[451] Fix | Delete
/* parameters currently supported */
[452] Fix | Delete
[453] Fix | Delete
/*
[454] Fix | Delete
* Attribute flags returned by slapi_attr_get_flags()
[455] Fix | Delete
*/
[456] Fix | Delete
#define SLAPI_ATTR_FLAG_SINGLE 0x0001
[457] Fix | Delete
#define SLAPI_ATTR_FLAG_OPATTR 0x0002
[458] Fix | Delete
#define SLAPI_ATTR_FLAG_READONLY 0x0004
[459] Fix | Delete
#define SLAPI_ATTR_FLAG_STD_ATTR SLAPI_ATTR_FLAG_READONLY
[460] Fix | Delete
#define SLAPI_ATTR_FLAG_OBSOLETE 0x0040
[461] Fix | Delete
#define SLAPI_ATTR_FLAG_COLLECTIVE 0x0080
[462] Fix | Delete
#define SLAPI_ATTR_FLAG_NOUSERMOD 0x0100
[463] Fix | Delete
[464] Fix | Delete
/*
[465] Fix | Delete
* Backend flags returned by slapi_x_backend_get_flags()
[466] Fix | Delete
*/
[467] Fix | Delete
#define SLAPI_BACKEND_FLAG_NOLASTMOD 0x0001U
[468] Fix | Delete
#define SLAPI_BACKEND_FLAG_NO_SCHEMA_CHECK 0x0002U
[469] Fix | Delete
#define SLAPI_BACKEND_FLAG_GLUE_INSTANCE 0x0010U /* a glue backend */
[470] Fix | Delete
#define SLAPI_BACKEND_FLAG_GLUE_SUBORDINATE 0x0020U /* child of a glue hierarchy */
[471] Fix | Delete
#define SLAPI_BACKEND_FLAG_GLUE_LINKED 0x0040U /* child is connected to parent */
[472] Fix | Delete
#define SLAPI_BACKEND_FLAG_OVERLAY 0x0080U /* this db struct is an overlay */
[473] Fix | Delete
#define SLAPI_BACKEND_FLAG_GLOBAL_OVERLAY 0x0100U /* this db struct is a global overlay */
[474] Fix | Delete
#define SLAPI_BACKEND_FLAG_SHADOW 0x8000U /* a shadow */
[475] Fix | Delete
#define SLAPI_BACKEND_FLAG_SYNC_SHADOW 0x1000U /* a sync shadow */
[476] Fix | Delete
#define SLAPI_BACKEND_FLAG_SLURP_SHADOW 0x2000U /* a slurp shadow */
[477] Fix | Delete
[478] Fix | Delete
/*
[479] Fix | Delete
* ACL levels
[480] Fix | Delete
*/
[481] Fix | Delete
#define SLAPI_ACL_COMPARE 0x01
[482] Fix | Delete
#define SLAPI_ACL_SEARCH 0x02
[483] Fix | Delete
#define SLAPI_ACL_READ 0x04
[484] Fix | Delete
#define SLAPI_ACL_WRITE 0x08
[485] Fix | Delete
#define SLAPI_ACL_DELETE 0x10
[486] Fix | Delete
#define SLAPI_ACL_ADD 0x20
[487] Fix | Delete
#define SLAPI_ACL_SELF 0x40
[488] Fix | Delete
#define SLAPI_ACL_PROXY 0x80
[489] Fix | Delete
#define SLAPI_ACL_ALL 0x7f
[490] Fix | Delete
[491] Fix | Delete
/* plugin types supported */
[492] Fix | Delete
[493] Fix | Delete
#define SLAPI_PLUGIN_DATABASE 1
[494] Fix | Delete
#define SLAPI_PLUGIN_EXTENDEDOP 2
[495] Fix | Delete
#define SLAPI_PLUGIN_PREOPERATION 3
[496] Fix | Delete
#define SLAPI_PLUGIN_POSTOPERATION 4
[497] Fix | Delete
#define SLAPI_PLUGIN_MATCHINGRULE 5
[498] Fix | Delete
#define SLAPI_PLUGIN_SYNTAX 6
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function