mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-17 14:00:30 +08:00
Misc cleanup
This commit is contained in:
parent
8538184861
commit
c7f1759e80
@ -96,15 +96,15 @@ int use_reverse_lookup = 0;
|
||||
int slapi_plugins_used = 0;
|
||||
#endif
|
||||
|
||||
static char *fp_getline(FILE *fp, int *lineno);
|
||||
static void fp_getline_init(int *lineno);
|
||||
static int fp_parse_line(int lineno, char *line);
|
||||
static char *fp_getline(FILE *fp, int *lineno);
|
||||
static void fp_getline_init(int *lineno);
|
||||
static int fp_parse_line(int lineno, char *line);
|
||||
|
||||
static char *strtok_quote(char *line, char *sep);
|
||||
static int load_ucdata(char *path);
|
||||
static int load_ucdata(char *path);
|
||||
|
||||
static int add_syncrepl LDAP_P(( Backend *, char **, int ));
|
||||
static int parse_syncrepl_line LDAP_P(( char **, int, syncinfo_t *));
|
||||
static int add_syncrepl LDAP_P(( Backend *, char **, int ));
|
||||
static int parse_syncrepl_line LDAP_P(( char **, int, syncinfo_t *));
|
||||
|
||||
int
|
||||
read_config( const char *fname, int depth )
|
||||
@ -2834,10 +2834,10 @@ add_syncrepl(
|
||||
if ( si->si_rid == si_entry->si_rid ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( CONFIG, ERR,
|
||||
"add_syncrepl: duplicaetd replica id\n", 0, 0,0 );
|
||||
"add_syncrepl: duplicated replica id\n", 0, 0,0 );
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"add_syncrepl: duplicated replica id\n",0, 0, 0 );
|
||||
"add_syncrepl: duplicated replica id\n",0, 0, 0 );
|
||||
#endif
|
||||
duplicated_replica_id = 1;
|
||||
break;
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "slapi/slapi.h"
|
||||
#endif
|
||||
|
||||
#define UNSUPPORTED_EXTENDEDOP "unsupported extended operation"
|
||||
#define UNSUPPORTED_EXOP "unsupported extended operation"
|
||||
|
||||
#ifdef LDAP_DEVEL
|
||||
#define SLAP_EXOP_HIDE 0x0000
|
||||
@ -60,8 +60,8 @@ static struct extop_list {
|
||||
|
||||
static SLAP_EXTOP_MAIN_FN whoami_extop;
|
||||
|
||||
/* this list of built-in extops is for extops that are not part
|
||||
* of backends or in external modules. essentially, this is
|
||||
/* This list of built-in extops is for extops that are not part
|
||||
* of backends or in external modules. Essentially, this is
|
||||
* just a way to get built-in extops onto the extop list without
|
||||
* having a separate init routine for each built-in extop.
|
||||
*/
|
||||
@ -269,7 +269,7 @@ do_extended(
|
||||
|
||||
} else if ( extop_rc == SLAPI_PLUGIN_EXTENDED_NOT_HANDLED ) {
|
||||
rs->sr_err = LDAP_PROTOCOL_ERROR;
|
||||
rs->sr_text = UNSUPPORTED_EXTENDEDOP;
|
||||
rs->sr_text = UNSUPPORTED_EXOP;
|
||||
|
||||
} else {
|
||||
rs->sr_err = slapi_pblock_get( pb, SLAPI_EXT_OP_RET_OID,
|
||||
|
@ -527,8 +527,8 @@ LDAP_SLAPD_F (int) extops_kill LDAP_P(( void ));
|
||||
LDAP_SLAPD_F (struct berval *) get_supported_extop LDAP_P((int index));
|
||||
|
||||
/*
|
||||
* * cancel.c
|
||||
* */
|
||||
* cancel.c
|
||||
*/
|
||||
LDAP_SLAPD_F ( SLAP_EXTOP_MAIN_FN ) cancel_extop;
|
||||
|
||||
/*
|
||||
|
@ -637,7 +637,10 @@ sasl_cb_checkpass( Operation *op, SlapReply *rs )
|
||||
a = attr_find( rs->sr_entry->e_attrs, slap_schema.si_ad_userPassword );
|
||||
if ( !a ) return 0;
|
||||
if ( ! access_allowed( op, rs->sr_entry, slap_schema.si_ad_userPassword,
|
||||
NULL, ACL_AUTH, NULL ) ) return 0;
|
||||
NULL, ACL_AUTH, NULL ) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
for ( bv = a->a_vals; bv->bv_val != NULL; bv++ ) {
|
||||
if ( !lutil_passwd( bv, &ci->cred, NULL, &rs->sr_text ) ) {
|
||||
|
@ -422,19 +422,30 @@ static struct slap_schema_ad_map {
|
||||
"EQUALITY octetStringMatch "
|
||||
"ORDERING octetStringOrderingMatch "
|
||||
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 "
|
||||
"SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )",
|
||||
"SINGLE-VALUE NO-USER-MODIFICATION USAGE dSAOperation )",
|
||||
NULL, SLAP_AT_HIDE,
|
||||
NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL,
|
||||
offsetof(struct slap_internal_schema, si_ad_syncreplCookie) },
|
||||
|
||||
{ "syncTimestamp", "( 1.3.6.1.4.1.4203.666.1.30 NAME 'syncTimestamp' "
|
||||
"DESC 'Time which object was replicated' "
|
||||
"EQUALITY generalizedTimeMatch "
|
||||
"ORDERING generalizedTimeOrderingMatch "
|
||||
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 "
|
||||
"SINGLE-VALUE NO-USER-MODIFICATION USAGE dSAOperation )",
|
||||
NULL, 0,
|
||||
NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL,
|
||||
offsetof(struct slap_internal_schema, si_ad_syncTimestamp) },
|
||||
|
||||
{ "contextCSN", "( 1.3.6.1.4.1.4203.666.1.25 "
|
||||
"NAME 'contextCSN' "
|
||||
"DESC 'the largest committed CSN of a context' "
|
||||
"EQUALITY octetStringMatch "
|
||||
"ORDERING octetStringOrderingMatch "
|
||||
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 "
|
||||
"SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )",
|
||||
"SINGLE-VALUE NO-USER-MODIFICATION USAGE dSAOperation )",
|
||||
NULL, SLAP_AT_HIDE,
|
||||
NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -769,6 +769,7 @@ struct slap_internal_schema {
|
||||
|
||||
AttributeDescription *si_ad_dseType;
|
||||
AttributeDescription *si_ad_syncreplCookie;
|
||||
AttributeDescription *si_ad_syncTimestamp;
|
||||
AttributeDescription *si_ad_contextCSN;
|
||||
|
||||
/* root DSE attribute descriptions */
|
||||
|
@ -1710,8 +1710,7 @@ nonpresent_callback(
|
||||
static int
|
||||
null_callback(
|
||||
Operation* op,
|
||||
SlapReply* rs
|
||||
)
|
||||
SlapReply* rs )
|
||||
{
|
||||
if ( rs->sr_err != LDAP_SUCCESS &&
|
||||
rs->sr_err != LDAP_REFERRAL &&
|
||||
@ -1736,8 +1735,7 @@ slap_create_syncrepl_entry(
|
||||
Backend *be,
|
||||
struct berval *context_csn,
|
||||
struct berval *rdn,
|
||||
struct berval *cn
|
||||
)
|
||||
struct berval *cn )
|
||||
{
|
||||
Entry* e;
|
||||
|
||||
|
@ -39,10 +39,10 @@ SLAPD_OBJS = ../globals.o ../config.o ../ch_malloc.o ../cr.o ../backend.o \
|
||||
../schemaparse.o ../ad.o ../at.o ../mr.o ../oc.o \
|
||||
../syntax.o ../acl.o ../phonetic.o ../attr.o ../value.o \
|
||||
../entry.o ../dn.o ../filter.o ../str2filter.o ../ava.o \
|
||||
../init.o ../controls.o ../kerberos.o ../passwd.o \
|
||||
../index.o ../extended.o ../starttls.o ../sets.o ../mra.o \
|
||||
../init.o ../controls.o ../passwd.o \
|
||||
../index.o ../extended.o ../sets.o ../mra.o \
|
||||
../referral.o ../backglue.o ../oidm.o ../mods.o ../operation.o \
|
||||
../cancel.o ../sl_malloc.o ../backover.o ../ctxcsn.o ../syncrepl.o \
|
||||
../sl_malloc.o ../backover.o ../ctxcsn.o ../syncrepl.o \
|
||||
../ldapsync.o ../sessionlog.o
|
||||
|
||||
SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o
|
||||
|
@ -320,3 +320,15 @@ int slap_parse_user( struct berval *id, struct berval *user,
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int cancel_extop( Operation *op, SlapReply *rs )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef HAVE_TLS
|
||||
int starttls_extop ( Operation *op, SlapReply *rs )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user