summaryrefslogtreecommitdiffstats
path: root/src/ceph.in
diff options
context:
space:
mode:
authorSage Weil <sage@redhat.com>2019-10-23 20:36:48 +0200
committerSage Weil <sage@redhat.com>2019-10-23 20:39:46 +0200
commitef3c42cd6481a4c275b593bc60c8ee2142148e9f (patch)
treeea87a74a8daab85826263e32c0f878608988284f /src/ceph.in
parentmon: shunt old tell commands from cli interface to asok (diff)
downloadceph-ef3c42cd6481a4c275b593bc60c8ee2142148e9f.tar.xz
ceph-ef3c42cd6481a4c275b593bc60c8ee2142148e9f.zip
auth: EACCES, not EPERM
EPERM means an operation requires superuser; EACCES more generally means permission denied. We use EACCES elsewhere for ceph auth denials; use it here too for consistency. This fixes qa/workunits/mon/caps.sh. Signed-off-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'src/ceph.in')
-rwxr-xr-xsrc/ceph.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ceph.in b/src/ceph.in
index fac4ce3f06e..234bccf024f 100755
--- a/src/ceph.in
+++ b/src/ceph.in
@@ -399,7 +399,7 @@ def do_extended_help(parser, args, target, partial):
prefix='get_command_descriptions',
timeout=10)
if ret:
- if ret == -errno.EPERM and target[0] in ('osd', 'mds'):
+ if (ret == -errno.EPERM or ret == -errno.EACCES) and target[0] in ('osd', 'mds'):
print("Permission denied. Check that your user has 'allow *' "
"capabilities for the target daemon type.", file=sys.stderr)
elif ret == -errno.EPERM: