]> git.sur5r.net Git - openldap/commitdiff
need stricter sanity checks...
authorPierangelo Masarati <ando@openldap.org>
Thu, 25 Aug 2005 08:57:08 +0000 (08:57 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 25 Aug 2005 08:57:08 +0000 (08:57 +0000)
servers/slapd/overlays/syncprov.c
servers/slapd/syncrepl.c

index 2f5d88b65bebe647b1089ddc5d22d9e3cdfeea6f..57d6b466002983ec6f7f8a7efb6fafaa8a9f2d02 100644 (file)
@@ -142,7 +142,7 @@ typedef struct fbase_cookie {
        int fscope;     /* if TRUE then fdn is within the psearch scope */
 } fbase_cookie;
 
-static AttributeName csn_anlist[2];
+static AttributeName csn_anlist[3];
 static AttributeName uuid_anlist[2];
 
 /* Build a LDAPsync intermediate state control */
@@ -178,6 +178,8 @@ syncprov_state_ctrl(
                }
        }
 
+       /* FIXME: what if entryuuid is NULL or empty ? */
+
        if ( send_cookie && cookie ) {
                ber_printf( ber, "{eOON}",
                        entry_sync_state, &entryuuid_bv, cookie );
@@ -2261,6 +2263,8 @@ syncprov_db_init(
 
        csn_anlist[0].an_desc = slap_schema.si_ad_entryCSN;
        csn_anlist[0].an_name = slap_schema.si_ad_entryCSN->ad_cname;
+       csn_anlist[1].an_desc = slap_schema.si_ad_entryUUID;
+       csn_anlist[1].an_name = slap_schema.si_ad_entryUUID->ad_cname;
 
        uuid_anlist[0].an_desc = slap_schema.si_ad_entryUUID;
        uuid_anlist[0].an_name = slap_schema.si_ad_entryUUID->ad_cname;
index 4ca77f84635cf1356e5011381efd6c6515960dcd..2fdf30b3b4cc8b815e0a7065beabe95c4499ee03 100644 (file)
@@ -609,6 +609,7 @@ do_syncrep2(
                                rctrlp = *rctrls;
                                ber_init2( ber, &rctrlp->ldctl_value, LBER_USE_DER );
                                ber_scanf( ber, "{em" /*"}"*/, &syncstate, &syncUUID );
+                               /* FIXME: what if syncUUID is NULL or empty? */
                                if ( ber_peek_tag( ber, &len ) == LDAP_TAG_SYNC_COOKIE ) {
                                        ber_scanf( ber, /*"{"*/ "m}", &cookie );
                                        if ( !BER_BVISNULL( &cookie ) ) {