Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_load_policy - Run external policy loader to load policy.*@filename: The program about to start.* This function checks whether @filename is /sbin/init , and if so* invoke /sbin/tomoyo-init and wait for the termination of /sbin/tomoyo-init

Proto:void tomoyo_load_policy(const char *filename)

Type:void

Parameter:

TypeParameterName
const char *filename
91  If External variable definitions. ********* || done Then Return
93  If Not Path to the trigger. (default = CONFIG_SECURITY_TOMOYO_ACTIVATION_TRIGGER) Then Path to the trigger. (default = CONFIG_SECURITY_TOMOYO_ACTIVATION_TRIGGER) = CONFIG_SECURITY_TOMOYO_ACTIVATION_TRIGGER
95  If strcmp(filename, Path to the trigger. (default = CONFIG_SECURITY_TOMOYO_ACTIVATION_TRIGGER)) Then Return
97  If Not moyo_policy_loader_exists - Check whether /sbin/tomoyo-init exists.* Returns true if /sbin/tomoyo-init exists, false otherwise. Then Return
99  done = true
100  pr_info("Calling %s to load policy. Please wait.\n", Path to the policy loader. (default = CONFIG_SECURITY_TOMOYO_POLICY_LOADER))
101  argv[0] = Path to the policy loader. (default = CONFIG_SECURITY_TOMOYO_POLICY_LOADER)
102  argv[1] = NULL
103  envp[0] = "HOME=/"
104  envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin"
105  envp[2] = NULL
106  all_usermodehelper() - prepare and start a usermode application*@path: path to usermode executable*@argv: arg vector for process*@envp: environment for process*@wait: wait for the application to finish and return status
107  moyo_check_profile - Check all profiles currently assigned to domains are defined.
Caller
NameDescribe
tomoyo_bprm_set_credsmoyo_bprm_set_creds - Target for security_bprm_set_creds().*@bprm: Pointer to "struct linux_binprm".* Returns 0.