Function report |
Source Code:security\tomoyo\securityfs_if.c |
Create Date:2022-07-28 19:46:24 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:moyo_write_self - write() for /sys/kernel/security/tomoyo/self_domain interface
Proto:static ssize_t tomoyo_write_self(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 |
47 | If Not count || count >= TOMOYO_EXEC_TMPSIZE - 10 Then Return -ENOMEM |
49 | 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. |
53 | If tomoyo_correct_domain(data) Then |
54 | idx = moyo_read_lock - Take lock for protecting policy.* Returns index number for tomoyo_read_unlock(). |
59 | tomoyo_fill_path_info( & name) |
63 | domainname = name |
67 | Else |
70 | If Not new_domain Then |
72 | Else |
73 | s = moyo_task - Get "struct tomoyo_task" for specified thread.*@task - Pointer to "struct task_struct".* Returns pointer to "struct tomoyo_task" for specified thread. |
74 | old_domain = domain_info |
77 | domain_info = new_domain |
78 | atomic_inc( & Number of referring tasks. ) |
79 | atomic_dec( & Number of referring tasks. ) |
80 | error = 0 |
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 |