#include <rsbac/getname.h>
#include <rsbac/res_getname.h>
#include <rsbac/helpers.h>
#include <rsbac/error.h>
#include <string.h>
Go to the source code of this file.
Functions | |
char * | get_res_name (char *name, u_int value) |
int | get_res_nr (const char *name) |
Variables | |
static char | res_list [RSBAC_RES_MAX+2][8] |
|
Definition at line 34 of file res_getname.c. References NULL, res_list, and RSBAC_RES_MAX. 00036 { 00037 if(!name) 00038 return(NULL); 00039 if(value > RSBAC_RES_MAX) 00040 strcpy(name, "ERROR!"); 00041 else 00042 strcpy(name, res_list[value]); 00043 return(name); 00044 };
|
|
Definition at line 46 of file res_getname.c. References res_list, RSBAC_RES_MAX, and RSBAC_RES_NONE. 00047 { 00048 int i; 00049 00050 if(!name) 00051 return(RSBAC_RES_NONE); 00052 for (i = 0; i <= RSBAC_RES_MAX; i++) 00053 { 00054 if (!strcmp(name, res_list[i])) 00055 { 00056 return(i); 00057 } 00058 } 00059 return(RSBAC_RES_NONE); 00060 };
|
|
Initial value: { "cpu", "fsize", "data", "stack", "core", "rss", "nproc", "nofile", "memlock", "as", "locks", "NONE" } Definition at line 18 of file res_getname.c. Referenced by get_res_name(), and get_res_nr(). |