Function report |
Source Code:security\safesetid\securityfs.c |
Create Date:2022-07-28 19:55:34 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:handle_policy_update
Proto:static ssize_t handle_policy_update(struct file *file, const char __user *ubuf, size_t len)
Type:ssize_t
Parameter:
Type | Parameter | Name |
---|---|---|
struct file * | file | |
const char __user * | ubuf | |
size_t | len |
117 | pol = Allocation memory |
120 | policy_str = NULL |
123 | p = buf = 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. |
126 | Go to out_free_pol |
129 | If (policy_str == NULL) Then |
131 | Go to out_free_buf |
138 | end = strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for |
139 | If (end == NULL) Then |
141 | Go to out_free_buf |
143 | end = '\0' |
145 | rule = Allocation memory |
146 | If Not rule Then |
148 | Go to out_free_buf |
152 | If err Then Go to out_free_rule |
162 | insert_rule(pol, rule) |
164 | Continue |
166 | out_free_rule : |
168 | Go to out_free_buf |
171 | err = verify_ruleset(pol) |
173 | If err && err != -EINVAL Then Go to out_free_buf |
181 | mutex_lock( & policy_update_lock) |
187 | out_free_buf : |
189 | out_free_pol : |
190 | If pol Then release_ruleset(pol) |
192 | Return err |
Name | Describe |
---|---|
safesetid_file_write |
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 |