函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\common.c Create Date:2022-07-27 21:04:10
Last Modify:2020-03-18 09:15:18 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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().

函数原型:static bool tomoyo_manager(void)

返回类型:bool

参数:

941  task等于当前进程
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  如果非External variable definitions. *********则返回:true
947  如果非Permit policy management by non-root user? 且非uid_eq(进程uid, GLOBAL_ROOT_UID)或非uid_eq(有效uid, GLOBAL_ROOT_UID)的值则返回:false
951  exe等于tomoyo_get_exe()
952  如果非exe则返回:false
956  如果非rue or false or TOMOYO_GC_IN_PROGRESS 且非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.或非字符串比较的值则
959  found = true
960  退出
963  如果非found
965  pid等于pid
967  如果last_pid不等于pid
968  打印警告信息("%s ( %s ) is not permitted to update policies.\n", name, exe)
970  last_pid等于pid
973  释放内存
974  返回:found
调用者
名称描述
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.