Grid Community Toolkit  6.2.1629922860 (tag: v6.2.20210826)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
oldgaa_utils.h
1 /*
2  * Copyright 1999-2006 University of Chicago
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 /**********************************************************************
19  oldgaa_utils.h:
20 
21 Description:
22  This header file used internally by the oldgaa routines
23 **********************************************************************/
24 #ifndef OLDGAA_UTILS_H
25 #define OLDGAA_UTILS_H
26 #define MAX_STRING_SIZE 1024
27 #define QUOTING '\"'
28 #define WHITESPACE ' '
29 #define TAB '\t'
30 
31 /**********************************************************************
32  *
33  * Function Prototypes
34  *
35  **********************************************************************/
36 
37 /**********************************************************************
38  String Handling
39  **********************************************************************/
40 
41 int
42 oldgaa_strings_match(const char *string1,
43  const char *string2);
44 char *
45 oldgaa_strcopy(const char *s, char *r);
46 
47 
48 /**********************************************************************
49  Compare elements
50  **********************************************************************/
51 int
52 oldgaa_compare_principals(oldgaa_principals_ptr element, oldgaa_principals_ptr new);
53 
54 int
55 oldgaa_compare_rights(oldgaa_rights_ptr element, oldgaa_rights_ptr new);
56 
57 int
58 oldgaa_compare_conditions(oldgaa_conditions_ptr element, oldgaa_conditions_ptr new);
59 
60 int
61 oldgaa_compare_sec_attrbs(oldgaa_sec_attrb_ptr element,
62  oldgaa_sec_attrb_ptr new);
63 
64 /**********************************************************************
65  Add new element to a list
66  **********************************************************************/
67 
68 oldgaa_principals_ptr
69 oldgaa_add_principal(oldgaa_policy_ptr *list, oldgaa_principals_ptr new);
70 
71 oldgaa_rights_ptr
72 oldgaa_add_rights(oldgaa_rights_ptr *list, oldgaa_rights_ptr new);
73 
74 oldgaa_cond_bindings_ptr
75 oldgaa_add_cond_binding(oldgaa_cond_bindings_ptr* list, oldgaa_cond_bindings_ptr new);
76 
77 oldgaa_conditions_ptr
78 oldgaa_add_condition(oldgaa_conditions_ptr* list, oldgaa_conditions_ptr new);
79 
80 oldgaa_sec_attrb_ptr
81 oldgaa_add_attribute(oldgaa_sec_attrb_ptr *list, oldgaa_sec_attrb_ptr new);
82 
83 /**********************************************************************
84  Bindings
85  **********************************************************************/
86 
87 int
88 oldgaa_bind_rights_to_principals(oldgaa_principals_ptr start, oldgaa_rights_ptr rights);
89 
90 void
91 oldgaa_bind_rights_to_conditions(oldgaa_rights_ptr start, oldgaa_cond_bindings_ptr cond_bind);
92 
93 
94 /**********************************************************************
95  Regex Handling Functions
96  **********************************************************************/
97 
98 int
99 oldgaa_check_reg_expr(char *reg_expr,
100  char **reg_expr_list);
101 int
102 oldgaa_regex_matches_string(const char * const string,
103  const char * const regex);
104 
105 char **
106 oldgaa_parse_regex(char * str);
107 
108 #endif /* OLDGAA_UTILS_H */