Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\auditsc.c Create Date:2022-07-28 11:27:36
Last Modify:2020-03-17 16:31:21 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:audit_log_proctitle

Proto:static void audit_log_proctitle(void)

Type:void

Parameter:Nothing

1404  msg = "(null)"
1405  len = strlen - Find the length of a string*@s: The string to be sized
1406  context = audit_context()
1409  If Not context || must be the first element Then Return
1412  ab = audit_log_start - obtain an audit buffer*@ctx: audit_context (may be NULL)*@gfp_mask: type of allocation*@type: audit message type* Returns audit_buffer pointer on success or NULL on error
1413  If Not ab Then Return
1416  audit_log_format - format a message into the audit buffer.*@ab: audit_buffer*@fmt: format string*@...: optional parameters matching @fmt string* All the work is done in audit_log_vformat.
1419  If Not the cmdline field Then
1420  buf = Allocation memory
1421  If Not buf Then Go to out
1424  res = get_cmdline(current process, buf, max length to print of cmdline/proctitle value during audit )
1425  If res == 0 Then
1426  kfree(buf)
1427  Go to out
1429  res = audit_proctitle_rtrim(buf, res)
1430  If res == 0 Then
1431  kfree(buf)
1432  Go to out
1434  the cmdline field = buf
1435  length of the cmdline field. = res
1437  msg = the cmdline field
1438  len = length of the cmdline field.
1439  out :
1440  audit_log_n_untrustedstring - log a string that may contain random characters*@ab: audit_buffer*@len: length of string (not including trailing null)*@string: string to be logged* This code will escape a string that is passed to it if the string* contains
1441  audit_log_end - end one audit record*@ab: the audit_buffer* We can not do a netlink send inside an irq context because it blocks (last* arg, flags, is not set to MSG_DONTWAIT), so the audit buffer is placed on a* queue and a tasklet is scheduled to remove
Caller
NameDescribe
audit_log_exit