ITS#9015 Don't generate contextCSN on empty DB

This commit is contained in:
Ondřej Kuzník 2019-04-29 11:39:05 +01:00
parent 1df2b85c32
commit abcf0e8f23

View File

@ -3216,6 +3216,11 @@ syncprov_db_open(
/* Not in charge of this serverID, don't generate anything. */
goto out;
}
if ( !SLAP_SYNC_SUBENTRY( be ) && rc != LDAP_SUCCESS
&& rc != LDAP_NO_SUCH_ATTRIBUTE ) {
/* If the DB is genuinely empty, don't generate one either. */
goto out;
}
csn.bv_val = csnbuf;
csn.bv_len = sizeof( csnbuf );
slap_get_csn( op, &csn, 0 );