mei_rt2mei_rt2_fix_1
Last change
on this file since 549656e was
440ba20,
checked in by Mei <mei@…>, 12 years ago
|
1) wrap up refactoring to move all the code gen to abac structure
2) all original testsuite passed
3) add couple more ui calls in abac.hh ie. manage constraint's
creation, hook to dump yap db.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[473dc8a] | 1 | #ifndef __ABAC_COMMON_H__ |
---|
| 2 | #define __ABAC_COMMON_H__ |
---|
| 3 | |
---|
| 4 | typedef struct _abac_chunk_t { |
---|
| 5 | unsigned char *ptr; |
---|
| 6 | int len; |
---|
| 7 | } abac_chunk_t; |
---|
| 8 | |
---|
[8bd77b5] | 9 | typedef enum _idtype_t { |
---|
| 10 | e_KEYID = 1, |
---|
| 11 | } abac_idtype_t; |
---|
| 12 | /* idtypename[idtype] */ |
---|
[d037f54] | 13 | static const char * const _idtypename[] = |
---|
[8bd77b5] | 14 | { |
---|
| 15 | "badidtype", "keyid" |
---|
| 16 | }; |
---|
| 17 | static int _idtypename_cnt=1; |
---|
| 18 | |
---|
| 19 | typedef enum _termtype { |
---|
| 20 | e_TERM_INTEGER = 1, |
---|
| 21 | e_TERM_URN = 2, |
---|
| 22 | e_TERM_FLOAT = 3, |
---|
| 23 | e_TERM_BOOLEAN = 4, |
---|
| 24 | e_TERM_STRING = 5, |
---|
| 25 | e_TERM_TIME = 6, |
---|
| 26 | e_TERM_PRINCIPAL = 7, |
---|
| 27 | e_TERM_ANONYMOUS = 8 |
---|
| 28 | } abac_termtype_t; |
---|
| 29 | /* termname[dtermtype] */ |
---|
[d037f54] | 30 | static const char *const _termname[] = |
---|
[8bd77b5] | 31 | { |
---|
| 32 | "badterm", |
---|
| 33 | "integer", |
---|
| 34 | "urn", |
---|
| 35 | "float", |
---|
| 36 | "boolean", |
---|
| 37 | "string", |
---|
| 38 | "time" , |
---|
| 39 | "principal", |
---|
| 40 | "anonymous" |
---|
| 41 | }; |
---|
| 42 | static int _termname_cnt=8; |
---|
| 43 | |
---|
| 44 | typedef enum _condtype_t { |
---|
| 45 | e_COND_ROLE = 1, |
---|
| 46 | e_COND_OSET = 2, |
---|
| 47 | e_COND_RANGE = 3 |
---|
| 48 | } abac_condtype_t; |
---|
| 49 | |
---|
| 50 | /* condname[condtype] */ |
---|
[d037f54] | 51 | static const char *const _condname[] = |
---|
[8bd77b5] | 52 | { |
---|
| 53 | "badcondition", |
---|
| 54 | "role", |
---|
| 55 | "oset", |
---|
| 56 | "range" |
---|
| 57 | }; |
---|
| 58 | static int _condname_cnt=3; |
---|
| 59 | |
---|
| 60 | typedef enum _aspecttype_t { |
---|
| 61 | e_ASPECTTYPE_NULL = 0, |
---|
| 62 | e_ASPECTTYPE_ROLE = 1, |
---|
| 63 | e_ASPECTTYPE_OSET = 2, |
---|
| 64 | e_ASPECTTYPE_INTERSECTING = 3 |
---|
| 65 | } abac_aspecttype_t; |
---|
| 66 | |
---|
[440ba20] | 67 | typedef enum _itemtype_t { |
---|
| 68 | e_ITEM_MIN = 1, |
---|
| 69 | e_ITEM_MAX = 2, |
---|
| 70 | e_ITEM_TARGET = 3 |
---|
| 71 | } abac_itemtype_t; |
---|
| 72 | |
---|
| 73 | /* itemname[itemtype] */ |
---|
| 74 | static const char *const _itemname[] = |
---|
| 75 | { |
---|
| 76 | "baditem", |
---|
| 77 | "min", |
---|
| 78 | "max", |
---|
| 79 | "target" |
---|
| 80 | }; |
---|
| 81 | static int _itemname_cnt=3; |
---|
| 82 | |
---|
[473dc8a] | 83 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.