• Home
  • Raw
  • Download

Lines Matching refs:file

341 	init_debug("file blob size       = %d\n", blob_sizes.lbs_file);
560 * lsm_file_alloc - allocate a composite file blob
561 * @file: the file that needs a blob
563 * Allocate the file blob for all the modules
567 static int lsm_file_alloc(struct file *file)
570 file->f_security = NULL;
574 file->f_security = kmem_cache_zalloc(lsm_file_cache, GFP_KERNEL);
575 if (file->f_security == NULL)
770 const struct cred *to, struct file *file)
772 return call_int_hook(binder_transfer_file, 0, from, to, file);
859 int security_bprm_creds_from_file(struct linux_binprm *bprm, struct file *file)
861 return call_int_hook(bprm_creds_from_file, 0, bprm, file);
1518 int security_file_permission(struct file *file, int mask)
1522 ret = call_int_hook(file_permission, 0, file, mask);
1526 return fsnotify_perm(file, mask);
1529 int security_file_alloc(struct file *file)
1531 int rc = lsm_file_alloc(file);
1535 rc = call_int_hook(file_alloc_security, 0, file);
1537 security_file_free(file);
1541 void security_file_free(struct file *file)
1545 call_void_hook(file_free_security, file);
1547 blob = file->f_security;
1549 file->f_security = NULL;
1554 int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1556 return call_int_hook(file_ioctl, 0, file, cmd, arg);
1562 * @file: associated file
1571 int security_file_ioctl_compat(struct file *file, unsigned int cmd,
1574 return call_int_hook(file_ioctl_compat, 0, file, cmd, arg);
1578 static inline unsigned long mmap_prot(struct file *file, unsigned long prot)
1591 if (!file)
1597 if (!path_noexec(&file->f_path)) {
1599 if (file->f_op->mmap_capabilities) {
1600 unsigned caps = file->f_op->mmap_capabilities(file);
1611 int security_mmap_file(struct file *file, unsigned long prot,
1614 unsigned long prot_adj = mmap_prot(file, prot);
1617 ret = call_int_hook(mmap_file, 0, file, prot, prot_adj, flags);
1620 return ima_file_mmap(file, prot, prot_adj, flags);
1639 int security_file_lock(struct file *file, unsigned int cmd)
1641 return call_int_hook(file_lock, 0, file, cmd);
1644 int security_file_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
1646 return call_int_hook(file_fcntl, 0, file, cmd, arg);
1649 void security_file_set_fowner(struct file *file)
1651 call_void_hook(file_set_fowner, file);
1660 int security_file_receive(struct file *file)
1662 return call_int_hook(file_receive, 0, file);
1665 int security_file_open(struct file *file)
1669 ret = call_int_hook(file_open, 0, file);
1673 return fsnotify_perm(file, MAY_OPEN);
1769 int security_kernel_read_file(struct file *file, enum kernel_read_file_id id,
1774 ret = call_int_hook(kernel_read_file, 0, file, id, contents);
1777 return ima_read_file(file, id, contents);
1781 int security_kernel_post_read_file(struct file *file, char *buf, loff_t size,
1786 ret = call_int_hook(kernel_post_read_file, 0, file, buf, size, id);
1789 return ima_post_read_file(file, buf, size, id);