Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:In the case the input buffer contains one or more invalid UIDs, the kuid_t* variables pointed to by @parent and @child will get updated but this* function will return an error.* Contents of @buf may be modified.

Proto:static int parse_policy_line(struct file *file, char *buf, struct setuid_rule *rule)

Type:int

Parameter:

TypeParameterName
struct file *file
char *buf
struct setuid_rule *rule
38  child_str = strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for
39  If (child_str == NULL) Then Return -EINVAL
41  child_str = '\0'
42  child_str++
44  ret = kstrtou32(buf, 0, & parsed_parent)
45  If ret Then Return ret
48  ret = kstrtou32(child_str, 0, & parsed_child)
49  If ret Then Return ret
52  src_uid = make_kuid - Map a user-namespace uid pair into a kuid
53  dst_uid = make_kuid - Map a user-namespace uid pair into a kuid
54  If Not uid_valid(src_uid) || Not uid_valid(dst_uid) Then Return -EINVAL
57  Return 0
Caller
NameDescribe
handle_policy_update