overlay_path: Fix resolution of symbolic link under /sys/
Change-Id: I650e72fb335aa72256d3b129a65c09bbd7cf26d3 Refs: #1463
This commit is contained in:
committed by
Masamichi Takagi
parent
09173d353c
commit
051c0dcdd8
17
test/issues/1463/tmp_overlay_path.patch
Normal file
17
test/issues/1463/tmp_overlay_path.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
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:
|
||||
Reference in New Issue
Block a user