函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\auditsc.c Create Date:2022-07-27 12:31:14
Last Modify:2020-03-17 16:31:21 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:audit_alloc_name

函数原型:static struct audit_names *audit_alloc_name(struct audit_context *context, unsigned char type)

返回类型:struct audit_names

参数:

类型参数名称
struct audit_context *context
unsigned chartype
1825  如果文件数小于AUDIT_NAMES is the number of slots we reserve in the audit_context* for saving names from getname(). If we get more names we will allocate* a name dynamically and also add those to the list anchored by names_list.
1826  aname等于文件名[文件数]
1827  memset(aname, 0, aname的长度)
1828  否则
1829  aname等于分配内存并置零
1830  如果非aname则返回:NULL
1832  This was an allocated audit_names and not from the array of* names allocated in the task audit context. Thus this name* should be freed on syscall exit. = true
1835  ino等于AUDIT_INO_UNSET
1836  cord type 等于type
1837  添加链表项
1839  文件数自加
1840  返回:aname
调用者
名称描述
__audit_getname__audit_getname - add a name to the list*@name: name to add* Add a name to the list of audit names for this context.* Called from fs/namei.c:getname().
__audit_inode__audit_inode - store the inode and device from a lookup*@name: name being audited*@dentry: dentry being audited*@flags: attributes for this particular entry
__audit_inode_child__audit_inode_child - collect inode info for created/removed objects*@parent: inode of dentry parent*@dentry: dentry being audited*@type: AUDIT_TYPE_* value that we're looking for* For syscalls that create or remove filesystem objects, audit_inode