Rev 295: don't allow setrecmaster while not frozen in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Mon May 14 03:48:15 GMT 2007


------------------------------------------------------------
revno: 295
revision-id: tridge at samba.org-20070514034814-tfzpg9mzglmbr2s6
parent: tridge at samba.org-20070512232016-fdj2opy995c536bs
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Mon 2007-05-14 13:48:14 +1000
message:
  don't allow setrecmaster while not frozen
modified:
  common/ctdb_control.c          ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
=== modified file 'common/ctdb_control.c'
--- a/common/ctdb_control.c	2007-05-12 11:25:26 +0000
+++ b/common/ctdb_control.c	2007-05-14 03:48:14 +0000
@@ -123,8 +123,12 @@
 	}
 
 	case CTDB_CONTROL_SET_RECMASTER: {
+		CHECK_CONTROL_DATA_SIZE(sizeof(uint32_t));
+		if (ctdb->freeze_mode != CTDB_FREEZE_FROZEN) {
+			DEBUG(0,("Attempt to set recmaster when not frozen\n"));
+			return -1;
+		}
 		ctdb->recovery_master = ((uint32_t *)(&indata.dptr[0]))[0];
-
 		return 0;
 	}
 



More information about the samba-cvs mailing list