Function report |
Source Code:security\tomoyo\condition.c |
Create Date:2022-07-28 19:37:56 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:moyo_scan_bprm - Scan "struct linux_binprm".*@ee: Pointer to "struct tomoyo_execve".*@argc: Length of @argc.*@argv: Pointer to "struct tomoyo_argv".*@envc: Length of @envp.*@envp: Poiner to "struct tomoyo_envp".* Returns true on success, false otherwise.
Proto:static bool tomoyo_scan_bprm(struct tomoyo_execve *ee, const u16 argc, const struct tomoyo_argv *argv, const u16 envc, const struct tomoyo_envp *envp)
Type:bool
Parameter:
Type | Parameter | Name |
---|---|---|
struct tomoyo_execve * | ee | |
const u16 | argc | |
const struct tomoyo_argv * | argv | |
const u16 | envc | |
const struct tomoyo_envp * | envp |
112 | arg_len = 0 |
113 | pos = current top of mem |
115 | argv_count = argc |
116 | envp_count = envc |
117 | bool result = true |
121 | If argc + envc <= size of local_checked Then |
122 | checked = local_checked |
123 | memset(local_checked, 0, size of local_checked ) |
124 | Else |
125 | checked = 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). |
126 | If Not checked Then Return false |
129 | When argv_count || envp_count cycle |
130 | If Not tomoyo_dump_page(bprm, pos, dump) Then |
140 | If c && arg_len < TOMOYO_EXEC_TMPSIZE - 10 Then |
141 | If c == '\\' Then |
146 | Else |
153 | Else |
156 | If c Then Continue |
159 | If argv_count Then |
163 | result = false |
164 | Break |
166 | argv_count-- |
167 | Else if envp_count Then |
168 | cp = 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 |
170 | If cp Then |
179 | envp_count-- |
180 | Else |
181 | Break |
183 | arg_len = 0 |
185 | offset = 0 |
186 | If Not result Then Break |
189 | out : |
190 | If result Then |
220 | If checked != local_checked Then kfree(checked) |
222 | Return result |
Name | Describe |
---|---|
tomoyo_condition | moyo_condition - Check condition part.*@r: Pointer to "struct tomoyo_request_info".*@cond: Pointer to "struct tomoyo_condition". Maybe NULL.* Returns true on success, false otherwise.* Caller holds tomoyo_read_lock(). |
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 |