aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/tools
diff options
context:
space:
mode:
authorGravatar Philipp Wollermann <philwo@google.com>2016-11-29 15:28:09 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2016-11-29 19:56:18 +0000
commitdf72d2c47d54d296400d1e3cf2ac782b3d93e8bb (patch)
treecbb6c111b72c02bce8fb633ad99e6f4273b603b3 /src/main/tools
parent4f3d7780dbadc36fdc3c5992d3d094e086b9c619 (diff)
Let the sandbox ignore ESTALE errors on remounting file systems.
These may happen when a broken NFS mount is present on the user system. Ideally, that mount should just be fixed or removed, but where this is not possible, it's probably safe to ignore it. -- MOS_MIGRATED_REVID=140476478
Diffstat (limited to 'src/main/tools')
-rw-r--r--src/main/tools/linux-sandbox-pid1.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/tools/linux-sandbox-pid1.cc b/src/main/tools/linux-sandbox-pid1.cc
index 5f0482e942..4feedd9e02 100644
--- a/src/main/tools/linux-sandbox-pid1.cc
+++ b/src/main/tools/linux-sandbox-pid1.cc
@@ -390,8 +390,11 @@ static void MakeFilesystemMostlyReadOnly() {
// /proc, /proc/sys/fs/binfmt_misc and /proc, with the latter /proc being
// the one that an outer sandbox has mounted on top of its parent /proc.
// In that case, we're not allowed to remount /proc/sys/fs/binfmt_misc,
- // because it is hidden.
- if (errno != EACCES && errno != EINVAL) {
+ // because it is hidden. If we get ESTALE, the mount is a broken NFS
+ // mount. In the ideal case, the user would either fix or remove that
+ // mount, but in cases where that's not possible, we should just ignore
+ // it.
+ if (errno != EACCES && errno != EINVAL && errno != ESTALE) {
DIE("remount(NULL, %s, NULL, %d, NULL)", ent->mnt_dir, mountFlags);
}
}