2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 10:07:12 +00:00
John Johansen 4e712f6c8d split routines for loading binary policy into its own file
Signed-off-by: John Johansen <john.johansen@canonical.com>
[tyhicks: Handle inverted return from find_subdomainfs_mountpoint()]
[tyhicks: Link test progs to libapparmor to fix make check build fail]
[tyhicks: Migrate from opendir() to open() for opening apparmorfs]
[tyhicks: Make some of the split out functions static]
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2015-03-25 17:09:26 -05:00

23 lines
683 B
C

#ifndef __AA_LIB_H_
#define __AA_LIB_H_
#include <dirent.h>
#define autofree __attribute((cleanup(__autofree)))
#define autoclose __attribute((cleanup(__autoclose)))
#define autofclose __attribute((cleanup(__autofclose)))
void __autofree(void *p);
void __autoclose(int *fd);
void __autofclose(FILE **f);
int dirat_for_each(DIR *dir, const char *name, void *data,
int (* cb)(DIR *, const char *, struct stat *, void *));
int isodigit(char c);
long strntol(const char *str, const char **endptr, int base, long maxval,
size_t n);
int strn_escseq(const char **pos, const char *chrs, size_t n);
int str_escseq(const char **pos, const char *chrs);
#endif /* __AA_LIB_H_ */