Commit graph

12 commits

Author SHA1 Message Date
William Pitcock
a16910aa4e capability: add capability_index_stats() for getting statistics about the capability broker system 2012-02-04 21:27:43 -06:00
William Pitcock
885cd603b5 capability: add global list of capability indexes, and name all capability indexes 2012-02-04 21:16:40 -06:00
Jilles Tjoelker
bde42c6063 Don't shadow the name "index". 2012-02-04 15:15:26 +01:00
William Pitcock
8bedf01d19 capability: store capability bit entries with actual bit numbers, instead of as an expanded mask
This makes accounting of number of bits allocated easier.  Specifically, the amount of allocated
bits is computed by doing (index->highest_bit - 1) in code.
2012-02-04 05:23:15 -06:00
William Pitcock
e915e51f4d capability: don't use DictionaryIter internals.
it's just ugly now that we're providing our own copies of keys.
2012-02-04 05:13:04 -06:00
William Pitcock
e679e38906 capability: do not use strings provided by modules for keyword index, instead duplicate the keyword. 2012-02-04 04:47:37 -06:00
William Pitcock
f01f67f0ad capability: add capability_require(). 2012-02-04 02:00:33 -06:00
William Pitcock
0582290f21 capability: missed one 2012-02-04 01:58:07 -06:00
William Pitcock
5058c8ebce capability: change CapabilityIndex.orphaned to (CapabilityIndex.flags & CAP_ORPHANED)
This makes it possible to add other flags to capabilities.
2012-02-04 01:55:11 -06:00
William Pitcock
ec3a9055f2 capability: add capability_index_mask() which calculates old CAP_MASK 2012-02-04 00:39:53 -06:00
William Pitcock
5e773521a9 capability: add capability_index_list() to build a list of capabilities given an index and mask 2012-02-04 00:36:42 -06:00
William Pitcock
64b56afd8c Add a new dynamic capability manager.
Specifically, what this capability manager does, is map keywords to
calculated bitmasks.  These bitmasks are allocated at runtime, so that
the any managed capability index can be manipulated by modules.

Modules should call capability_orphan() when orphaning capabilities.  This
makes it so that bitmasks aren't reallocated, except for cases where the
capability is the same.
2012-02-04 00:05:13 -06:00