2007-07-28 15:41:04 +00:00
|
|
|
%module LibAppArmor
|
|
|
|
|
|
|
|
%{
|
|
|
|
#include "aalogparse.h"
|
2011-02-22 03:54:35 -08:00
|
|
|
#include "apparmor.h"
|
2007-07-28 15:41:04 +00:00
|
|
|
|
|
|
|
%}
|
|
|
|
|
|
|
|
%include "typemaps.i"
|
|
|
|
%include "aalogparse.h"
|
2011-02-22 03:54:35 -08:00
|
|
|
|
|
|
|
/* swig doesn't like the macro magic we do in apparmor.h so the fn prototypes
|
|
|
|
* are manually inserted here
|
|
|
|
*/
|
|
|
|
|
2011-08-09 06:48:56 -07:00
|
|
|
extern int aa_is_enabled(void);
|
2011-08-09 06:48:17 -07:00
|
|
|
extern int aa_find_mountpoint(char **mnt);
|
2007-08-16 04:26:19 +00:00
|
|
|
extern int aa_change_hat(const char *subprofile, unsigned long magic_token);
|
2011-02-22 03:54:35 -08:00
|
|
|
extern int aa_change_profile(const char *profile);
|
|
|
|
extern int aa_change_onexec(const char *profile);
|
2011-02-22 03:55:16 -08:00
|
|
|
extern int aa_change_hatv(const char *subprofiles[], unsigned long token);
|
|
|
|
extern int aa_change_hat_vargs(unsigned long token, int count, ...);
|
2011-08-09 06:45:51 -07:00
|
|
|
extern int aa_getprocattr_raw(pid_t tid, const char *attr, char *buf, int len,
|
|
|
|
char **mode);
|
|
|
|
extern int aa_getprocattr(pid_t tid, const char *attr, char **buf, char **mode);
|
2011-08-09 06:47:40 -07:00
|
|
|
extern int aa_gettaskcon(pid_t target, char **con, char **mode);
|
|
|
|
extern int aa_getcon(char **con, char **mode);
|
2013-06-25 15:54:17 -07:00
|
|
|
extern int aa_getpeercon_raw(int fd, char *buffer, int *size, char **mode);
|
|
|
|
extern int aa_getpeercon(int fd, char **con, char **mode);
|