Lines Matching defs:path

112 	const char *path;
117 const char *path;
139 .path = "/", .how.resolve = RESOLVE_BENEATH,
142 .path = "cheeky/absself", .how.resolve = RESOLVE_BENEATH,
145 .path = "abscheeky/absself", .how.resolve = RESOLVE_BENEATH,
148 .path = "..", .how.resolve = RESOLVE_BENEATH,
151 .path = "../root/", .how.resolve = RESOLVE_BENEATH,
154 .path = "cheeky/self", .how.resolve = RESOLVE_BENEATH,
157 .path = "abscheeky/self", .how.resolve = RESOLVE_BENEATH,
160 .path = "cheeky/garbageself", .how.resolve = RESOLVE_BENEATH,
163 .path = "abscheeky/garbageself", .how.resolve = RESOLVE_BENEATH,
166 { .name = "[beneath] ordinary path to 'root'",
167 .path = "root", .how.resolve = RESOLVE_BENEATH,
168 .out.path = "root", .pass = true },
169 { .name = "[beneath] ordinary path to 'etc'",
170 .path = "etc", .how.resolve = RESOLVE_BENEATH,
171 .out.path = "etc", .pass = true },
172 { .name = "[beneath] ordinary path to 'etc/passwd'",
173 .path = "etc/passwd", .how.resolve = RESOLVE_BENEATH,
174 .out.path = "etc/passwd", .pass = true },
176 .path = "relsym", .how.resolve = RESOLVE_BENEATH,
177 .out.path = "etc/passwd", .pass = true },
179 .path = "cheeky/passwd", .how.resolve = RESOLVE_BENEATH,
180 .out.path = "etc/passwd", .pass = true },
182 .path = "abscheeky/passwd", .how.resolve = RESOLVE_BENEATH,
185 .path = "abssym", .how.resolve = RESOLVE_BENEATH,
187 { .name = "[beneath] absolute path outside $root",
188 .path = "/etc/passwd", .how.resolve = RESOLVE_BENEATH,
190 { .name = "[beneath] cheeky absolute path outside $root",
191 .path = "cheeky/abspasswd", .how.resolve = RESOLVE_BENEATH,
193 { .name = "[beneath] chained cheeky absolute path outside $root",
194 .path = "abscheeky/abspasswd", .how.resolve = RESOLVE_BENEATH,
198 .path = "cheeky/dotdotlink", .how.resolve = RESOLVE_BENEATH,
201 .path = "abscheeky/dotdotlink", .how.resolve = RESOLVE_BENEATH,
204 .path = "cheeky/garbagelink", .how.resolve = RESOLVE_BENEATH,
207 .path = "abscheeky/garbagelink", .how.resolve = RESOLVE_BENEATH,
213 .path = "/", .how.resolve = RESOLVE_IN_ROOT,
214 .out.path = NULL, .pass = true },
216 .path = "cheeky/absself", .how.resolve = RESOLVE_IN_ROOT,
217 .out.path = NULL, .pass = true },
219 .path = "abscheeky/absself", .how.resolve = RESOLVE_IN_ROOT,
220 .out.path = NULL, .pass = true },
222 .path = "..", .how.resolve = RESOLVE_IN_ROOT,
223 .out.path = NULL, .pass = true },
225 .path = "../root/", .how.resolve = RESOLVE_IN_ROOT,
226 .out.path = "root", .pass = true },
228 .path = "cheeky/self", .how.resolve = RESOLVE_IN_ROOT,
229 .out.path = "root", .pass = true },
231 .path = "cheeky/garbageself", .how.resolve = RESOLVE_IN_ROOT,
232 .out.path = "root", .pass = true },
234 .path = "abscheeky/garbageself", .how.resolve = RESOLVE_IN_ROOT,
235 .out.path = "root", .pass = true },
236 { .name = "[in_root] relative path to 'root'",
237 .path = "root", .how.resolve = RESOLVE_IN_ROOT,
238 .out.path = "root", .pass = true },
239 { .name = "[in_root] relative path to 'etc'",
240 .path = "etc", .how.resolve = RESOLVE_IN_ROOT,
241 .out.path = "etc", .pass = true },
242 { .name = "[in_root] relative path to 'etc/passwd'",
243 .path = "etc/passwd", .how.resolve = RESOLVE_IN_ROOT,
244 .out.path = "etc/passwd", .pass = true },
246 .path = "relsym", .how.resolve = RESOLVE_IN_ROOT,
247 .out.path = "etc/passwd", .pass = true },
249 .path = "cheeky/passwd", .how.resolve = RESOLVE_IN_ROOT,
250 .out.path = "etc/passwd", .pass = true },
252 .path = "abscheeky/passwd", .how.resolve = RESOLVE_IN_ROOT,
253 .out.path = "etc/passwd", .pass = true },
255 .path = "abssym", .how.resolve = RESOLVE_IN_ROOT,
256 .out.path = "etc/passwd", .pass = true },
257 { .name = "[in_root] absolute path 'etc/passwd'",
258 .path = "/etc/passwd", .how.resolve = RESOLVE_IN_ROOT,
259 .out.path = "etc/passwd", .pass = true },
260 { .name = "[in_root] cheeky absolute path 'etc/passwd'",
261 .path = "cheeky/abspasswd", .how.resolve = RESOLVE_IN_ROOT,
262 .out.path = "etc/passwd", .pass = true },
263 { .name = "[in_root] chained cheeky absolute path 'etc/passwd'",
264 .path = "abscheeky/abspasswd", .how.resolve = RESOLVE_IN_ROOT,
265 .out.path = "etc/passwd", .pass = true },
267 .path = "cheeky/dotdotlink", .how.resolve = RESOLVE_IN_ROOT,
268 .out.path = "etc/passwd", .pass = true },
270 .path = "abscheeky/dotdotlink", .how.resolve = RESOLVE_IN_ROOT,
271 .out.path = "etc/passwd", .pass = true },
272 { .name = "[in_root] tricky absolute path + absolute + '..'-chained symlink outside $root",
273 .path = "/../../../../abscheeky/dotdotlink", .how.resolve = RESOLVE_IN_ROOT,
274 .out.path = "etc/passwd", .pass = true },
276 .path = "cheeky/garbagelink", .how.resolve = RESOLVE_IN_ROOT,
277 .out.path = "etc/passwd", .pass = true },
279 .path = "abscheeky/garbagelink", .how.resolve = RESOLVE_IN_ROOT,
280 .out.path = "etc/passwd", .pass = true },
281 { .name = "[in_root] tricky absolute path + absolute + garbage link outside $root",
282 .path = "/../../../../abscheeky/garbagelink", .how.resolve = RESOLVE_IN_ROOT,
283 .out.path = "etc/passwd", .pass = true },
285 { .name = "[in_root] O_CREAT of relative path inside $root",
286 .path = "newfile1", .how.flags = O_CREAT,
289 .out.path = "newfile1", .pass = true },
290 { .name = "[in_root] O_CREAT of absolute path",
291 .path = "/newfile2", .how.flags = O_CREAT,
294 .out.path = "newfile2", .pass = true },
296 .path = "/creatlink", .how.flags = O_CREAT,
299 .out.path = "newfile3", .pass = true },
304 .path = "mnt", .how.resolve = RESOLVE_NO_XDEV,
307 .path = "mnt/", .how.resolve = RESOLVE_NO_XDEV,
310 .path = "mnt/.", .how.resolve = RESOLVE_NO_XDEV,
314 .dir = "mnt", .path = ".", .how.resolve = RESOLVE_NO_XDEV,
315 .out.path = "mnt", .pass = true },
317 .dir = "mnt", .path = "..", .how.resolve = RESOLVE_NO_XDEV,
320 .dir = "mnt", .path = "../mnt", .how.resolve = RESOLVE_NO_XDEV,
323 .dir = "mnt", .path = "self", .how.resolve = RESOLVE_NO_XDEV,
326 .dir = "mnt", .path = "absself", .how.resolve = RESOLVE_NO_XDEV,
330 .dir = "mnt", .path = "/", .how.resolve = RESOLVE_NO_XDEV,
331 .out.path = "/", .pass = true },
333 .dir = "/", .path = "/", .how.resolve = RESOLVE_NO_XDEV,
334 .out.path = "/", .pass = true },
336 .path = "/proc/1", .how.resolve = RESOLVE_NO_XDEV,
339 .path = "/tmp", .how.resolve = RESOLVE_NO_XDEV,
343 .dir = "/proc", .path = "self/root", .how.resolve = RESOLVE_NO_XDEV,
346 .dir = "/proc", .path = "self/cwd", .how.resolve = RESOLVE_NO_XDEV,
350 .dir = "/proc", .path = hardcoded_fdpath, .how.resolve = RESOLVE_NO_XDEV,
351 .out.path = "/proc", .pass = true, },
356 .path = "relsym", .how.resolve = RESOLVE_NO_MAGICLINKS,
357 .out.path = "etc/passwd", .pass = true },
360 .path = "procexe", .how.resolve = RESOLVE_NO_MAGICLINKS,
362 { .name = "[no_magiclinks] normal path to magic-link",
363 .path = "/proc/self/exe", .how.resolve = RESOLVE_NO_MAGICLINKS,
365 { .name = "[no_magiclinks] normal path to magic-link with O_NOFOLLOW",
366 .path = "/proc/self/exe", .how.flags = O_NOFOLLOW,
368 .out.path = procselfexe, .pass = true },
369 { .name = "[no_magiclinks] symlink to magic-link path component",
370 .path = "procroot/etc", .how.resolve = RESOLVE_NO_MAGICLINKS,
372 { .name = "[no_magiclinks] magic-link path component",
373 .path = "/proc/self/root/etc", .how.resolve = RESOLVE_NO_MAGICLINKS,
375 { .name = "[no_magiclinks] magic-link path component with O_NOFOLLOW",
376 .path = "/proc/self/root/etc", .how.flags = O_NOFOLLOW,
382 { .name = "[no_symlinks] ordinary path to '.'",
383 .path = ".", .how.resolve = RESOLVE_NO_SYMLINKS,
384 .out.path = NULL, .pass = true },
385 { .name = "[no_symlinks] ordinary path to 'root'",
386 .path = "root", .how.resolve = RESOLVE_NO_SYMLINKS,
387 .out.path = "root", .pass = true },
388 { .name = "[no_symlinks] ordinary path to 'etc'",
389 .path = "etc", .how.resolve = RESOLVE_NO_SYMLINKS,
390 .out.path = "etc", .pass = true },
391 { .name = "[no_symlinks] ordinary path to 'etc/passwd'",
392 .path = "etc/passwd", .how.resolve = RESOLVE_NO_SYMLINKS,
393 .out.path = "etc/passwd", .pass = true },
396 .path = "relsym", .how.resolve = RESOLVE_NO_SYMLINKS,
399 .path = "reletc/passwd", .how.resolve = RESOLVE_NO_SYMLINKS,
402 .path = "abssym", .how.resolve = RESOLVE_NO_SYMLINKS,
405 .path = "absetc/passwd", .how.resolve = RESOLVE_NO_SYMLINKS,
408 .path = "cheeky/garbagelink", .how.resolve = RESOLVE_NO_SYMLINKS,
411 .path = "abscheeky/garbagelink", .how.resolve = RESOLVE_NO_SYMLINKS,
414 .path = "abscheeky/absself", .how.resolve = RESOLVE_NO_SYMLINKS,
418 .path = "relsym", .how.flags = O_NOFOLLOW,
420 .out.path = "relsym", .pass = true },
422 .path = "abssym", .how.flags = O_NOFOLLOW,
424 .out.path = "abssym", .pass = true },
426 .path = "cheeky/garbagelink", .how.flags = O_NOFOLLOW,
428 .out.path = "cheeky/garbagelink", .pass = true },
430 .path = "abscheeky/absself", .how.flags = O_NOFOLLOW,
434 .path = "abscheeky/garbagelink", .how.flags = O_NOFOLLOW,
466 fd = sys_openat2(dfd, test->path, &test->how);
468 failed = (fd < 0 || !fdequal(fd, rootfd, test->out.path));
489 resultfn("%s gives path '%s'\n", test->name,
490 test->out.path ?: ".");