Function report |
Source Code:security\tomoyo\audit.c |
Create Date:2022-07-28 19:32:54 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:moyo_print_bprm - Print "struct linux_binprm" for auditing
Proto:static char *tomoyo_print_bprm(struct linux_binprm *bprm, struct tomoyo_page_dump *dump)
Type:char
Parameter:
Type | Parameter | Name |
---|---|---|
struct linux_binprm * | bprm | |
struct tomoyo_page_dump * | dump |
25 | tomoyo_buffer_len = 4096 * 2 |
26 | buffer = 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). |
30 | pos = current top of mem |
32 | argv_count = argc |
33 | envp_count = envc |
34 | bool truncated = false |
36 | If Not buffer Then Return NULL |
40 | If Not argv_count Then |
44 | last_start = cp |
45 | When argv_count || envp_count cycle |
46 | If Not tomoyo_dump_page(bprm, pos, dump) Then Go to out |
54 | If cp == last_start Then cp++ = '"' |
56 | If cp >= buffer + tomoyo_buffer_len - 32 Then |
58 | truncated = true |
59 | Else if c == '\\' Then |
64 | Else if Not c Then |
68 | Else |
74 | If c Then Continue |
76 | If argv_count Then |
77 | If --argv_count == 0 Then |
88 | Else if envp_count Then |
89 | If --envp_count == 0 Then |
97 | If Not argv_count && Not envp_count Then Break |
100 | offset = 0 |
102 | cp++ = '}' |
103 | cp = '\0' |
104 | Return buffer |
105 | out : |
108 | Return buffer |
Name | Describe |
---|---|
tomoyo_init_log | moyo_init_log - Allocate buffer for audit logs |
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 |