| 函数逻辑报告 | 
| Source Code: security\tomoyo\file.c | Create Date:2022-07-27 21:10:56 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:moyo_path_perm - Check permission for "unlink", "rmdir", "truncate", "symlink", "append", "chroot" and "unmount".*@operation: Type of operation.*@path: Pointer to "struct path".*@target: Symlink's target if @operation is TOMOYO_TYPE_SYMLINK,
函数原型:int tomoyo_path_perm(const u8 operation, const struct path *path, const char *target)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| const u8 | operation | |
| const struct path * | path | |
| const char * | target | 
| 806 | struct tomoyo_obj_info obj = { First pathname. Initialized with { NULL, NULL } if no path. = {mnt = mnt, dentry = dentry}, } | 
| 815 | 如果tomoyo_init_request_info( & r, NULL, Mapping table from "enum tomoyo_path_acl_index" to "enum tomoyo_mac_index".[operation])恒等于TOMOYO_CONFIG_DISABLED则返回:0 | 
| 820 | name = NULL | 
| 821 | idx等于moyo_read_lock - Take lock for protecting policy.* Returns index number for tomoyo_read_unlock(). | 
| 822 | 如果非moyo_get_realpath - Get realpath.*@buf: Pointer to "struct tomoyo_path_info".*@path: Pointer to "struct path".* Returns true on success, false otherwise.则转到:out | 
| 824 | For holding parameters specific to operations which deal files.* NULL if not dealing files.等于obj | 
| 826 | 当:operation恒等于TOMOYO_TYPE_RMDIR | 
| 827 | 当:operation恒等于TOMOYO_TYPE_CHROOT | 
| 829 | 退出 | 
| 830 | 当:operation恒等于TOMOYO_TYPE_SYMLINK | 
| 831 | name等于tomoyo_encode(target) | 
| 834 | tomoyo_fill_path_info( & symlink_target) | 
| 835 | * Content of symbolic link to be created. NULL for operations other * than symlink().等于symlink_target | 
| 836 | 退出 | 
| 839 | 如果operation恒等于TOMOYO_TYPE_SYMLINK则释放内存 | 
| 841 | out : | 
| 842 | 释放内存 | 
| 844 | 如果非is_enforce则error等于0 | 
| 846 | 返回:error | 
| 名称 | 描述 | 
|---|---|
| tomoyo_inode_getattr | moyo_inode_getattr - Target for security_inode_getattr().*@mnt: Pointer to "struct vfsmount".*@dentry: Pointer to "struct dentry".* Returns 0 on success, negative value otherwise. | 
| tomoyo_path_truncate | moyo_path_truncate - Target for security_path_truncate().*@path: Pointer to "struct path".* Returns 0 on success, negative value otherwise. | 
| tomoyo_path_unlink | moyo_path_unlink - Target for security_path_unlink().*@parent: Pointer to "struct path".*@dentry: Pointer to "struct dentry".* Returns 0 on success, negative value otherwise. | 
| tomoyo_path_rmdir | moyo_path_rmdir - Target for security_path_rmdir().*@parent: Pointer to "struct path".*@dentry: Pointer to "struct dentry".* Returns 0 on success, negative value otherwise. | 
| tomoyo_path_symlink | moyo_path_symlink - Target for security_path_symlink().*@parent: Pointer to "struct path".*@dentry: Pointer to "struct dentry".*@old_name: Symlink's content.* Returns 0 on success, negative value otherwise. | 
| tomoyo_path_chroot | moyo_path_chroot - Target for security_path_chroot().*@path: Pointer to "struct path".* Returns 0 on success, negative value otherwise. | 
| tomoyo_sb_umount | moyo_sb_umount - Target for security_sb_umount().*@mnt: Pointer to "struct vfsmount".*@flags: Unmount options.* Returns 0 on success, negative value otherwise. | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |