Function report |
Source Code:security\tomoyo\file.c |
Create Date:2022-07-28 19:42:01 |
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_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,
Proto:int tomoyo_path_perm(const u8 operation, const struct path *path, const char *target)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
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 | If tomoyo_init_request_info( & r, NULL, Mapping table from "enum tomoyo_path_acl_index" to "enum tomoyo_mac_index".[operation]) == TOMOYO_CONFIG_DISABLED Then Return 0 |
820 | name = NULL |
821 | idx = moyo_read_lock - Take lock for protecting policy.* Returns index number for tomoyo_read_unlock(). |
822 | 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 |
824 | For holding parameters specific to operations which deal files.* NULL if not dealing files. = obj |
826 | Case operation == TOMOYO_TYPE_RMDIR |
827 | Case operation == TOMOYO_TYPE_CHROOT |
830 | Case 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 | Break |
839 | If operation == TOMOYO_TYPE_SYMLINK Then kfree(name) |
841 | out : |
844 | If Not is_enforce Then error = 0 |
846 | Return error |
Name | Describe |
---|---|
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. |
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 |