Lines Matching refs:file
214 static int smk_bu_file(struct file *file, int mode, int rc) in smk_bu_file() argument
218 struct inode *inode = file_inode(file); in smk_bu_file()
234 inode->i_sb->s_id, inode->i_ino, file, in smk_bu_file()
239 #define smk_bu_file(file, mode, RC) (RC) argument
243 static int smk_bu_credfile(const struct cred *cred, struct file *file, in smk_bu_credfile() argument
248 struct inode *inode = file_inode(file); in smk_bu_credfile()
264 inode->i_sb->s_id, inode->i_ino, file, in smk_bu_credfile()
269 #define smk_bu_credfile(cred, file, mode, RC) (RC) argument
908 struct inode *inode = file_inode(bprm->file); in smack_bprm_set_creds()
1536 static int smack_file_alloc_security(struct file *file) in smack_file_alloc_security() argument
1538 struct smack_known **blob = smack_file(file); in smack_file_alloc_security()
1554 static int smack_file_ioctl(struct file *file, unsigned int cmd, in smack_file_ioctl() argument
1559 struct inode *inode = file_inode(file); in smack_file_ioctl()
1565 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_ioctl()
1569 rc = smk_bu_file(file, MAY_WRITE, rc); in smack_file_ioctl()
1574 rc = smk_bu_file(file, MAY_READ, rc); in smack_file_ioctl()
1587 static int smack_file_lock(struct file *file, unsigned int cmd) in smack_file_lock() argument
1591 struct inode *inode = file_inode(file); in smack_file_lock()
1597 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_lock()
1599 rc = smk_bu_file(file, MAY_LOCK, rc); in smack_file_lock()
1615 static int smack_file_fcntl(struct file *file, unsigned int cmd, in smack_file_fcntl() argument
1620 struct inode *inode = file_inode(file); in smack_file_fcntl()
1631 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_fcntl()
1633 rc = smk_bu_file(file, MAY_LOCK, rc); in smack_file_fcntl()
1638 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_fcntl()
1640 rc = smk_bu_file(file, MAY_WRITE, rc); in smack_file_fcntl()
1659 static int smack_mmap_file(struct file *file, in smack_mmap_file() argument
1675 if (file == NULL) in smack_mmap_file()
1678 if (unlikely(IS_PRIVATE(file_inode(file)))) in smack_mmap_file()
1681 isp = smack_inode(file_inode(file)); in smack_mmap_file()
1684 sbsp = file_inode(file)->i_sb->s_security; in smack_mmap_file()
1766 static void smack_file_set_fowner(struct file *file) in smack_file_set_fowner() argument
1768 struct smack_known **blob = smack_file(file); in smack_file_set_fowner()
1791 struct file *file; in smack_file_send_sigiotask() local
1798 file = container_of(fown, struct file, f_owner); in smack_file_send_sigiotask()
1801 blob = smack_file(file); in smack_file_send_sigiotask()
1824 static int smack_file_receive(struct file *file) in smack_file_receive() argument
1829 struct inode *inode = file_inode(file); in smack_file_receive()
1838 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_receive()
1851 rc = smk_bu_file(file, may, rc); in smack_file_receive()
1855 rc = smk_bu_file(file, may, rc); in smack_file_receive()
1861 if (file->f_mode & FMODE_READ) in smack_file_receive()
1863 if (file->f_mode & FMODE_WRITE) in smack_file_receive()
1867 rc = smk_bu_file(file, may, rc); in smack_file_receive()
1882 static int smack_file_open(struct file *file) in smack_file_open() argument
1884 struct task_smack *tsp = smack_cred(file->f_cred); in smack_file_open()
1885 struct inode *inode = file_inode(file); in smack_file_open()
1890 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_open()
1892 rc = smk_bu_credfile(file->f_cred, file, MAY_READ, rc); in smack_file_open()