Home | History | Annotate | Download | only in semanage
      1 /* Copyright (C) 2005 Red Hat, Inc. */
      2 
      3 #ifndef _SEMANAGE_SEUSER_RECORD_H_
      4 #define _SEMANAGE_SEUSER_RECORD_H_
      5 
      6 #include <semanage/handle.h>
      7 
      8 struct semanage_seuser;
      9 struct semanage_seuser_key;
     10 typedef struct semanage_seuser semanage_seuser_t;
     11 typedef struct semanage_seuser_key semanage_seuser_key_t;
     12 
     13 /* Key */
     14 extern int semanage_seuser_key_create(semanage_handle_t * handle,
     15 				      const char *name,
     16 				      semanage_seuser_key_t ** key);
     17 
     18 extern int semanage_seuser_key_extract(semanage_handle_t * handle,
     19 				       const semanage_seuser_t * seuser,
     20 				       semanage_seuser_key_t ** key);
     21 
     22 extern void semanage_seuser_key_free(semanage_seuser_key_t * key);
     23 
     24 extern int semanage_seuser_compare(const semanage_seuser_t * seuser,
     25 				   const semanage_seuser_key_t * key);
     26 
     27 extern int semanage_seuser_compare2(const semanage_seuser_t * seuser,
     28 				    const semanage_seuser_t * seuser2);
     29 
     30 /* Name */
     31 extern const char *semanage_seuser_get_name(const semanage_seuser_t * seuser);
     32 
     33 extern int semanage_seuser_set_name(semanage_handle_t * handle,
     34 				    semanage_seuser_t * seuser,
     35 				    const char *name);
     36 
     37 /* Selinux Name */
     38 extern const char *semanage_seuser_get_sename(const semanage_seuser_t * seuser);
     39 
     40 extern int semanage_seuser_set_sename(semanage_handle_t * handle,
     41 				      semanage_seuser_t * seuser,
     42 				      const char *sename);
     43 
     44 /* MLS */
     45 extern const char *semanage_seuser_get_mlsrange(const semanage_seuser_t *
     46 						seuser);
     47 
     48 extern int semanage_seuser_set_mlsrange(semanage_handle_t * handle,
     49 					semanage_seuser_t * seuser,
     50 					const char *mls_range);
     51 
     52 /* Create/Clone/Destroy */
     53 extern int semanage_seuser_create(semanage_handle_t * handle,
     54 				  semanage_seuser_t ** seuser_ptr);
     55 
     56 extern int semanage_seuser_clone(semanage_handle_t * handle,
     57 				 const semanage_seuser_t * seuser,
     58 				 semanage_seuser_t ** seuser_ptr);
     59 
     60 extern void semanage_seuser_free(semanage_seuser_t * seuser);
     61 #endif
     62