perms.h (5fe9cfbe44b6892e17f803125c4761221b0175c6) perms.h (56974a6fcfef69ee0825bd66ed13e92070ac5224)
1/*
2 * AppArmor security module
3 *
4 * This file contains AppArmor basic permission sets definitions.
5 *
6 * Copyright 2017 Canonical Ltd.
7 *
8 * This program is free software; you can redistribute it and/or

--- 124 unchanged lines hidden (view full) ---

133#define xcheck_labels_profiles(L1, L2, FN, args...) \
134 xcheck_ns_labels((L1), (L2), xcheck_ns_profile_label, (FN), args)
135
136#define xcheck_labels(L1, L2, P, FN1, FN2) \
137 xcheck(fn_for_each((L1), (P), (FN1)), fn_for_each((L2), (P), (FN2)))
138
139
140void aa_perm_mask_to_str(char *str, const char *chrs, u32 mask);
1/*
2 * AppArmor security module
3 *
4 * This file contains AppArmor basic permission sets definitions.
5 *
6 * Copyright 2017 Canonical Ltd.
7 *
8 * This program is free software; you can redistribute it and/or

--- 124 unchanged lines hidden (view full) ---

133#define xcheck_labels_profiles(L1, L2, FN, args...) \
134 xcheck_ns_labels((L1), (L2), xcheck_ns_profile_label, (FN), args)
135
136#define xcheck_labels(L1, L2, P, FN1, FN2) \
137 xcheck(fn_for_each((L1), (P), (FN1)), fn_for_each((L2), (P), (FN2)))
138
139
140void aa_perm_mask_to_str(char *str, const char *chrs, u32 mask);
141void aa_audit_perm_names(struct audit_buffer *ab, const char **names, u32 mask);
141void aa_audit_perm_names(struct audit_buffer *ab, const char * const *names,
142 u32 mask);
142void aa_audit_perm_mask(struct audit_buffer *ab, u32 mask, const char *chrs,
143void aa_audit_perm_mask(struct audit_buffer *ab, u32 mask, const char *chrs,
143 u32 chrsmask, const char **names, u32 namesmask);
144 u32 chrsmask, const char * const *names, u32 namesmask);
144void aa_apply_modes_to_perms(struct aa_profile *profile,
145 struct aa_perms *perms);
146void aa_compute_perms(struct aa_dfa *dfa, unsigned int state,
147 struct aa_perms *perms);
148void aa_perms_accum(struct aa_perms *accum, struct aa_perms *addend);
149void aa_perms_accum_raw(struct aa_perms *accum, struct aa_perms *addend);
150void aa_profile_match_label(struct aa_profile *profile, struct aa_label *label,
151 int type, u32 request, struct aa_perms *perms);
152int aa_profile_label_perm(struct aa_profile *profile, struct aa_profile *target,
153 u32 request, int type, u32 *deny,
154 struct common_audit_data *sa);
155int aa_check_perms(struct aa_profile *profile, struct aa_perms *perms,
156 u32 request, struct common_audit_data *sa,
157 void (*cb)(struct audit_buffer *, void *));
158#endif /* __AA_PERM_H */
145void aa_apply_modes_to_perms(struct aa_profile *profile,
146 struct aa_perms *perms);
147void aa_compute_perms(struct aa_dfa *dfa, unsigned int state,
148 struct aa_perms *perms);
149void aa_perms_accum(struct aa_perms *accum, struct aa_perms *addend);
150void aa_perms_accum_raw(struct aa_perms *accum, struct aa_perms *addend);
151void aa_profile_match_label(struct aa_profile *profile, struct aa_label *label,
152 int type, u32 request, struct aa_perms *perms);
153int aa_profile_label_perm(struct aa_profile *profile, struct aa_profile *target,
154 u32 request, int type, u32 *deny,
155 struct common_audit_data *sa);
156int aa_check_perms(struct aa_profile *profile, struct aa_perms *perms,
157 u32 request, struct common_audit_data *sa,
158 void (*cb)(struct audit_buffer *, void *));
159#endif /* __AA_PERM_H */