]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon: Monitor: let 'handle_command()' deal with caps validation 2560/head
authorJoao Eduardo Luis <joao@redhat.com>
Tue, 30 Sep 2014 18:15:18 +0000 (19:15 +0100)
committerJoao Eduardo Luis <joao@redhat.com>
Fri, 3 Oct 2014 15:24:20 +0000 (16:24 +0100)
commit7e2bd2294f4263c41690a54d2d7481bab183cb5a
tree1153ebfe91ba017569e20f7abd77df52f1153fcc
parentf0653c0401eafd154dd4579e6bcf6caa7627cf4c
mon: Monitor: let 'handle_command()' deal with caps validation

If a given client doesn't have the required caps when running a command,
it must receive an EACCES or EPERM reply.  This is already handled by
Monitor::handle_command(), which does an exceptionally good job at it.

Therefore, and unlike other messages that do not expect return values,
we can't simply drop the message if the client doesn't have the
appropriate capabilities, or things can get very weird very fast from
the user's perspective.  Dropping the message for a command without a
reply has roughly the same effect as loss of quorum (timeout, pipes
failing) and confusion may ensue from it.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
src/mon/Monitor.cc