Function report |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-28 19:21:37 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:smack_file_receive - Smack file receive check*@file: the object* Returns 0 if current has access, error code otherwise
Proto:static int smack_file_receive(struct file *file)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct file * | file |
1825 | may = 0 |
1827 | inode = file_inode(file) |
1832 | If Value for the false possibility is greater at compile time(IS_PRIVATE(inode)) Then Return 0 |
1836 | smk_ad_setfield_u_fs_path( & ad, f_path) |
1838 | If s_magic == SOCKFS_MAGIC Then |
1840 | ssp = sk_security |
1841 | tsp = smack_cred(current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.()) |
1848 | rc = smk_access( label for access control , outbound label , MAY_WRITE, & ad) |
1849 | rc = smk_bu_file(file, may, rc) |
1852 | rc = smk_access( inbound label , label for access control , MAY_WRITE, & ad) |
1853 | rc = smk_bu_file(file, may, rc) |
1854 | Return rc |
1859 | If f_mode & le is open for reading Then may = MAY_READ |
1861 | If f_mode & le is open for writing Then may |= MAY_WRITE |
1865 | rc = smk_bu_file(file, may, rc) |
1866 | Return rc |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |