Function report |
Source Code:security\selinux\selinuxfs.c |
Create Date:2022-07-28 19:04:50 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:sel_write_validatetrans
Proto:static ssize_t sel_write_validatetrans(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
Type:ssize_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | file | |
| const char __user * | buf | |
| size_t | count | |
| loff_t * | ppos |
| 684 | char * req = NULL |
| 704 | req = memdup_user_nul - duplicate memory region from user space and NUL-terminate*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure. |
| 712 | oldcon = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 716 | newcon = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 720 | taskcon = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 725 | If sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments != 4 Then Go to out |
| 728 | rc = security_context_str_to_sid(state, oldcon, & osid, GFP_KERNEL) |
| 732 | rc = security_context_str_to_sid(state, newcon, & nsid, GFP_KERNEL) |
| 736 | rc = security_context_str_to_sid(state, taskcon, & tsid, GFP_KERNEL) |
| 743 | out : |
| 748 | 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 |