From 1d4fb1b702b8bf4ffdff6fee626c280b174c5aee Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 15 Apr 2014 12:23:42 +1000 Subject: ctdb-daemon: Do not allow database detach if AllowClientDBAttach=1 This avoids the server detaching a database if clients are allowed to connect to databases. Signed-off-by: Amitay Isaacs Reviewed-by: Michael Adam --- ctdb/server/ctdb_ltdb_server.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ctdb') diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c index 3d8772fc887..fe8636949d5 100644 --- a/ctdb/server/ctdb_ltdb_server.c +++ b/ctdb/server/ctdb_ltdb_server.c @@ -1182,9 +1182,10 @@ int32_t ctdb_control_db_detach(struct ctdb_context *ctdb, TDB_DATA indata, return -1; } - if (ctdb->tunable.allow_client_db_attach == 0) { - DEBUG(DEBUG_ERR, ("DB detach from database %s denied by " - "tunable AllowClientDBAccess == 0\n", + if (ctdb->tunable.allow_client_db_attach == 1) { + DEBUG(DEBUG_ERR, ("DB detach from database %s denied. " + "Clients are allowed access to databases " + "(AllowClientDBAccess == 1)\n", ctdb_db->db_name)); return -1; } -- cgit