#include <rsbac/rc_types.h>Go to the source code of this file.
Defines | |
| #define | NULL ((void *) 0) |
Functions | |
| char * | get_rc_target_name (char *name, enum rsbac_rc_target_t value) |
| enum rsbac_rc_target_t | get_rc_target_nr (const char *name) |
| char * | get_rc_admin_name (char *name, enum rsbac_rc_admin_type_t value) |
| enum rsbac_rc_admin_type_t | get_rc_admin_nr (const char *name) |
| char * | get_rc_scd_type_name (char *name, enum rsbac_rc_scd_type_t value) |
| enum rsbac_rc_scd_type_t | get_rc_scd_type_nr (const char *name) |
| char * | get_rc_item_name (char *name, enum rsbac_rc_item_t value) |
| enum rsbac_rc_item_t | get_rc_item_nr (const char *name) |
| char * | get_rc_item_param (char *name, enum rsbac_rc_item_t value) |
| char * | get_rc_special_right_name (char *name, enum rsbac_rc_special_rights_t value) |
| enum rsbac_rc_special_rights_t | get_rc_special_right_nr (const char *name) |
|
|
Definition at line 14 of file rc_getname.h. |
|
||||||||||||
|
Definition at line 167 of file rc_getname.c. References NULL, rc_admin_list, and RC_none. 00169 {
00170 if(!name)
00171 return(NULL);
00172 if(value > RC_none)
00173 strcpy(name, "ERROR!");
00174 else
00175 strcpy(name, rc_admin_list[value]);
00176 return(name);
00177 };
|
|
|
Definition at line 179 of file rc_getname.c. References rc_admin_list, and RC_none. 00180 {
00181 enum rsbac_rc_admin_type_t i;
00182
00183 if(!name)
00184 return(RC_none);
00185 for (i = 0; i < RC_none; i++)
00186 {
00187 if (!strcmp(name, rc_admin_list[i]))
00188 {
00189 return(i);
00190 }
00191 }
00192 return(RC_none);
00193 };
|
|
||||||||||||
|
Definition at line 230 of file rc_getname.c. References NULL, rc_item_list, and RI_none. Referenced by rsbac_rc_sys_set_item(). 00232 {
00233 if(!name)
00234 return(NULL);
00235 if(value > RI_none)
00236 strcpy(name, "ERROR!");
00237 else
00238 strcpy(name, rc_item_list[value]);
00239 return(name);
00240 };
|
|
|
Definition at line 242 of file rc_getname.c. References rc_item_list, and RI_none. 00243 {
00244 enum rsbac_rc_item_t i;
00245
00246 if(!name)
00247 return(RI_none);
00248 for (i = 0; i < RI_none; i++)
00249 {
00250 if (!strcmp(name, rc_item_list[i]))
00251 {
00252 return(i);
00253 }
00254 }
00255 return(RI_none);
00256 };
|
|
||||||||||||
|
Definition at line 259 of file rc_getname.c. References NULL, rc_item_param_list, and RI_none. 00261 {
00262 if(!name)
00263 return(NULL);
00264 if(value > RI_none)
00265 strcpy(name, "ERROR!");
00266 else
00267 strcpy(name, rc_item_param_list[value]);
00268 return(name);
00269 };
|
|
||||||||||||
|
Definition at line 195 of file rc_getname.c. References get_scd_type_name(), NULL, rc_scd_type_list, RST_min, and RST_none. Referenced by rsbac_rc_get_item(). 00197 {
00198 if(!name)
00199 return(NULL);
00200 if(value < RST_min)
00201 {
00202 return(get_scd_type_name(name, value));
00203 }
00204 value -= RST_min;
00205 if(value > RST_none)
00206 {
00207 strcpy(name, "ERROR!");
00208 return(name);
00209 }
00210 strcpy(name, rc_scd_type_list[value]);
00211 return(name);
00212 };
|
|
|
Definition at line 214 of file rc_getname.c. References get_scd_type_nr(), RC_none, rc_scd_type_list, and RST_min. 00215 {
00216 enum rsbac_rc_scd_type_t i;
00217
00218 if(!name)
00219 return(RC_none);
00220 for (i = 0; i < RC_none-RST_min; i++)
00221 {
00222 if (!strcmp(name, rc_scd_type_list[i]))
00223 {
00224 return(i+RST_min);
00225 }
00226 }
00227 return(get_scd_type_nr(name));
00228 };
|
|
||||||||||||
|
Definition at line 272 of file rc_getname.c. References get_request_name(), NULL, rc_special_right_list, RCR_NONE, and RSBAC_RC_SPECIAL_RIGHT_BASE. Referenced by check_comp_rc(), and rsbac_rc_check_type_comp(). 00274 {
00275 if(!name)
00276 return(NULL);
00277 if(value < RSBAC_RC_SPECIAL_RIGHT_BASE)
00278 {
00279 return(get_request_name(name, value));
00280 }
00281 value -= RSBAC_RC_SPECIAL_RIGHT_BASE;
00282 if(value > RCR_NONE)
00283 {
00284 strcpy(name, "ERROR!");
00285 return(name);
00286 }
00287 strcpy(name, rc_special_right_list[value]);
00288 return(name);
00289 };
|
|
|
Definition at line 292 of file rc_getname.c. References get_request_nr(), rc_special_right_list, RCR_NONE, and RSBAC_RC_SPECIAL_RIGHT_BASE. 00293 {
00294 enum rsbac_rc_special_rights_t i;
00295
00296 if(!name)
00297 return(RCR_NONE);
00298 for (i = 0; i < (RCR_NONE - RSBAC_RC_SPECIAL_RIGHT_BASE); i++)
00299 {
00300 if (!strcmp(name, rc_special_right_list[i]))
00301 {
00302 return(i + RSBAC_RC_SPECIAL_RIGHT_BASE);
00303 }
00304 }
00305 return(get_request_nr(name));
00306 }
|
|
||||||||||||
|
Definition at line 139 of file rc_getname.c. References NULL, rc_target_list, and RT_NONE. 00141 {
00142 if(!name)
00143 return(NULL);
00144 if(value > RT_NONE)
00145 strcpy(name, "ERROR!");
00146 else
00147 strcpy(name, rc_target_list[value]);
00148 return(name);
00149 };
|
|
|
Definition at line 151 of file rc_getname.c. References rc_target_list, and RT_NONE. 00152 {
00153 enum rsbac_rc_target_t i;
00154
00155 if(!name)
00156 return(RT_NONE);
00157 for (i = 0; i < RT_NONE; i++)
00158 {
00159 if (!strcmp(name, rc_target_list[i]))
00160 {
00161 return(i);
00162 }
00163 }
00164 return(RT_NONE);
00165 };
|
1.4.2