]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon: check cap before executing tell command
authorKefu Chai <kchai@redhat.com>
Tue, 19 Nov 2019 02:44:16 +0000 (10:44 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 20 Dec 2019 07:56:04 +0000 (15:56 +0800)
commitffa7e70c87547492c87318fcbc2e4a24f0ae784e
treeea6d9777060cf120e12e52821d866f2414ef1e81
parentdd8d7978bac8b6c85bf56fb3ca78a0d018503d4e
mon: check cap before executing tell command

tell command is sent from a client from network, we need to authorize
the cap of client before executing the command sent by it.

in this change, the check for `session->caps.is_allow_all()` is removed,
because

- simpler this way
- `session->caps.is_capable()` also check it, and this code path is
  not a critical path, so no need for trading the simplicity for
  performance here.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/Monitor.cc