]> git.sur5r.net Git - openldap/commitdiff
Misc cleanup
authorKurt Zeilenga <kurt@openldap.org>
Tue, 30 Dec 2003 01:26:38 +0000 (01:26 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 30 Dec 2003 01:26:38 +0000 (01:26 +0000)
servers/slapd/config.c
servers/slapd/extended.c
servers/slapd/proto-slap.h
servers/slapd/sasl.c
servers/slapd/schema_prep.c
servers/slapd/slap.h
servers/slapd/syncrepl.c
servers/slapd/tools/Makefile.in
servers/slapd/tools/mimic.c

index e8141d3b38ec8da779ac5da82e3ffddc19e9cf68..ece03c32e603f562fc1d291fb7478e8b1d3ff344 100644 (file)
@@ -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;
index 639b3b78ffbe7a248fe0a975f6a4c7c5411bd6bd..40a751775c42e0f3c7494556822a38381b40b63d 100644 (file)
@@ -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,
index a81c5ebeab4ad87e74e08be0b010b2ab4aa41ab3..e3724409986360b431bf71d7c1add9eb6d438a77 100644 (file)
@@ -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;
 
 /*
index f186eb7c0c95003c9363d7f5b67d5ce52f4ae799..960589f75bf58f37a1c742b1b225711c8e9899a2 100644 (file)
@@ -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 ) ) {
index b57d299fb38c94357b350e988a61eb5cc7d891d6..8da7b91b0f0953f8e986da1da897e8b6a2847683 100644 (file)
@@ -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,
index 357858ddfa98d727252e1f5eaaa803048c2fa4ac..e6dba73a8a78a5bea2224f2a5f3c7193c037c9f7 100644 (file)
@@ -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 */
index 0cd130e123de9513aa25cf56a33ee5fd6d689f70..11b730983b8f33e054ae5e112f242486a55487af 100644 (file)
@@ -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;
 
index 14e887cb0baf85981ce0d29e54a486a6981145d1..3aa3738b877d90ca17d1ab7398969ad1c4e1921a 100644 (file)
@@ -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
index 044d8c164ebe7888a56f55a3ec774822d42d266f..bb3b1d471b2cc0ccc6ca0f02d84e05773c5aa819 100644 (file)
@@ -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