Lines Matching defs:file
5 * This file contains AppArmor file mediation function definitions.
32 static inline struct aa_file_ctx *file_ctx(struct file *file)
34 return file->f_security + apparmor_blob_sizes.lbs_file;
37 /* struct aa_file_ctx - the AppArmor context the file was opened in
40 * @perms: the permission the file was opened with
50 * @label: initial label of task creating the file
132 struct aa_label *label, struct file *file,
139 * aa_map_file_perms - map file flags to AppArmor permissions
140 * @file: open file to map flags to AppArmor permissions
142 * Returns: apparmor permission set for the file
144 static inline u32 aa_map_file_to_perms(struct file *file)
146 int flags = file->f_flags;
149 if (file->f_mode & FMODE_WRITE)
151 if (file->f_mode & FMODE_READ)