• Home
  • Raw
  • Download

Lines Matching refs:file

407 static int apparmor_file_open(struct file *file)  in apparmor_file_open()  argument
409 struct aa_file_ctx *fctx = file_ctx(file); in apparmor_file_open()
413 if (!path_mediated_fs(file->f_path.dentry)) in apparmor_file_open()
426 label = aa_get_newest_cred_label(file->f_cred); in apparmor_file_open()
428 struct user_namespace *mnt_userns = file_mnt_user_ns(file); in apparmor_file_open()
429 struct inode *inode = file_inode(file); in apparmor_file_open()
435 error = aa_path_perm(OP_OPEN, label, &file->f_path, 0, in apparmor_file_open()
436 aa_map_file_to_perms(file), &cond); in apparmor_file_open()
438 fctx->allow = aa_map_file_to_perms(file); in apparmor_file_open()
445 static int apparmor_file_alloc_security(struct file *file) in apparmor_file_alloc_security() argument
447 struct aa_file_ctx *ctx = file_ctx(file); in apparmor_file_alloc_security()
456 static void apparmor_file_free_security(struct file *file) in apparmor_file_free_security() argument
458 struct aa_file_ctx *ctx = file_ctx(file); in apparmor_file_free_security()
464 static int common_file_perm(const char *op, struct file *file, u32 mask, in common_file_perm() argument
471 if (file->f_path.dentry == aa_null.dentry) in common_file_perm()
475 error = aa_file_perm(op, label, file, mask, in_atomic); in common_file_perm()
481 static int apparmor_file_receive(struct file *file) in apparmor_file_receive() argument
483 return common_file_perm(OP_FRECEIVE, file, aa_map_file_to_perms(file), in apparmor_file_receive()
487 static int apparmor_file_permission(struct file *file, int mask) in apparmor_file_permission() argument
489 return common_file_perm(OP_FPERM, file, mask, false); in apparmor_file_permission()
492 static int apparmor_file_lock(struct file *file, unsigned int cmd) in apparmor_file_lock() argument
499 return common_file_perm(OP_FLOCK, file, mask, false); in apparmor_file_lock()
502 static int common_mmap(const char *op, struct file *file, unsigned long prot, in common_mmap() argument
507 if (!file || !file_ctx(file)) in common_mmap()
521 return common_file_perm(op, file, mask, in_atomic); in common_mmap()
524 static int apparmor_mmap_file(struct file *file, unsigned long reqprot, in apparmor_mmap_file() argument
527 return common_mmap(OP_FMMAP, file, prot, flags, GFP_ATOMIC); in apparmor_mmap_file()