diff options
author | Martin Schwenke <martin@meltin.net> | 2018-06-26 20:12:23 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2018-07-02 08:51:22 +0200 |
commit | 63255ef92552da92956c05160f33622d0bbc3a28 (patch) | |
tree | 56d7c596e588221c82b1122da02a9bb4de50f31c /ctdb/include | |
parent | af446d5209e37a38363911e5f339869b73d87963 (diff) | |
download | samba-63255ef92552da92956c05160f33622d0bbc3a28.tar.gz |
ctdb-daemon: Only consider client ID for local database attach
The comment immediately above this code says "don't allow local
clients to attach" and then looks up the client ID regardless of
whether the request is local or remote.
This means that an intentional remote attach from a client will not
work correctly. No real client should ever do that since clients
attach so they an access databases locally. Perhaps some sanity
checks should be added.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13500
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/include')
-rw-r--r-- | ctdb/include/ctdb_private.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 39e32540e00..b3d2e146dcf 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -725,9 +725,12 @@ int ctdb_set_db_readonly(struct ctdb_context *ctdb, int ctdb_process_deferred_attach(struct ctdb_context *ctdb); -int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata, +int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, + TDB_DATA indata, TDB_DATA *outdata, - uint8_t db_flags, uint32_t client_id, + uint8_t db_flags, + uint32_t srcnode, + uint32_t client_id, struct ctdb_req_control_old *c, bool *async_reply); int32_t ctdb_control_db_detach(struct ctdb_context *ctdb, TDB_DATA indata, |