source: libabac/abac_common.h @ 8bd77b5

mei_rt2mei_rt2_fix_1
Last change on this file since 8bd77b5 was 8bd77b5, checked in by Mei <mei@…>, 12 years ago

1) convert parser and libabac to use id cred and attr cred like

creddy (move those 2 files to libabac).

2) fix up abac.hh to work with expanded libabac. can now build

structure from python script

3) redid the credential dump using the internal credential table

instead of depending on a search in db.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1#ifndef __ABAC_COMMON_H__
2#define __ABAC_COMMON_H__
3
4typedef struct _abac_chunk_t {
5    unsigned char *ptr;
6    int len;
7} abac_chunk_t;
8
9typedef enum _idtype_t {
10    e_KEYID = 1,
11} abac_idtype_t;
12/* idtypename[idtype] */
13static char * const _idtypename[] =
14{
15  "badidtype", "keyid"
16};
17static int _idtypename_cnt=1;
18
19typedef 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] */
30static char *const _termname[] =
31{
32  "badterm",
33  "integer",
34  "urn",
35  "float",
36  "boolean",
37  "string",
38  "time" ,
39  "principal",
40  "anonymous"
41};
42static int _termname_cnt=8;
43
44typedef 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] */
51static char *const _condname[] =
52{
53  "badcondition",
54  "role",
55  "oset",
56  "range"
57};
58static int _condname_cnt=3;
59
60typedef 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
67#endif
Note: See TracBrowser for help on using the repository browser.