summaryrefslogtreecommitdiffstats
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2014-04-15 12:23:42 +1000
committerMichael Adam <obnox@samba.org>2014-04-23 14:49:07 +0200
commit1d4fb1b702b8bf4ffdff6fee626c280b174c5aee (patch)
treeeb1c381c05e205855bbe77279e2c3e45b4b629c0 /ctdb
parent720f7639e43514d37c14da067389c421811279fa (diff)
downloadsamba-1d4fb1b702b8bf4ffdff6fee626c280b174c5aee.tar.gz
samba-1d4fb1b702b8bf4ffdff6fee626c280b174c5aee.tar.xz
samba-1d4fb1b702b8bf4ffdff6fee626c280b174c5aee.zip
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 <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_ltdb_server.c7
1 files changed, 4 insertions, 3 deletions
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;
}