Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\realpath.c Create Date:2022-07-28 19:45:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:moyo_get_absolute_path - Get the path of a dentry but ignores chroot'ed root.*@path: Pointer to "struct path".*@buffer: Pointer to buffer to return value in.*@buflen: Sizeof @buffer.* Returns the buffer on success, an error code otherwise.

Proto:static char *tomoyo_get_absolute_path(const struct path *path, char *const buffer, const int buflen)

Type:char

Parameter:

TypeParameterName
const struct path *path
char *constbuffer
const intbuflen
96  pos = ERR_PTR( - ENOMEM)
98  If buflen >= 256 Then
100  pos = d_absolute_path(path, buffer, buflen - 1)
101  If Not IS_ERR(pos) && pos == '/' && pos[1] Then
104  If inode && S_ISDIR(i_mode) Then
105  buffer[buflen - 2] = '/'
106  buffer[buflen - 1] = '\0'
110  Return pos
Caller
NameDescribe
tomoyo_realpath_from_pathmoyo_realpath_from_path - Returns realpath(3) of the given pathname but ignores chroot'ed root