Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_parse_number_union - Parse a tomoyo_number_union.*@param: Pointer to "struct tomoyo_acl_param".*@ptr: Pointer to "struct tomoyo_number_union".* Returns true on success, false otherwise.

Proto:bool tomoyo_parse_number_union(struct tomoyo_acl_param *param, struct tomoyo_number_union *ptr)

Type:bool

Parameter:

TypeParameterName
struct tomoyo_acl_param *param
struct tomoyo_number_union *ptr
277  memset(ptr, 0, size of ptr )
278  If data[0] == '@' Then
279  data++
280  Maybe NULL. = moyo_get_group - Allocate memory for "struct tomoyo_path_group"/"struct tomoyo_number_group".*@param: Pointer to "struct tomoyo_acl_param".*@idx: Index number.* Returns pointer to "struct tomoyo_group" on success, NULL otherwise.
281  Return Maybe NULL. != NULL
283  data = moyo_read_token - Read a word from a line.*@param: Pointer to "struct tomoyo_acl_param".* Returns a word on success, "" otherwise.* To allow the caller to skip NULL check, this function returns "" rather than* NULL if there is no more words to read.
284  type = moyo_parse_ulong - Parse an "unsigned long" value.*@result: Pointer to "unsigned long".*@str: Pointer to string to parse.* Returns one of values in "enum tomoyo_value_type".* The @src is updated to point the first character after the value* on success.
285  If type == TOMOYO_VALUE_TYPE_INVALID Then Return false
287  values[0] = v
288  One of values in "enum tomoyo_value_type". [0] = type
289  If Not data Then
290  values[1] = v
291  One of values in "enum tomoyo_value_type". [1] = type
292  Return true
294  If data++ != '-' Then Return false
296  type = moyo_parse_ulong - Parse an "unsigned long" value.*@result: Pointer to "unsigned long".*@str: Pointer to string to parse.* Returns one of values in "enum tomoyo_value_type".* The @src is updated to point the first character after the value* on success.
297  If type == TOMOYO_VALUE_TYPE_INVALID || data || values[0] > v Then Return false
299  values[1] = v
300  One of values in "enum tomoyo_value_type". [1] = type
301  Return true
Caller
NameDescribe
tomoyo_get_conditionmoyo_get_condition - Parse condition part.*@param: Pointer to "struct tomoyo_acl_param".* Returns pointer to "struct tomoyo_condition" on success, NULL otherwise.
tomoyo_update_mkdev_aclmoyo_update_mkdev_acl - Update "struct tomoyo_mkdev_acl" list.*@perm: Permission.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
tomoyo_update_path_number_aclmoyo_update_path_number_acl - Update ioctl/chmod/chown/chgrp ACL.*@perm: Permission.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.
tomoyo_update_mount_aclmoyo_update_mount_acl - Write "struct tomoyo_mount_acl" list.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
tomoyo_write_groupmoyo_write_group - Write "struct tomoyo_path_group"/"struct tomoyo_number_group"/"struct tomoyo_address_group" list.*@param: Pointer to "struct tomoyo_acl_param".*@type: Type of this group.* Returns 0 on success, negative value otherwise.
tomoyo_write_inet_networkmoyo_write_inet_network - Write "struct tomoyo_inet_acl" list.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().