]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
don't allow setvnnmap while not frozen
authorAndrew Tridgell <tridge@samba.org>
Mon, 14 May 2007 03:48:40 +0000 (13:48 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 14 May 2007 03:48:40 +0000 (13:48 +1000)
(This used to be ctdb commit a73f47f565894cc7e346177d87f2e6813837e1c6)

ctdb/common/ctdb_recover.c

index 2f1ce5a45e72873f117c74763536f5f7ad73770f..5a2105e13dd80593075882791fcfb987779a9a51 100644 (file)
@@ -91,6 +91,11 @@ ctdb_control_setvnnmap(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA inda
 {
        struct ctdb_vnn_map_wire *map = (struct ctdb_vnn_map_wire *)indata.dptr;
 
+       if (ctdb->freeze_mode != CTDB_FREEZE_FROZEN) {
+               DEBUG(0,("Attempt to set vnnmap when not frozen\n"));
+               return -1;
+       }
+
        talloc_free(ctdb->vnn_map);
 
        ctdb->vnn_map = talloc(ctdb, struct ctdb_vnn_map);