/daten/src/linux-2.4.27-rsbac-v1.2.3/include/rsbac/helpers.h

Go to the documentation of this file.
00001 /************************************* */ 00002 /* Rule Set Based Access Control */ 00003 /* Author and (c) 1999-2004: Amon Ott */ 00004 /* Helper functions for all parts */ 00005 /* Last modified: 08/Mar/2004 */ 00006 /************************************* */ 00007 00008 #ifndef __RSBAC_HELPER_H 00009 #define __RSBAC_HELPER_H 00010 00011 #include <linux/types.h> 00012 #include <rsbac/types.h> 00013 00014 char * inttostr(char[], int); 00015 00016 char * ulongtostr(char[], u_long); 00017 00018 /* convert u_long_long to binary string representation for MAC module */ 00019 char * u64tostrmac(char[], __u64); 00020 00021 #ifndef __KERNEL__ 00022 char * get_user_name(rsbac_uid_t user, char * name); 00023 00024 int rsbac_get_uid_name(rsbac_uid_t * uid, char * name, char * sourcename); 00025 00026 int rsbac_get_fullname(char * fullname, rsbac_uid_t uid); 00027 00028 static inline int rsbac_get_uid(rsbac_uid_t * uid, char * sourcename) 00029 { 00030 return rsbac_get_uid_name(uid, NULL, sourcename); 00031 } 00032 00033 /* covert u_long_long to binary string representation for log array */ 00034 char * u64tostrlog(char[], __u64); 00035 /* and back */ 00036 __u64 strtou64log(char[], __u64 *); 00037 00038 /* convert u_long_long to binary string representation for MAC module */ 00039 /* and back */ 00040 __u64 strtou64mac(char[], __u64 *); 00041 00042 /* covert u_long_long to binary string representation for RC module */ 00043 char * u64tostrrc(char[], __u64); 00044 /* and back */ 00045 __u64 strtou64rc(char[], __u64 *); 00046 00047 /* covert u_long_long to binary string representation for RC module / rights */ 00048 char * u64tostrrcr(char[], __u64); 00049 /* and back */ 00050 __u64 strtou64rcr(char[], __u64 *); 00051 00052 /* ACL back */ 00053 __u64 strtou64acl(char[], __u64 *); 00054 #endif 00055 00056 /* covert u_long_long to binary string representation for ACL module */ 00057 char * u64tostracl(char[], __u64); 00058 00059 char * longtostr(char[], long); 00060 00061 #ifdef __KERNEL__ 00062 int rsbac_get_owner(rsbac_uid_t * user_p); 00063 00064 int rsbac_put_user(unsigned char *, unsigned char *, int); 00065 00066 int rsbac_get_user(unsigned char *, unsigned char *, int); 00067 00068 extern inline void clear_user_buf(char * ubuf, int len); 00069 00070 char * rsbac_getname(const char *); 00071 00072 void rsbac_putname(const char *); 00073 00074 void rsbac_get_attr_error(char * , enum rsbac_adf_request_t); 00075 00076 void rsbac_ds_get_error(char * function, enum rsbac_attribute_t attr); 00077 void rsbac_ds_set_error(char * function, enum rsbac_attribute_t attr); 00078 00079 #ifdef CONFIG_RSBAC_RC 00080 void rsbac_rc_ds_get_error(char * function, enum rsbac_rc_item_t item); 00081 void rsbac_rc_ds_set_error(char * function, enum rsbac_rc_item_t item); 00082 #endif 00083 00084 #endif /* KERNEL */ 00085 00086 #endif

Generated on Tue Aug 31 10:05:22 2004 for RSBAC by doxygen 1.3.8