/[pdpsoft]/trunk/grid-mw-security/ees/include/library/eef_polytypes.h
ViewVC logotype

Diff of /trunk/grid-mw-security/ees/include/library/eef_polytypes.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1344 by aramv, Wed Dec 2 16:46:27 2009 UTC revision 1345 by aramv, Thu Jan 7 16:38:30 2010 UTC
# Line 31  Line 31 
31  #define MAXPROCS                5  #define MAXPROCS                5
32  #define LCMAPS_MAXARGSTRING     2000  #define LCMAPS_MAXARGSTRING     2000
33    
34    /* Function pointer type */
35  typedef void *eef_proc_t;  typedef void *eef_proc_t;
36    
37  /*! Identifiers for linked process symbols */  /*! Identifiers for linked process symbols */
38  typedef enum eef_proctype_e  typedef enum eef_proctype_e {
 {  
39      INITPROC,   /*!< this value corresponds to the plugin initialization function */      INITPROC,   /*!< this value corresponds to the plugin initialization function */
40      RUNPROC,    /*!< this value corresponds to the plugin run function (get credentials) */      RUNPROC,    /*!< this value corresponds to the plugin run function (get credentials) */
41      TERMPROC,   /*!< this value corresponds to the plugin termination function */      TERMPROC,   /*!< this value corresponds to the plugin termination function */
# Line 46  typedef enum eef_proctype_e Line 46  typedef enum eef_proctype_e
46    
47    
48  /*! Argument types */  /*! Argument types */
49  typedef enum  typedef enum {
 {  
50    TYPE_NONE,    TYPE_NONE,
51    TYPE_SCHAR,    TYPE_SCHAR,
52    TYPE_UCHAR,    TYPE_UCHAR,
# Line 102  typedef struct eef_plugindl_s Line 101  typedef struct eef_plugindl_s
101      struct eef_plugindl_s *    next;                            /*!< pointer to the next plugin in the plugin list */      struct eef_plugindl_s *    next;                            /*!< pointer to the next plugin in the plugin list */
102  } eef_plugindl_t;  } eef_plugindl_t;
103    
104    
105    /* Policy parser types */
106    
107  /*!  /*!
108   * \brief Structure for symbols used by the parser internally   * \brief Structure for symbols used by the parser internally
109   */   */
110  typedef struct record_s {  typedef struct em_record_s {
111    char*             string;       /*!<  Hold the symbol that lex has found. */    char*               string;       /*!<  Hold the symbol that lex has found. */
112    int               lineno;       /*!<  Hold the line number the symbol has been found. */    int                 lineno;       /*!<  Hold the line number the symbol has been found. */
113  } record_t;  } record_t;
114    
115    
116  /*!  /*!
117   *  \brief Structure keeps track of the variables, their value and the line number they are defined on.   *  \brief Structure keeps track of the variables, their value and the line number they are defined on.
118   */   */
119  typedef struct var_s {  typedef struct em_var_s {
120    char*             name;         /*!<  Name of the variable. */    char*               name;         /*!<  Name of the variable. */
121    char*             value;        /*!<  Value of the variable. */    char*               value;        /*!<  Value of the variable. */
122    unsigned int      lineno;       /*!<  Line number the variable appears on. */    unsigned int        lineno;       /*!<  Line number the variable appears on. */
123    struct var_s*     next;         /*!<  Next variable, or 0 if none. */    struct em_var_s*    next;         /*!<  Next variable, or 0 if none. */
124  } var_t;  } var_t;
125    
126  /*!  /*!
127   *  \brief Structure to make a tree of   *  \brief Structure to make a tree of
128   *   *
129   */   */
130  typedef struct rule_s {  typedef struct em_rule_s {
131    unsigned int      lineno;       /*!<  Line number where rule appeared. */    unsigned int        lineno;       /*!<  Line number where rule appeared. */
132    char*             state;        /*!<  Name of the state.*/    char*               state;        /*!<  Name of the state.*/
133    struct rule_s*    true_branch;  /*!<  True branch or NULL if none */    struct em_rule_s*   true_branch;  /*!<  True branch or NULL if none */
134    struct rule_s*    false_branch; /*!<  False branch or NULL if none */    struct em_rule_s*   false_branch; /*!<  False branch or NULL if none */
135    struct rule_s*    next;         /*!<  Next rule, or NULL if none */    struct em_rule_s*   next;         /*!<  Next rule, or NULL if none */
136    eef_plugindl_t*   plugin;    eef_plugindl_t*     plugin;
137  } rule_t;  } rule_t;
138    
139  /*!  /*!
140   *  \brief Structure to build a tree of plugins as defined in a policy in the config file   *  \brief Structure to build a tree of plugins as defined in a policy in the config file
141   */   */
142  typedef struct policy_s {  typedef struct em_policy_s {
143    char*             name;    char*               name;
144    unsigned int      lineno;    unsigned int        lineno;
145    rule_t*           rules;    rule_t*             rules;
146    int               rules_list_transformed_to_tree;    int                 rules_list_transformed_to_tree;
147    struct policy_s*  next;    struct em_policy_s* next;
148  } policy_t;  } policy_t;
149    
150    
151    /* AOS Types */
152    
153  /*!  /*!
154   * \brief Node structure to store AOS arguments   * \brief Node structure to store AOS arguments
155   */   */
156  typedef struct aos_argument_s  typedef struct aos_argument_s {
157  {    void*                       data;                            /*! a pointer to store the data */
158      void*                      data;                            /*! a pointer to store the data */    int                         needs_free;                      /*! a flag that determines wheter the data should be free'd */
159      int                        needs_free;                      /*! a flag that determines wheter the data should be free'd */    const char *                label;                           /*! a label to identify the data */
160      const char *               label;                           /*! a label to identify the data */    eef_arg_type                type;                            /*! a type identifier */
161      eef_arg_type               type;                            /*! a type identifier */    struct aos_argument_s *     parent;                          /*! a pointer to the 'parent' object */
162      struct aos_argument_s *    parent;                          /*! a pointer to the 'parent' object */    struct aos_argument_s *     child;                           /*! a pointer to the 'child' object */
163      struct aos_argument_s *    child;                           /*! a pointer to the 'child' object */    struct aos_argument_s *     next;                            /*! a pointer to the next node */
164      struct aos_argument_s *    next;                            /*! a pointer to the next node */    eef_plugindl_t *            setting_plugin;                  /*! a pointer to the plugin that initialized this data */
     eef_plugindl_t *           setting_plugin;                  /*! a pointer to the plugin that initialized this data */  
165  } aos_argument_t;  } aos_argument_t;
166    
167    typedef struct aos_attribute_s {
168      char *                      id;                              /*! a label to identify the data */
169      char *                      issuer;                          /*! a string to identify the issuer */
170      char *                      type;                            /*! a type identifier */
171      int                         needs_free;                      /*! a flag that determines wheter the data should be free'd */
172      void*                       data;                            /*! a pointer to store the data */
173      struct aos_attribute_s *    parent;                          /*! a pointer to the 'parent' object */
174      struct aos_attribute_s *    child;                           /*! a pointer to the 'child' object */
175      struct aos_attribute_s *    next;                            /*! a pointer to the next node */
176      eef_plugindl_t *            setting_plugin;                  /*! a pointer to the plugin that initialized this data */
177    } aos_attribute_t;
178    
179    typedef enum aos_context_class_e {
180      SUBJECT,
181      ACTION,
182      RESOURCE,
183      ENVIRONMENT,
184      NONE,
185      ANY,
186      OBLIGATION
187    } aos_context_class_t;
188    
189    typedef struct aos_context_s {
190      aos_attribute_t  *          list_attributes;
191      aos_attribute_t  *          last_attribute;
192      aos_context_class_t         context_class;
193      char*                       obligation_name;
194      struct aos_context_s *      next;
195    } aos_context_t;
196    
197    typedef struct aos_storage_s {
198      aos_context_t *             list_contexts;
199      aos_context_t *             last_context;
200    } aos_storage_t;
201    
202    
203  #endif  #endif

Legend:
Removed from v.1344  
changed lines
  Added in v.1345

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28