Function report | 
Source Code:security\tomoyo\file.c | 
Create Date:2022-07-28 19:41:51 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:moyo_path_number_perm - Check permission for "create", "mkdir", "mkfifo", "mksock", "ioctl", "chmod", "chown", "chgrp".*@type: Type of operation.*@path: Pointer to "struct path".*@number: Number.* Returns 0 on success, negative value otherwise.
Proto:int tomoyo_path_number_perm(const u8 type, const struct path *path, unsigned long number)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| const u8 | type | |
| const struct path * | path | |
| unsigned long | number | 
| 712 | struct tomoyo_obj_info obj = { First pathname. Initialized with { NULL, NULL } if no path. = {mnt = mnt, dentry = dentry}, } | 
| 719 | If tomoyo_init_request_info( & r, NULL, Mapping table from "enum tomoyo_path_number_acl_index" to* "enum tomoyo_mac_index".[type]) == TOMOYO_CONFIG_DISABLED || Not dentry Then Return 0 | 
| 722 | idx = moyo_read_lock - Take lock for protecting policy.* Returns index number for tomoyo_read_unlock(). | 
| 723 | If Not moyo_get_realpath - Get realpath.*@buf: Pointer to "struct tomoyo_path_info".*@path: Pointer to "struct path".* Returns true on success, false otherwise. Then Go to out | 
| 725 | For holding parameters specific to operations which deal files.* NULL if not dealing files. = obj | 
| 732 | Do | 
| 737 | out : | 
| 739 | If One of tomoyo_mode_index . != TOMOYO_CONFIG_ENFORCING Then error = 0 | 
| 741 | Return error | 
| Name | Describe | 
|---|---|
| tomoyo_path_mkdir | moyo_path_mkdir - Target for security_path_mkdir().*@parent: Pointer to "struct path".*@dentry: Pointer to "struct dentry".*@mode: DAC permission mode.* Returns 0 on success, negative value otherwise. | 
| tomoyo_path_mknod | moyo_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. | 
| tomoyo_file_ioctl | moyo_file_ioctl - Target for security_file_ioctl().*@file: Pointer to "struct file".*@cmd: Command for ioctl().*@arg: Argument for @cmd.* Returns 0 on success, negative value otherwise. | 
| tomoyo_path_chmod | moyo_path_chmod - Target for security_path_chmod().*@path: Pointer to "struct path".*@mode: DAC permission mode.* Returns 0 on success, negative value otherwise. | 
| tomoyo_path_chown | moyo_path_chown - Target for security_path_chown().*@path: Pointer to "struct path".*@uid: Owner ID.*@gid: Group ID.* 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  |