mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Implement more of SLAPI 5.x - all SLAPI internal operations now take pblocks
as the canonical argument (wrappers for old APIs are provided)
This commit is contained in:
parent
07ffdd8893
commit
9e9c4b5397
@ -309,6 +309,46 @@ 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 Connection *slapi_int_init_connection(char *DN, int OpType);
|
||||
|
@ -57,21 +57,6 @@ LDAP_BEGIN_DECL
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#if 0 /* unused (yet?) */
|
||||
#define dn_normalize_case dn_normalize
|
||||
#define SLAPD_NO_MEMORY 7
|
||||
#define ANYBODY_STRING "CN=ANYBODY"
|
||||
|
||||
extern int slap_debug;
|
||||
|
||||
extern int dn_check(char *, int *);
|
||||
|
||||
typedef struct strlist {
|
||||
char *string;
|
||||
struct strlist *next;
|
||||
} StrList;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Was: slapi_utils.h
|
||||
*/
|
||||
@ -83,11 +68,6 @@ typedef struct _Audit_record Audit_record;
|
||||
|
||||
typedef int (*SLAPI_FUNC)( Slapi_PBlock *pb );
|
||||
|
||||
#if 0 /* unused (yet?) */
|
||||
#define DOMAIN "Domain"
|
||||
#define TCPIPPATH "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters"
|
||||
#endif
|
||||
|
||||
typedef struct _slapi_control {
|
||||
int s_ctrl_num;
|
||||
char **s_ctrl_oids;
|
||||
@ -286,7 +266,9 @@ extern Backend * slapi_cl_get_be(char *dn);
|
||||
#define SLAPI_X_CONN_SSF 1303
|
||||
#define SLAPI_X_CONN_SASL_CONTEXT 1304
|
||||
|
||||
#define SLAPI_X_CONFIG_ARGV 1400
|
||||
/* really private stuff */
|
||||
#define SLAPI_X_CONFIG_ARGV 1400
|
||||
#define SLAPI_X_INTOP_FLAGS 1401
|
||||
|
||||
#define SLAPD_AUTH_NONE "none"
|
||||
#define SLAPD_AUTH_SIMPLE "simple"
|
||||
@ -451,6 +433,8 @@ extern Backend * slapi_cl_get_be(char *dn);
|
||||
#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
|
||||
|
||||
@ -464,6 +448,10 @@ extern Backend * slapi_cl_get_be(char *dn);
|
||||
|
||||
#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
|
||||
@ -476,14 +464,21 @@ extern Backend * slapi_cl_get_be(char *dn);
|
||||
#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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -164,6 +164,7 @@ getPBlockClass( int param )
|
||||
case SLAPI_X_CONN_SERVERPATH:
|
||||
case SLAPI_X_CONN_SASL_CONTEXT:
|
||||
case SLAPI_X_CONFIG_ARGV:
|
||||
case SLAPI_X_INTOP_FLAGS:
|
||||
case SLAPI_IBM_CONN_DN_ALT:
|
||||
case SLAPI_IBM_CONN_DN_ORIG:
|
||||
case SLAPI_IBM_GSSAPI_CONTEXT:
|
||||
@ -177,6 +178,7 @@ getPBlockClass( int param )
|
||||
case SLAPI_PLUGIN_ARGV:
|
||||
case SLAPI_PLUGIN_OBJECT:
|
||||
case SLAPI_PLUGIN_DESCRIPTION:
|
||||
case SLAPI_PLUGIN_IDENTITY:
|
||||
case SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES:
|
||||
case SLAPI_PLUGIN_INTOP_SEARCH_REFERRALS:
|
||||
case SLAPI_PLUGIN_MR_FILTER_REUSABLE:
|
||||
@ -196,6 +198,8 @@ getPBlockClass( int param )
|
||||
case SLAPI_PLUGIN_SYNTAX_COMPARE:
|
||||
case SLAPI_CONFIG_FILENAME:
|
||||
case SLAPI_CONFIG_ARGV:
|
||||
case SLAPI_TARGET_ADDRESS:
|
||||
case SLAPI_TARGET_UNIQUEID:
|
||||
case SLAPI_TARGET_DN:
|
||||
case SLAPI_REQCONTROLS:
|
||||
case SLAPI_ENTRY_PRE_OP:
|
||||
@ -203,6 +207,10 @@ getPBlockClass( int param )
|
||||
case SLAPI_RESCONTROLS:
|
||||
case SLAPI_ADD_RESCONTROL:
|
||||
case SLAPI_ADD_ENTRY:
|
||||
case SLAPI_ADD_EXISTING_DN_ENTRY:
|
||||
case SLAPI_ADD_PARENT_ENTRY:
|
||||
case SLAPI_ADD_PARENT_UNIQUEID:
|
||||
case SLAPI_ADD_EXISTING_UNIQUEID_ENTRY:
|
||||
case SLAPI_BIND_CREDENTIALS:
|
||||
case SLAPI_BIND_SASLMECHANISM:
|
||||
case SLAPI_BIND_RET_SASLCREDS:
|
||||
@ -211,6 +219,10 @@ getPBlockClass( int param )
|
||||
case SLAPI_MODIFY_MODS:
|
||||
case SLAPI_MODRDN_NEWRDN:
|
||||
case SLAPI_MODRDN_NEWSUPERIOR:
|
||||
case SLAPI_MODRDN_PARENT_ENTRY:
|
||||
case SLAPI_MODRDN_NEWPARENT_ENTRY:
|
||||
case SLAPI_MODRDN_TARGET_ENTRY:
|
||||
case SLAPI_MODRDN_NEWSUPERIOR_ADDRESS:
|
||||
case SLAPI_SEARCH_FILTER:
|
||||
case SLAPI_SEARCH_STRFILTER:
|
||||
case SLAPI_SEARCH_ATTRS:
|
||||
|
@ -3738,7 +3738,7 @@ int slapi_compute_add_evaluator(slapi_compute_callback_t function)
|
||||
goto done;
|
||||
}
|
||||
|
||||
rc = slapi_int_register_plugin( NULL, pPlugin );
|
||||
rc = slapi_int_register_plugin( frontendDB, pPlugin );
|
||||
if ( rc != 0 ) {
|
||||
rc = LDAP_OTHER;
|
||||
goto done;
|
||||
@ -3783,7 +3783,7 @@ int slapi_compute_add_search_rewriter(slapi_search_rewrite_callback_t function)
|
||||
goto done;
|
||||
}
|
||||
|
||||
rc = slapi_int_register_plugin( NULL, pPlugin );
|
||||
rc = slapi_int_register_plugin( frontendDB, pPlugin );
|
||||
if ( rc != 0 ) {
|
||||
rc = LDAP_OTHER;
|
||||
goto done;
|
||||
@ -3812,7 +3812,7 @@ int compute_evaluator(computed_attr_context *c, char *type, Slapi_Entry *e, slap
|
||||
int rc = 0;
|
||||
slapi_compute_callback_t *pGetPlugin, *tmpPlugin;
|
||||
|
||||
rc = slapi_int_get_plugins( NULL, SLAPI_PLUGIN_COMPUTE_EVALUATOR_FN, (SLAPI_FUNC **)&tmpPlugin );
|
||||
rc = slapi_int_get_plugins( frontendDB, SLAPI_PLUGIN_COMPUTE_EVALUATOR_FN, (SLAPI_FUNC **)&tmpPlugin );
|
||||
if ( rc != LDAP_SUCCESS || tmpPlugin == NULL ) {
|
||||
/* Nothing to do; front-end should ignore. */
|
||||
return 0;
|
||||
@ -3999,6 +3999,8 @@ int slapi_int_access_allowed( Operation *op,
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
switch ( access ) {
|
||||
case ACL_WRITE:
|
||||
/* FIXME: handle ACL_WADD/ACL_WDEL */
|
||||
|
Loading…
Reference in New Issue
Block a user