Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\domain.c Create Date:2022-07-28 19:39:45
Last Modify:2022-05-23 20:14:46 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:int tomoyo_write_transition_control(struct tomoyo_acl_param *param, const u8 type)

Type:int

Parameter:

TypeParameterName
struct tomoyo_acl_param *param
const u8type
245  struct tomoyo_transition_control e = {One of values in "enum tomoyo_transition_type". = type}
246  error = If is_delete Then -ENOENT Else -ENOMEM
247  program = data
248  domainname = strstr - Find the first substring in a %NUL terminated string*@s1: The string to be searched*@s2: The string to search for
250  If domainname Then
251  domainname = '\0'
252  domainname += 6
253  Else if type == TOMOYO_TRANSITION_CONTROL_NO_KEEP || type == TOMOYO_TRANSITION_CONTROL_KEEP Then
255  domainname = program
256  program = NULL
258  If program && strcmp(program, "any") Then
259  If Not tomoyo_correct_path(program) Then Return -EINVAL
261  Maybe NULL = tomoyo_get_name(program)
262  If Not Maybe NULL Then Go to out
265  If domainname && strcmp(domainname, "any") Then
266  If Not tomoyo_correct_domain(domainname) Then
267  If Not tomoyo_correct_path(domainname) Then Go to out
271  Maybe NULL = tomoyo_get_name(domainname)
272  If Not Maybe NULL Then Go to out
275  list = List of policy. [TOMOYO_ID_TRANSITION_CONTROL]
276  error = moyo_update_policy - Update an entry for exception policy.*@new_entry: Pointer to "struct tomoyo_acl_info".*@size: Size of @new_entry in bytes.*@param: Pointer to "struct tomoyo_acl_param".*@check_duplicate: Callback function to find duplicated entry.
278  out :
279  moyo_put_name - Drop reference on "struct tomoyo_name".*@name: Pointer to "struct tomoyo_path_info". Maybe NULL.* Returns nothing.
280  moyo_put_name - Drop reference on "struct tomoyo_name".*@name: Pointer to "struct tomoyo_path_info". Maybe NULL.* Returns nothing.
281  Return error
Caller
NameDescribe
tomoyo_write_exceptionmoyo_write_exception - Write exception policy.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().