Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_correct_domain - Check whether the given domainname follows the naming rules.*@domainname: The domainname to check.* Returns true if @domainname follows the naming rules, false otherwise.

Proto:bool tomoyo_correct_domain(const unsigned char *domainname)

Type:bool

Parameter:

TypeParameterName
const unsigned char *domainname
538  If Not domainname || Not moyo_domain_def - Check whether the given token can be a domainname.*@buffer: The token to check.* Returns true if @buffer possibly be a domainname, false otherwise. Then Return false
540  domainname = 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
541  If Not domainname ++ Then Return true
543  When 1 cycle
544  cp = 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
546  If Not cp Then Break
548  If domainname != '/' || Not moyo_correct_word2 - Validate a string.*@string: The string to check. Maybe non-'\0'-terminated.*@len: Length of @string.* Check whether the given string follows the naming rules.* Returns true if @string follows the naming rules, false otherwise. Then Return false
551  domainname = cp + 1
553  Return moyo_correct_path - Validate a pathname.*@filename: The pathname to check.* Check whether the given pathname follows the naming rules.* Returns true if @filename follows the naming rules, false otherwise.
Caller
NameDescribe
tomoyo_write_transition_controlmoyo_write_transition_control - Write "struct tomoyo_transition_control" list.*@param: Pointer to "struct tomoyo_acl_param".*@type: Type of this entry.* Returns 0 on success, negative value otherwise.
tomoyo_assign_domainmoyo_assign_domain - Create a domain or a namespace.*@domainname: The name of domain.*@transit: True if transit to domain found or created.* Returns pointer to "struct tomoyo_domain_info" on success, NULL otherwise.* Caller holds tomoyo_read_lock().
tomoyo_write_selfmoyo_write_self - write() for /sys/kernel/security/tomoyo/self_domain interface
tomoyo_get_domainnamemoyo_get_domainname - Read a domainname from a line.*@param: Pointer to "struct tomoyo_acl_param".* Returns a domainname on success, NULL otherwise.