函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\smack\smack_access.c Create Date:2022-07-27 20:55:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:smk_parse_smack - parse smack label from a text string*@string: a text string that might contain a Smack label*@len: the maximum size, or zero if it is NULL terminated.* Returns a pointer to the clean label or an error code.

函数原型:char *smk_parse_smack(const char *string, int len)

返回类型:char

参数:

类型参数名称
const char *string
intlen
449  如果len小于等于0则len等于strlen - Find the length of a string*@s: The string to be sized加1
457  如果string[0]恒等于'-'则返回:错误号
460 i小于len循环如果string[i]大于'~'或string[i]小于等于' '或string[i]恒等于'/'或string[i]恒等于'"'或string[i]恒等于'\\'或string[i]恒等于'\''则
463  退出
465  如果i恒等于0或i大于等于SMK_LONGLABEL则返回:错误号
468  smack等于分配内存并置零
469  如果(smack == NULL)则返回:错误号
472  strncpy(smack, string, i)
474  返回:smack
调用者
名称描述
smk_import_entrysmk_import_entry - import a label, return the list entry*@string: a text string that might be a Smack label*@len: the maximum size, or zero if it is NULL terminated
smk_fill_rulesmk_fill_rule - Fill Smack rule from strings*@subject: subject label string*@object: object label string*@access1: access string*@access2: string with permissions to be removed*@rule: Smack rule*@import: if non-zero, import labels*@len: label length limit
smk_write_revoke_subjsmk_write_revoke_subj - write() for /smack/revoke-subject*@file: file pointer*@buf: data from user space*@count: bytes sent*@ppos: where to start - must be 0