[PATCH] ctdb-daemon: Only consider client ID for local database attach (bug 13500)

Martin Schwenke martin at meltin.net
Mon Jul 2 01:31:41 UTC 2018

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.

An alternate approach would be to zero the client_id in
daemon_request_control_from_client() when forwarding controls from
clients to other nodes.  A quick check of uses of client_id in
controls suggests that this would not yield any surprises.  However,
the broadcast logic is buried deeper than this level, so it isn't
possible to handle this for broadcasts.  The semi-obvious fix for this
is to unroll all existing broadcasts and remove the broadcast logic.

Please review and maybe push...

peace & happiness,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ctdb-daemon-Only-consider-client-ID-for-local-databa.patch
Type: text/x-patch
Size: 4597 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180702/253e3ea7/0001-ctdb-daemon-Only-consider-client-ID-for-local-databa.bin>

More information about the samba-technical mailing list