helpers.c File Reference

#include <rsbac/types.h>
#include <rsbac/error.h>
#include <rsbac/helpers.h>
#include <rsbac/rc_types.h>
#include <rsbac/getname.h>
#include <rsbac/cap_getname.h>
#include <stdio.h>
#include <string.h>
#include <pwd.h>
#include <grp.h>

Go to the source code of this file.

Functions

char * inttostr (char *str, int i)
char * ulongtostr (char *str, u_long i)
char * longtostr (char *str, long i)
char * u64tostrmac (char *str, __u64 i)
void error_exit (int error)
void show_error (int error)
int rsbac_get_uid_name (rsbac_uid_t *uid, char *name, char *sourcename)
int rsbac_get_fullname (char *fullname, rsbac_uid_t uid)
char * get_user_name (rsbac_uid_t user, char *name)
int rsbac_get_gid_name (rsbac_gid_t *gid, char *name, char *sourcename)
char * u64tostrlog (char *str, __u64 i)
__u64 strtou64log (char *str, __u64 *i_p)
char * u64tostrrc (char *str, __u64 i)
__u64 strtou64rc (char *str, __u64 *i_p)
char * u64tostrrcr (char *str, __u64 i)
__u64 strtou64rcr (char *str, __u64 *i_p)
__u64 strtou64mac (char *str, __u64 *i_p)
__u64 strtou64acl (char *str, __u64 *i_p)
char * u64tostracl (char *str, __u64 i)
char * u32tostrcap (char *str, __u32 i)
__u32 strtou32cap (char *str, __u32 *i_p)


Function Documentation

void error_exit int  error  ) 
 

Definition at line 167 of file helpers.c.

References get_error_name().

char* get_user_name rsbac_uid_t  user,
char *  name
 

Definition at line 241 of file helpers.c.

char* inttostr char *  str,
int  i
 

Definition at line 36 of file helpers.c.

References NULL.

Referenced by acl_detach_fd_lists(), acl_register_fd_lists(), auth_detach_fd_lists(), auth_register_fd_lists(), get_error_name(), get_target_name(), mac_detach_fd_lists(), and mac_register_fd_lists().

char* longtostr char *  str,
long  i
 

Definition at line 106 of file helpers.c.

References NULL.

int rsbac_get_fullname char *  fullname,
rsbac_uid_t  uid
 

Definition at line 223 of file helpers.c.

References RSBAC_EINVALIDPOINTER.

int rsbac_get_gid_name rsbac_gid_t gid,
char *  name,
char *  sourcename
 

Definition at line 256 of file helpers.c.

References RSBAC_EINVALIDVALUE.

Referenced by rsbac_get_gid().

int rsbac_get_uid_name rsbac_uid_t uid,
char *  name,
char *  sourcename
 

Definition at line 190 of file helpers.c.

References RSBAC_EINVALIDVALUE.

Referenced by rsbac_get_uid().

void show_error int  error  ) 
 

Definition at line 179 of file helpers.c.

References get_error_name().

__u32 strtou32cap char *  str,
__u32 *  i_p
 

Definition at line 531 of file helpers.c.

References CAP_NONE.

__u64 strtou64acl char *  str,
__u64 *  i_p
 

Definition at line 459 of file helpers.c.

References ACLR_NONE.

__u64 strtou64log char *  str,
__u64 *  i_p
 

Definition at line 312 of file helpers.c.

References R_NONE.

__u64 strtou64mac char *  str,
__u64 *  i_p
 

Definition at line 432 of file helpers.c.

References RSBAC_MAC_MAX_CAT, and RSBAC_MAC_NR_CATS.

__u64 strtou64rc char *  str,
__u64 *  i_p
 

Definition at line 361 of file helpers.c.

__u64 strtou64rcr char *  str,
__u64 *  i_p
 

Definition at line 405 of file helpers.c.

References RCR_NONE.

char* u32tostrcap char *  str,
__u32  i
 

Definition at line 509 of file helpers.c.

References CAP_NONE, and NULL.

char* u64tostracl char *  str,
__u64  i
 

Definition at line 487 of file helpers.c.

References ACLR_NONE, and NULL.

Referenced by rsbac_acl_sys_add_to_acl_entry(), rsbac_acl_sys_remove_from_acl_entry(), rsbac_acl_sys_set_acl_entry(), and rsbac_acl_sys_set_mask().

char* u64tostrlog char *  str,
__u64  i
 

Definition at line 290 of file helpers.c.

References NULL, and R_NONE.

char* u64tostrmac char *  str,
__u64  i
 

Definition at line 143 of file helpers.c.

References NULL, RSBAC_MAC_MAX_CAT, and RSBAC_MAC_NR_CATS.

Referenced by auto_read_attr(), auto_read_write_attr(), auto_write_attr(), and rsbac_mac_set_curr_level().

char* u64tostrrc char *  str,
__u64  i
 

Definition at line 339 of file helpers.c.

References NULL.

char* u64tostrrcr char *  str,
__u64  i
 

Definition at line 383 of file helpers.c.

References NULL, and RCR_NONE.

char* ulongtostr char *  str,
u_long  i
 

Definition at line 75 of file helpers.c.

References NULL.

Referenced by get_target_name().


Generated on Fri Jun 17 09:45:30 2005 for RSBAC by  doxygen 1.4.2