From: Pierangelo Masarati Date: Thu, 25 Aug 2005 08:57:08 +0000 (+0000) Subject: need stricter sanity checks... X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~580 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=afaf42623173006b0a6e69cd4609db47b7a6bf3e;p=openldap need stricter sanity checks... --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 2f5d88b65b..57d6b46600 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -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; diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 4ca77f8463..2fdf30b3b4 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -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 ) ) {