Function report |
Source Code:security\apparmor\path.c |
Create Date:2022-07-28 19:51:14 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:d_namespace_path - lookup a name associated with a given path*@path: path to lookup (NOT NULL)*@buf: buffer to store path to (NOT NULL)*@name: Returns - pointer for start of path name with in @buf (NOT NULL)*@flags: flags controlling path
Proto:static int d_namespace_path(const struct path *path, char *buf, char **name, int flags, const char *disconnected)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
const struct path * | path | |
char * | buf | |
char ** | name | |
int | flags | |
const char * | disconnected |
92 | error = 0 |
93 | connected = 1 |
94 | isdir = If flags & path is a directory Then 1 Else 0 |
95 | buflen = aa_g_path_max - isdir |
97 | If mnt_flags & MNT_INTERNAL Then |
99 | res = dentry_path(dentry, buf, buflen) |
105 | If s_magic == PROC_SUPER_MAGIC && strncmp( * name, "/sys/", 5) == 0 Then |
110 | error = modified from dcache.c |
111 | Go to out |
112 | Else error = If the path is not connected to the expected root,* check if it is a sysctl and handle specially else remove any* leading / that __d_path may have returned |
115 | Go to out |
119 | If flags & do path lookup relative to chroot Then |
124 | Else |
134 | If PTR_ERR(res) == -ENAMETOOLONG Then |
139 | connected = 0 |
140 | res = dentry_path_raw(dentry, buf, buflen) |
151 | If Not connected Then error = If the path is not connected to the expected root,* check if it is a sysctl and handle specially else remove any* leading / that __d_path may have returned |
160 | If d_unlinked(dentry) && d_is_positive(dentry) && Not (flags & ( mediate deleted paths | delegate deleted files )) Then |
166 | out : |
171 | If (!error && isdir && () != '\0' || ) != '/')) Then strcpy( & buf[aa_g_path_max - 2], "/") |
174 | Return error |
Name | Describe |
---|---|
aa_path_name | aa_path_name - get the pathname to a buffer ensure dir / is appended*@path: path the file (NOT NULL)*@flags: flags controlling path name generation*@buffer: buffer to put name in (NOT NULL)*@name: Returns - the generated path name if !error (NOT |
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 |