Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\common.c Create Date:2022-07-28 19:35:13
Last Modify:2020-03-18 09:15:18 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:moyo_write_domain - Write domain policy.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().

Proto:static int tomoyo_write_domain(struct tomoyo_io_buffer *head)

Type:int

Parameter:

TypeParameterName
struct tomoyo_io_buffer *head
1174  data = Buffer for writing.
1176  domain = The position currently writing to.
1177  is_delete = is_delete
1178  is_select = Not is_delete && tomoyo_str_starts( & data, "select ")
1181  If data == '<' Then
1182  ret = 0
1184  domain = NULL
1185  If is_delete Then ret = moyo_delete_domain - Delete a domain.*@domainname: The name of domain.* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
1187  Else if is_select Then domain = moyo_find_domain - Find a domain by the given name.*@domainname: The domainname to find.* Returns pointer to "struct tomoyo_domain_info" if found, NULL otherwise.* Caller holds tomoyo_read_lock().
1189  Else domain = moyo_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().
1191  The position currently writing to. = domain
1192  Return ret
1194  If Not domain Then Return -EINVAL
1196  ns = Namespace for this domain. Never NULL.
1197  If sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments == 1 && idx < Profile number is an integer between 0 and 255. Then
1199  If Not External variable definitions. ********* || Profile table. Memory is allocated as needed. [idx] Then If Not is_delete Then
1201  Profile number to use. = idx
1202  Return 0
1204  If sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments == 1 && idx < Group number is an integer between 0 and 255. Then
1206  If Not is_delete Then Atomically set a bit in memory
1208  Else lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
1210  Return 0
1212  When idx < TOMOYO_MAX_DOMAIN_INFO_FLAGS cycle
1213  cp = String table for domain flags. [idx]
1215  If strncmp(data, cp, strlen - Find the length of a string*@s: The string to be sized - 1) Then Continue
1217  flags[idx] = Not is_delete
1218  Return 0
1220  Return moyo_write_domain2 - Write domain policy.*@ns: Pointer to "struct tomoyo_policy_namespace".*@list: Pointer to "struct list_head".*@data: Policy to be interpreted.*@is_delete: True if it is a delete request.* Returns 0 on success, negative value otherwise.