Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1059)

Unified Diff: sandbox/linux/services/credentials.cc

Issue 2842033002: Linux sandbox: handle ENOSPC clone failure (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/services/credentials.cc
diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
index 50a109e2f456b320a530c7d9baa55347bbfbc1a9..2cc60967995188dc1a6501758b757ecb1a609511 100644
--- a/sandbox/linux/services/credentials.cc
+++ b/sandbox/linux/services/credentials.cc
@@ -132,9 +132,10 @@ bool ChrootToSafeEmptyDir() {
void CheckCloneNewUserErrno(int error) {
// EPERM can happen if already in a chroot. EUSERS if too many nested
// namespaces are used. EINVAL for kernels that don't support the feature.
- // Valgrind will ENOSYS unshare().
+ // Valgrind will ENOSYS unshare(). ENOSPC can occur when the system has
+ // reached its maximum configured number of user namespaces.
PCHECK(error == EPERM || error == EUSERS || error == EINVAL ||
- error == ENOSYS);
+ error == ENOSYS || error == ENOSPC);
}
// Converts a Capability to the corresponding Linux CAP_XXX value.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698