mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-26 08:42:53 -05:00
misc slapi cleanup
This commit is contained in:
parent
b027461b9d
commit
f83585952d
9 changed files with 89 additions and 72 deletions
|
|
@ -39,9 +39,10 @@ LDAP_INCDIR= ../../include -Islapi
|
|||
LDAP_LIBDIR= ../../libraries
|
||||
|
||||
SLAP_DIR=
|
||||
SLAPD_STATIC_DEPENDS=@SLAPD_SLAPI_DEPEND@ @SLAPD_NO_STATIC@ libbackends.a
|
||||
SLAPD_STATIC_DEPENDS=@SLAPD_NO_STATIC@ libbackends.a
|
||||
SLAPD_STATIC_BACKENDS=@SLAPD_STATIC_BACKENDS@
|
||||
SLAPD_DYNAMIC_BACKENDS=@SLAPD_DYNAMIC_BACKENDS@
|
||||
SLAPD_SLAPI_DEPEND=@SLAPD_SLAPI_DEPEND@
|
||||
|
||||
XDEFS = $(MODULES_CPPFLAGS)
|
||||
XLDFLAGS = $(MODULES_LDFLAGS)
|
||||
|
|
@ -224,13 +225,13 @@ slapd.exp: libslapd.a
|
|||
dlltool --dllname slapd.exe --input-def slapd.def \
|
||||
--base-file slapd.base --output-exp $@
|
||||
|
||||
.slapi: FORCE
|
||||
$(AR) ruv slapi/libtmpslapd.a $(OBJS)
|
||||
(cd slapi; $(MAKE) $(MFLAGS) all)
|
||||
|
||||
libslapi.a: .slapi
|
||||
cp slapi/.libs/libslapi.a .
|
||||
|
||||
.slapi: slapd
|
||||
$(AR) ruv slapi/libtmpslapd.a $(OBJS)
|
||||
(cd slapi; $(MAKE) $(MFLAGS) all)
|
||||
|
||||
slapd: $(SLAPD_DEPENDS)
|
||||
$(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) \
|
||||
$(WRAP_LIBS)
|
||||
|
|
@ -238,7 +239,7 @@ slapd: $(SLAPD_DEPENDS)
|
|||
sslapd: version.o
|
||||
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
|
||||
|
||||
tools $(SLAPD_DYNAMIC_BACKENDS): slapd
|
||||
tools $(SLAPD_DYNAMIC_BACKENDS) $(SLAPD_SLAPI_DEPEND): slapd
|
||||
cd $@; $(MAKE) $(MFLAGS) all
|
||||
@touch $@
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include "slap.h"
|
||||
#include "slapi-plugin.h"
|
||||
#include "slapi_pblock.h"
|
||||
#include "back-monitor.h"
|
||||
|
||||
#if defined(LDAP_SLAPI)
|
||||
|
|
|
|||
|
|
@ -65,4 +65,4 @@
|
|||
#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
|
||||
#endif /* _ibm_pblock_params_H */
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
/* Single threads access to routine */
|
||||
ldap_pvt_thread_mutex_t slapi_printmessage_mutex;
|
||||
const char *slapi_log_file = NULL;
|
||||
char *slapi_log_file = NULL;
|
||||
int slapi_log_level = SLAPI_LOG_PLUGIN;
|
||||
|
||||
int
|
||||
|
|
|
|||
|
|
@ -26,7 +26,9 @@ typedef Filter Slapi_Filter;
|
|||
#endif /* NO_PBLOCK_CLASS */
|
||||
#include <plugin.h>
|
||||
#include <slapi_ops.h>
|
||||
#if 0 /* unused (yet?) */
|
||||
#include <slapi_cl.h>
|
||||
#endif /* 0 */
|
||||
|
||||
/*
|
||||
* types of plugins
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
extern int slap_debug;
|
||||
|
||||
int
|
||||
dn_check(char *, int *);
|
||||
|
||||
dn_check(char *, int *);
|
||||
|
||||
typedef struct strlist {
|
||||
char *string;
|
||||
|
|
|
|||
|
|
@ -20,27 +20,28 @@
|
|||
|
||||
int bvptr2obj( struct berval **bvptr, struct berval **bvobj );
|
||||
|
||||
int
|
||||
static void
|
||||
internal_result_v3(
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
int err,
|
||||
char *matched,
|
||||
char *text,
|
||||
char **referrals )
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BerVarray referrals,
|
||||
LDAPControl **ctrls )
|
||||
{
|
||||
return LDAP_SUCCESS;
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
internal_search_entry(
|
||||
Backend *be,
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
Entry *e,
|
||||
char **attrs,
|
||||
int attrsonly,
|
||||
char **denied_attrs )
|
||||
Backend *be,
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
Entry *e,
|
||||
AttributeName *attrs,
|
||||
int attrsonly,
|
||||
LDAPControl **ctrls )
|
||||
{
|
||||
char *ent2str = NULL;
|
||||
int nentries = 0, len = 0, i = 0;
|
||||
|
|
@ -90,37 +91,47 @@ internal_search_entry(
|
|||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
int
|
||||
static void
|
||||
internal_search_result(
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
int err,
|
||||
char *matched,
|
||||
char *text,
|
||||
int nentries )
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BerVarray refs,
|
||||
LDAPControl **ctrls,
|
||||
int nentries )
|
||||
{
|
||||
slapi_pblock_set( (Slapi_PBlock *)op->o_pb,
|
||||
SLAPI_NENTRIES, (void *)nentries );
|
||||
|
||||
return LDAP_SUCCESS;
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
static void
|
||||
internal_result_ext(
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
int errnum,
|
||||
char *respname,
|
||||
struct berval *response )
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
ber_int_t errnum,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BerVarray refs,
|
||||
const char *rspoid,
|
||||
struct berval *rspdata,
|
||||
LDAPControl **ctrls )
|
||||
{
|
||||
return LDAP_SUCCESS;
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
internal_search_reference(
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
char **ref )
|
||||
Backend *be,
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
Entry *e,
|
||||
BerVarray refs,
|
||||
LDAPControl **ctrls,
|
||||
BerVarray *v2refs )
|
||||
{
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
|
@ -220,16 +231,11 @@ fakeConnection(
|
|||
|
||||
backend_connection_init( c );
|
||||
|
||||
pConn->c_send_ldap_result =
|
||||
(SEND_LDAP_RESULT) internal_result_v3;
|
||||
pConn->c_send_search_entry =
|
||||
(SEND_SEARCH_ENTRY) internal_search_entry;
|
||||
pConn->c_send_search_result =
|
||||
(SEND_SEARCH_RESULT) internal_search_result;
|
||||
pConn->c_send_ldap_extended =
|
||||
(SEND_LDAP_EXTENDED) internal_result_ext;
|
||||
pConn->c_send_search_reference =
|
||||
(SEND_SEARCH_REFERENCE) internal_search_reference;
|
||||
pConn->c_send_ldap_result = internal_result_v3;
|
||||
pConn->c_send_search_entry = internal_search_entry;
|
||||
pConn->c_send_search_result = internal_search_result;
|
||||
pConn->c_send_ldap_extended = internal_result_ext;
|
||||
pConn->c_send_search_reference = internal_search_reference;
|
||||
|
||||
return pConn;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,18 +14,26 @@
|
|||
#define SLAPI_OPS_H
|
||||
|
||||
Slapi_PBlock *slapi_search_internal( char *base, int scope, char *filter,
|
||||
LDAPControl **controls, char **attrs, int attrsonly );
|
||||
Slapi_PBlock *slapi_search_internal_bind( char *bindDN, char *base, int scope, char *filter,
|
||||
LDAPControl **controls, char **attrs, int attrsonly ); /* d58508 */
|
||||
LDAPControl **controls, char **attrs, int attrsonly );
|
||||
Slapi_PBlock *slapi_search_internal_bind( char *bindDN, char *base,
|
||||
int scope, char *filter, LDAPControl **controls,
|
||||
char **attrs, int attrsonly ); /* d58508 */
|
||||
Slapi_PBlock *slapi_modify_internal( char *dn, LDAPMod **mods,
|
||||
LDAPControl **controls, int log_change );
|
||||
Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry * e, LDAPControl **controls, int log_change );
|
||||
Slapi_PBlock *slapi_add_internal( char * dn, LDAPMod **attrs, LDAPControl **controls, int log_changes );
|
||||
Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry * e, LDAPControl **controls, int log_change );
|
||||
Slapi_PBlock *slapi_delete_internal( char * dn, LDAPControl **controls, int log_change );
|
||||
Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn, int deloldrdn, LDAPControl **controls, int log_change);
|
||||
Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry * e,
|
||||
LDAPControl **controls, int log_change );
|
||||
Slapi_PBlock *slapi_add_internal( char * dn, LDAPMod **attrs,
|
||||
LDAPControl **controls, int log_changes );
|
||||
Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry * e,
|
||||
LDAPControl **controls, int log_change );
|
||||
Slapi_PBlock *slapi_delete_internal( char * dn, LDAPControl **controls,
|
||||
int log_change );
|
||||
Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn,
|
||||
int deloldrdn, LDAPControl **controls, int log_change);
|
||||
/*
|
||||
Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn, char *newParent, int deloldrdn, LDAPControl **controls, int log_change);
|
||||
Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn,
|
||||
char *newParent, int deloldrdn, LDAPControl **controls,
|
||||
int log_change);
|
||||
*/
|
||||
char **slapi_get_supported_extended_ops(void);
|
||||
int duplicateBVMod( LDAPMod *pMod, LDAPMod **ppNewMod );
|
||||
|
|
|
|||
|
|
@ -28,16 +28,16 @@ typedef int (*SLAPI_FUNC)(Slapi_PBlock *pb);
|
|||
#define TCPIPPATH "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters"
|
||||
|
||||
typedef struct _slapi_control {
|
||||
int s_ctrl_num;
|
||||
char **s_ctrl_oids;
|
||||
unsigned long *s_ctrl_ops;
|
||||
int s_ctrl_num;
|
||||
char **s_ctrl_oids;
|
||||
unsigned long *s_ctrl_ops;
|
||||
} Slapi_Control;
|
||||
|
||||
typedef struct _ExtendedOp {
|
||||
struct berval ext_oid;
|
||||
SLAPI_FUNC ext_func;
|
||||
Backend *ext_be;
|
||||
struct _ExtendedOp *ext_next;
|
||||
struct berval ext_oid;
|
||||
SLAPI_FUNC ext_func;
|
||||
Backend *ext_be;
|
||||
struct _ExtendedOp *ext_next;
|
||||
} ExtendedOp;
|
||||
|
||||
int slapi_log_error( int severity, char *subsystem, char *fmt, ... );
|
||||
|
|
@ -111,7 +111,7 @@ int slapi_audit_send_record( Slapi_PBlock *pb, Connection *conn,
|
|||
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 const char *slapi_log_file;
|
||||
extern char *slapi_log_file;
|
||||
extern int slapi_log_level;
|
||||
|
||||
#endif /* _SLAPI_UTILS_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue