Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_policy.c Create Date:2022-07-28 19:58:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ima_lsm_copy_rule

Proto:static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry)

Type:struct ima_rule_entry

Parameter:

TypeParameterName
struct ima_rule_entry *entry
268  nentry = Allocation memory
269  If Not nentry Then Return NULL
276  memcpy(nentry, entry, size of nentry )
277  memset(lsm, 0, sizeof_field(TYPE, MEMBER)*@TYPE: The structure containing the field of interest*@MEMBER: The field to return the size of(structima_rule_entry, lsm))
279  When i < MAX_LSM_RULES cycle
280  If Not audit value Then Continue
283  audit type = audit type
284  audit value = kstrdup - allocate space for and copy an existing string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Return: newly allocated copy of @s or %NULL in case of error
286  If Not audit value Then Go to out_err
289  security_filter_rule_init( audit type , Audit_equal, audit value , & LSM file metadata specific )
293  If Not LSM file metadata specific Then pr_warn("rule for LSM \'%s\' is undefined\n", (char * ) audit value )
297  Return nentry
299  out_err :
300  ima_lsm_free_rule(nentry)
301  Return NULL
Caller
NameDescribe
ima_lsm_update_rule