Project

General

Profile

Bug #17368

mds: allowed GIDs must be ordered in the cephx string

Added by Greg Farnum almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Administration/Usability
Target version:
-
Start date:
09/21/2016
Due date:
% Done:

0%

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

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. ;)

History

#1 Updated by John Spray almost 3 years ago

  • Assignee set to Greg Farnum

#2 Updated by Greg Farnum almost 3 years ago

  • Status changed from New to Need Review

#3 Updated by Greg Farnum almost 3 years ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF