函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_add_slash - Add trailing '/' if needed.*@buf: Pointer to "struct tomoyo_path_info".* Returns nothing.*@buf must be generated by tomoyo_encode() because this function does not* allocate memory for adding '/'.

函数原型:static void tomoyo_add_slash(struct tomoyo_path_info *buf)

返回类型:void

参数:

类型参数名称
struct tomoyo_path_info *buf
132  如果 = tomoyo_strendswith(name, "/") 则返回
137  strcat((char * )name, "/")
138  tomoyo_fill_path_info(buf)
调用者
名称描述
tomoyo_path_number_permmoyo_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.
tomoyo_path_permmoyo_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,
tomoyo_path2_permmoyo_path2_perm - Check permission for "rename", "link" and "pivot_root".*@operation: Type of operation.*@path1: Pointer to "struct path".*@path2: Pointer to "struct path".* Returns 0 on success, negative value otherwise.