Files
mckernel/test/issues/1463/tmp_overlay_path.patch
Ken Sato 051c0dcdd8 overlay_path: Fix resolution of symbolic link under /sys/
Change-Id: I650e72fb335aa72256d3b129a65c09bbd7cf26d3
Refs: #1463
2021-03-17 08:18:46 +00:00

18 lines
458 B
Diff

diff --git executer/user/mcexec.c executer/user/mcexec.c
index acae1f8..d220dd9 100644
--- executer/user/mcexec.c
+++ executer/user/mcexec.c
@@ -3458,6 +3458,12 @@ overlay_path(int dirfd, const char *in, char *buf, int *resolvelinks)
goto checkexist_resolvelinks;
}
+ /* for #1463's test */
+ if (!strncmp(path, "/tmp", 4) &&
+ (path[4] == '/' || path[4] == '\0')) {
+ goto checkexist_resolvelinks;
+ }
+
return in;
checkexist_resolvelinks: