函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\file.c Create Date:2022-07-27 21:11:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:moyo_mkdev_perm - Check permission for "mkblock" and "mkchar".*@operation: Type of operation. (TOMOYO_TYPE_MKCHAR or TOMOYO_TYPE_MKBLOCK)*@path: Pointer to "struct path".*@mode: Create mode.*@dev: Device number.

函数原型:int tomoyo_mkdev_perm(const u8 operation, const struct path *path, const unsigned int mode, unsigned int dev)

返回类型:int

参数:

类型参数名称
const u8operation
const struct path *path
const unsigned intmode
unsigned intdev
863  struct tomoyo_obj_info obj = { First pathname. Initialized with { NULL, NULL } if no path. = {mnt = mnt, dentry = dentry}, }
866  error等于负ENOMEM
870  如果tomoyo_init_request_info( & r, NULL, Mapping table from "enum tomoyo_mkdev_acl_index" to "enum tomoyo_mac_index".[operation])恒等于TOMOYO_CONFIG_DISABLED则返回:0
873  idx等于moyo_read_lock - Take lock for protecting policy.* Returns index number for tomoyo_read_unlock().
874  error等于负ENOMEM
875  如果moyo_get_realpath - Get realpath.*@buf: Pointer to "struct tomoyo_path_info".*@path: Pointer to "struct path".* Returns true on success, false otherwise.
876  For holding parameters specific to operations which deal files.* NULL if not dealing files.等于obj
877  dev等于new_decode_dev(dev)
878  param_type等于TOMOYO_TYPE_MKDEV_ACL
879  filename等于buf
880  One of values in "enum tomoyo_mkdev_acl_index". 等于operation
881  mode等于mode
882  major等于MAJOR(dev)
883  minor等于MINOR(dev)
884  moyo_check_acl - Do permission check.*@r: Pointer to "struct tomoyo_request_info".*@check_entry: Callback function to check type specific parameters.* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
885  error等于moyo_audit_mkdev_log - Audit path/number/number/number request log.*@r: Pointer to "struct tomoyo_request_info".* Returns 0 on success, negative value otherwise.
886  释放内存
888  moyo_read_unlock - Release lock for protecting policy.*@idx: Index number returned by tomoyo_read_lock().* Returns nothing.
889  如果One of tomoyo_mode_index . 不等于TOMOYO_CONFIG_ENFORCINGerror等于0
891  返回:error
调用者
名称描述
tomoyo_path_mknodmoyo_path_mknod - Target for security_path_mknod().*@parent: Pointer to "struct path".*@dentry: Pointer to "struct dentry".*@mode: DAC permission mode.*@dev: Device attributes.* Returns 0 on success, negative value otherwise.