Ignore permission failures in CheckDuplicatesRecursively.

Not all files are always accessible by the process itself. This
was specifically seen with map_files, but there's no rule that
every entry must be accessible by the process itself.

PiperOrigin-RevId: 343919117
This commit is contained in:
Adin Scannell
2020-11-23 13:38:41 -08:00
committed by gVisor bot
parent 5212b4f7b2
commit 5d5af88110
+4
View File
@@ -2478,6 +2478,10 @@ void CheckDuplicatesRecursively(std::string path) {
absl::EndsWith(path, "/net")) {
break;
}
// We may also see permission failures traversing some files.
if (errno == EACCES && absl::StartsWith(path, "/proc/")) {
break;
}
// Otherwise, no errors are allowed.
ASSERT_EQ(errno, 0) << path;