#ifndef __AA_FILE_H
#define __AA_FILE_H
#include <linux/spinlock.h>
#include "domain.h"
#include "match.h"
#include "perms.h"
struct aa_policydb;
struct aa_profile;
struct path;
#define mask_mode_t(X) …
#define AA_AUDIT_FILE_MASK …
static inline struct aa_file_ctx *file_ctx(struct file *file)
{ … }
struct aa_file_ctx { … };
#define AA_X_INDEX_MASK …
#define AA_X_TYPE_MASK …
#define AA_X_NONE …
#define AA_X_NAME …
#define AA_X_TABLE …
#define AA_X_UNSAFE …
#define AA_X_CHILD …
#define AA_X_INHERIT …
#define AA_X_UNCONFINED …
struct path_cond { … };
#define COMBINED_PERM_MASK(X) …
int aa_audit_file(const struct cred *cred,
struct aa_profile *profile, struct aa_perms *perms,
const char *op, u32 request, const char *name,
const char *target, struct aa_label *tlabel, kuid_t ouid,
const char *info, int error);
struct aa_perms *aa_lookup_fperms(struct aa_policydb *file_rules,
aa_state_t state, struct path_cond *cond);
aa_state_t aa_str_perms(struct aa_policydb *file_rules, aa_state_t start,
const char *name, struct path_cond *cond,
struct aa_perms *perms);
int aa_path_perm(const char *op, const struct cred *subj_cred,
struct aa_label *label, const struct path *path,
int flags, u32 request, struct path_cond *cond);
int aa_path_link(const struct cred *subj_cred, struct aa_label *label,
struct dentry *old_dentry, const struct path *new_dir,
struct dentry *new_dentry);
int aa_file_perm(const char *op, const struct cred *subj_cred,
struct aa_label *label, struct file *file,
u32 request, bool in_atomic);
void aa_inherit_files(const struct cred *cred, struct files_struct *files);
static inline u32 aa_map_file_to_perms(struct file *file)
{ … }
#endif