source: libabac/abac_util.h @ f89b991

mei_rt2
Last change on this file since f89b991 was 2e9455f, checked in by Mei <mei@…>, 11 years ago

1) added namespace
2) tweak ?This,
3) allowing linking role/oset as constraining conditions
4) adding access_tests regression testing that uses GENI's access policy
5) added couple multi contexts regression tests
6) add compression/uncompression calls to abac_encode_string/abac_decode_string
(libstrongwan only allows 512 char for attribute rule storage)
7) add attribute_now option to creddy that takes a whole char string for attribute
rule

  • Property mode set to 100644
File size: 905 bytes
Line 
1#ifndef __ABAC_UTIL_H__
2#define __ABAC_UTIL_H__
3
4#include <sys/types.h>
5
6#include <chunk.h>
7
8#ifndef ABAC_VERSION
9#define ABAC_VERSION "0.2.4"
10#endif
11
12#ifdef DEBUG
13#define DEBUG_PRINTF(...) {if(debug) fprintf(stderr, __VA_ARGS__); }
14#else
15#define DEBUG_PRINTF(...) {/*no op*/}
16#endif
17
18/* exported from abac_util */
19extern char *abac_version();
20extern char *prologIt(char *);
21extern void *abac_xmalloc(size_t);
22extern void *abac_xrealloc(void*,size_t);
23extern char *abac_xstrdup(char*);
24extern char *abac_trim_quotes(char*);
25extern void abac_split(char*, char*, char**, int*);
26extern int abac_validate_clean_name(char*);
27extern int abac_validate_clean_aspect_name(char*);
28extern chunk_t abac_generate_serial();
29extern void abac_clean_string(char *);
30
31extern int file_exist(char*);
32extern chunk_t extract_potato(char*, char*);
33extern void abac_errx(int eval, const char *msg);
34
35#endif /* __ABAC_UTIL_H__ */
Note: See TracBrowser for help on using the repository browser.