| Function report | 
| Source Code: security\tomoyo\domain.c | Create Date:2022-07-28 19:40:32 | 
| Last Modify:2022-05-23 20:14:46 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:moyo_find_next_domain - Find a domain.*@bprm: Pointer to "struct linux_binprm".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
Proto:int tomoyo_find_next_domain(struct linux_binprm *bprm)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct linux_binprm * | bprm | 
| 705 | old_domain = moyo_domain - Get "struct tomoyo_domain_info" for current thread.* Returns pointer to "struct tomoyo_domain_info" for current thread. | 
| 706 | struct tomoyo_domain_info * domain = NULL | 
| 709 | bool reject_on_transition_failure = false | 
| 712 | ee = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). | 
| 716 | Size is TOMOYO_EXEC_TMPSIZE bytes = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). | 
| 717 | If Not Size is TOMOYO_EXEC_TMPSIZE bytes Then | 
| 722 | tomoyo_init_request_info( & r, NULL, TOMOYO_MAC_FILE_EXECUTE) | 
| 725 | For holding parameters specific to operations which deal files.* NULL if not dealing files. = obj | 
| 732 | tomoyo_fill_path_info( & exename) | 
| 733 | retry : | 
| 737 | list = List of policy. [TOMOYO_ID_AGGREGATOR] | 
| 748 | candidate = aggregated_name | 
| 749 | Break | 
| 765 | If For using wildcards at tomoyo_find_next_domain(). Then candidate = For using wildcards at tomoyo_find_next_domain(). | 
| 774 | If transition Then | 
| 775 | domainname = name | 
| 777 | reject_on_transition_failure = true | 
| 778 | If Not strcmp(domainname, "keep") Then Go to force_keep_domain | 
| 780 | If Not strcmp(domainname, "child") Then Go to force_child_domain | 
| 782 | If Not strcmp(domainname, "reset") Then Go to force_reset_domain | 
| 784 | If Not strcmp(domainname, "initialize") Then Go to force_initialize_domain | 
| 786 | If Not strcmp(domainname, "parent") Then | 
| 789 | strncpy( Size is TOMOYO_EXEC_TMPSIZE bytes , name, TOMOYO_EXEC_TMPSIZE - 1) | 
| 794 | Else if domainname == '<' Then strncpy( Size is TOMOYO_EXEC_TMPSIZE bytes , domainname, TOMOYO_EXEC_TMPSIZE - 1) | 
| 799 | Go to force_jump_domain | 
| 819 | force_initialize_domain : | 
| 823 | Break | 
| 829 | Default | 
| 830 | If old_domain == The initial domain. && Not External variable definitions. ********* Then | 
| 838 | domain = old_domain | 
| 839 | Break | 
| 841 | force_child_domain : | 
| 845 | Break | 
| 847 | force_jump_domain : | 
| 852 | Else if reject_on_transition_failure Then | 
| 853 | pr_warn("ERROR: Domain '%s' not ready.\n", Size is TOMOYO_EXEC_TMPSIZE bytes ) | 
| 855 | Else if One of tomoyo_mode_index . == TOMOYO_CONFIG_ENFORCING Then retval = -ENOMEM | 
| 857 | Else | 
| 858 | retval = 0 | 
| 859 | If Not flags[TOMOYO_DIF_TRANSITION_FAILED] Then | 
| 860 | flags[TOMOYO_DIF_TRANSITION_FAILED] = true | 
| 861 | granted = false | 
| 864 | pr_warn("ERROR: Domain '%s' not defined.\n", Size is TOMOYO_EXEC_TMPSIZE bytes ) | 
| 867 | out : | 
| 868 | If Not domain Then domain = old_domain | 
| 872 | s = moyo_task - Get "struct tomoyo_task" for specified thread.*@task - Pointer to "struct task_struct".* Returns pointer to "struct tomoyo_task" for specified thread. | 
| 874 | old_domain_info = domain_info | 
| 875 | domain_info = domain | 
| 876 | atomic_inc( & Number of referring tasks. ) | 
| 879 | If Not retval Then | 
| 886 | Return retval | 
| Name | Describe | 
|---|---|
| tomoyo_bprm_check_security | moyo_bprm_check_security - Target for security_bprm_check().*@bprm: Pointer to "struct linux_binprm".* Returns 0 on success, negative value otherwise. | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |