Function report |
Source Code:security\smack\smackfs.c |
Create Date:2022-07-28 19:28:00 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:smk_write_net6addr - write() for /smack/netlabel*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start* Accepts only one net6addr per write call
Proto:static ssize_t smk_write_net6addr(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 |
1391 | struct smack_known * skp = NULL |
1394 | rc = 0 |
1395 | found = 0 |
1399 | mask = 128 |
1412 | If count < Value for parsing single label host rules* "1.2.3.4 X" Then Return -EINVAL |
1415 | data = 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. |
1419 | smack = 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). |
1420 | If (smack == NULL) Then |
1422 | Go to free_data_out |
1425 | i = sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments |
1429 | If i != 10 Then |
1430 | i = sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments |
1434 | If i != 9 Then |
1439 | If mask > 128 Then |
1454 | If smack[0] != '-' Then |
1460 | Else |
1486 | mutex_lock( & smk_net6addr_lock) |
1500 | If found == 1 Then Break |
1503 | If found == 0 Then |
1504 | snp = 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). |
1507 | Else |
1514 | Else |
1523 | free_out : |
1525 | free_data_out : |
1528 | 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 |