From a2b58048b9d850f67d27f1f62db2e6bacf3f4253 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 22 Mar 2022 16:57:29 +0000 Subject: Improve error message when clone() fails with ENOSPC In particular, this would have given #371 a clearer error message. Signed-off-by: Simon McVittie --- bubblewrap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bubblewrap.c b/bubblewrap.c index 2f2fca5..0f372eb 100644 --- a/bubblewrap.c +++ b/bubblewrap.c @@ -2790,6 +2790,9 @@ main (int argc, die ("No permissions to creating new namespace, likely because the kernel does not allow non-privileged user namespaces. On e.g. debian this can be enabled with 'sysctl kernel.unprivileged_userns_clone=1'."); } + if (errno == ENOSPC) + die ("Creating new namespace failed: nesting depth or /proc/sys/user/max_*_namespaces exceeded (ENOSPC)"); + die_with_error ("Creating new namespace failed"); } -- cgit v1.2.1