move invocation_id check
authorStefan Metzmacher <metze@samba.org>
Wed, 17 Oct 2012 10:39:09 +0000 (12:39 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Feb 2019 10:31:19 +0000 (11:31 +0100)
source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index ff6bfbe30c0755c7cbec10d0a6f032a00e4f9f85..dc9bb4f46c553b5ebd47f5d1216d281ce9f72cf8 100644 (file)
@@ -6981,6 +6981,16 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
 
        unix_to_nt_time(&now, t);
 
+       /* 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) {
+               /* this happens during an initial vampire while
+                  updating the schema */
+               DEBUG(0,("No invocationID - replmd_replicated_uptodate_modify\n"));
+               smb_panic(__location__);
+               return replmd_replicated_request_werror(ar, WERR_INTERNAL_ERROR);
+       }
+
        if (ar->search_msg == NULL) {
                /* this happens for a REPL_OBJ call where we are
                   creating the target object by replicating it. The