diff options
author | Amitay Isaacs <amitay@gmail.com> | 2014-04-15 12:23:42 +1000 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-04-23 14:49:07 +0200 |
commit | 1d4fb1b702b8bf4ffdff6fee626c280b174c5aee (patch) | |
tree | eb1c381c05e205855bbe77279e2c3e45b4b629c0 /ctdb/server | |
parent | 720f7639e43514d37c14da067389c421811279fa (diff) | |
download | samba-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/server')
-rw-r--r-- | ctdb/server/ctdb_ltdb_server.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c index 3d8772fc88..fe8636949d 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; } |