dsdb-repl_meta_data: Check for a NULL invocationID and do not proceed
authorAndrew Bartlett <abartlet@samba.org>
Tue, 17 Sep 2013 22:31:51 +0000 (15:31 -0700)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 19 Sep 2013 19:27:44 +0000 (12:27 -0700)
This can happen if we do not find the invocationID, with later patches.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index c8cdfecb93119149969915c392a55a8ffd190aed..7bd0265f9dddc492258202bdbeb478a97921c811 100644 (file)
@@ -4839,6 +4839,10 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
 
        /* get our invocation_id if we have one already attached to the ldb */
        our_invocation_id = samdb_ntds_invocation_id(ldb);
+       if (our_invocation_id == NULL) {
+               DEBUG(0, ("repl_meta_data: Could not find our own server's invocationID!\n"));
+               return replmd_replicated_request_werror(ar, WERR_DS_DRA_INTERNAL_ERROR);                
+       }
 
        /* merge in the source_dsa vector is available */
        for (i=0; (ruv && i < ruv->count); i++) {