Project

General

Profile

Actions

Bug #17368

closed

mds: allowed GIDs must be ordered in the cephx string

Added by Greg Farnum over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Administration/Usability
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

If you do something like

ASSERT_TRUE(cap.parse(g_ceph_context, "allow * uid=10 gids=10,11,12; allow * uid=12 gids=12,10", NULL));
ASSERT_TRUE(cap.is_capable("foo", 0, 10, 0770, 12, 12, &glist10, MAY_READ | MAY_WRITE, 0, 0));

(where that "&glist10" is a vector holding the integer 10, to let clients pass multiple GIDs; it's in my wip-uid branch)
the second ASSERT_TRUE fails. This is because our parsing code does not order gids, and our gid search code assumes they are ordered.

We could update the search code to do a linear search, but that's failure-prone and annoying. Unfortunately the qi parsing code is also annoying, so we're getting this ticket instead of a patch from me that fixes it. ;)

Actions #1

Updated by John Spray over 7 years ago

  • Assignee set to Greg Farnum
Actions #2

Updated by Greg Farnum over 7 years ago

  • Status changed from New to Fix Under Review
Actions #3

Updated by Greg Farnum over 7 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF