Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\audit.c Create Date:2022-07-28 19:33:06
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:moyo_print_header - Get header line of audit log.*@r: Pointer to "struct tomoyo_request_info".* Returns string representation.* This function uses kmalloc(), so caller must kfree() if this function* didn't return NULL.

Proto:static char *tomoyo_print_header(struct tomoyo_request_info *r)

Type:char

Parameter:

TypeParameterName
struct tomoyo_request_info *r
153  gpid = task_pid_nr(current process)
154  obj = For holding parameters specific to operations which deal files.* NULL if not dealing files.
155  tomoyo_buffer_len = 4096
156  buffer = Allocation memory
160  If Not buffer Then Return NULL
163  tomoyo_convert_time(ktime_get_real_seconds - Get the seconds portion of CLOCK_REALTIME* Returns the wall clock seconds since 1970. This replaces the* get_seconds() interface which is not y2038 safe on 32bit systems., & stamp)
165  pos = snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
179  If Not obj Then Go to no_obj_info
181  If Not * True if tomoyo_get_attributes() was already called, false otherwise. Then
182  tomoyo_get_attributes(obj)
183  * True if tomoyo_get_attributes() was already called, false otherwise. = true
185  When i < TOMOYO_MAX_PATH_STAT cycle
190  If Not True if @stat[] is valid. [i] Then Continue
192  stat = * Information on @path1, @path1's parent directory, @path2, @path2's * parent directory.[i]
193  dev = dev
194  mode = mode
195  If i & 1 Then
204  Continue
206  pos += snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
214  If S_ISCHR(mode) || S_ISBLK(mode) Then
215  dev = rdev
221  pos += snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
224  no_obj_info :
225  If pos < tomoyo_buffer_len - 1 Then Return buffer
227  kfree(buffer)
228  Return NULL
Caller
NameDescribe
tomoyo_init_logmoyo_init_log - Allocate buffer for audit logs