0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-05 15:18:52 +02:00
Commit graph

9 commits

Author SHA1 Message Date
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