Function report | 
Source Code:security\smack\smack_lsm.c | 
Create Date:2022-07-28 19:21:26 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:smack_mmap_file :* Check permissions for a mmap operation. The @file may be NULL, e.g.* if mapping anonymous memory.*@file contains the file structure for file to map (may be NULL).*@reqprot contains the protection requested by the application.
Proto:static int smack_mmap_file(struct file *file, unsigned long reqprot, unsigned long prot, unsigned long flags)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct file * | file | |
| unsigned long | reqprot | |
| unsigned long | prot | |
| unsigned long | flags | 
| 1673 | If (file == NULL) Then Return 0 | 
| 1676 | If Value for the false possibility is greater at compile time(IS_PRIVATE(file_inode(file))) Then Return 0 | 
| 1679 | isp = smack_inode(file_inode(file)) | 
| 1680 | If (label of the mmap domain == NULL) Then Return 0 | 
| 1682 | sbsp = s_security | 
| 1683 | If smk_flags & SMK_SB_UNTRUSTED && label of the mmap domain != smk_root Then Return -EACCES | 
| 1686 | mkp = label of the mmap domain | 
| 1688 | 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.()) | 
| 1690 | rc = 0 | 
| 1699 | okp = smk_object | 
| 1712 | If may == -ENOENT Then may = smk_access | 
| 1714 | Else may &= smk_access | 
| 1720 | If may == 0 Then Continue | 
| 1756 | 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  |