need stricter sanity checks...

This commit is contained in:
Pierangelo Masarati 2005-08-25 08:57:08 +00:00
parent b90daf83f9
commit afaf426231
2 changed files with 6 additions and 1 deletions

View 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;

View 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 ) ) {