Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:smk_parse_label_list - parse list of Smack labels, separated by spaces*@data: the string to parse*@private: destination list* Returns zero on success or error code, as appropriate

Proto:static int smk_parse_label_list(char *data, struct list_head *list)

Type:int

Parameter:

TypeParameterName
char *data
struct list_head *list
1937  When ((tok = strsep - Split a string into tokens*@s: The string to be searched*@ct: The characters to search for* strsep() updates @s to point after the token, ready for the next call.* It returns empty tokens, too, behaving exactly like the libc function) != NULL) cycle
1938  If Not tok Then Continue
1941  skp = smk_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
1942  If IS_ERR(skp) Then Return PTR_ERR(skp)
1945  sklep = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
1946  If (sklep == NULL) Then Return -ENOMEM
1949  smk_label = skp
1950  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
1953  Return 0
Caller
NameDescribe
smk_write_onlycapsmk_write_onlycap - write() for smackfs/onlycap*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start* Returns number of bytes written or error code, as appropriate
smk_write_relabel_selfsmk_write_relabel_self - write() for /smack/relabel-self*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start - must be 0