Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_manager - Check whether the current process is a policy manager.* Returns true if the current process is permitted to modify policy* via /sys/kernel/security/tomoyo/ interface.* Caller holds tomoyo_read_lock().

Proto:static bool tomoyo_manager(void)

Type:bool

Parameter:Nothing

941  task = current process
942  domainname = Name of this domain. Never NULL.
943  found = IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING)
945  If Not External variable definitions. ********* Then Return true
947  If Not Permit policy management by non-root user? && ( Not uid_eq( real UID of the task , GLOBAL_ROOT_UID) || Not uid_eq( effective UID of the task , GLOBAL_ROOT_UID) ) Then Return false
951  exe = tomoyo_get_exe()
952  If Not exe Then Return false
956  If Not rue or false or TOMOYO_GC_IN_PROGRESS && ( Not moyo_pathcmp - strcmp() for "struct tomoyo_path_info" structure.*@a: Pointer to "struct tomoyo_path_info".*@b: Pointer to "struct tomoyo_path_info".* Returns true if @a == @b, false otherwise. || Not strcmp(exe, name) ) Then
959  found = true
960  Break
963  If Not found Then
965  pid = pid
967  If last_pid != pid Then
968  pr_warn("%s ( %s ) is not permitted to update policies.\n", name, exe)
970  last_pid = pid
973  kfree(exe)
974  Return found
Caller
NameDescribe
tomoyo_write_controlmoyo_write_control - write() for /sys/kernel/security/tomoyo/ interface.*@head: Pointer to "struct tomoyo_io_buffer".*@buffer: Pointer to buffer to read from.*@buffer_len: Size of @buffer.* Returns @buffer_len on success, negative value otherwise.