Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:bool tomoyo_domain_def(const unsigned char *buffer)

Type:bool

Parameter:

TypeParameterName
const unsigned char *buffer
568  If buffer != '<' Then Return false
570  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
571  If Not cp Then len = strlen - Find the length of a string*@s: The string to be sized
573  Else len = cp - buffer
575  If buffer[len - 1] != '>' || 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
578  Return true
Caller
NameDescribe
tomoyo_assign_namespacemoyo_assign_namespace - Create a new namespace.*@domainname: Name of namespace to create.* Returns pointer to "struct tomoyo_policy_namespace" on success,* NULL otherwise.* Caller holds tomoyo_read_lock().
tomoyo_correct_domainmoyo_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.