diff options
author | Simon McVittie <smcv@collabora.com> | 2022-03-22 16:57:29 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2022-03-22 17:37:07 +0000 |
commit | a2b58048b9d850f67d27f1f62db2e6bacf3f4253 (patch) | |
tree | 8fa2cff9412a6ff584d58d6da503da688cbe1b5e | |
parent | 90e46b5ee3afda2e29c6f393cf265064116f6894 (diff) | |
download | bubblewrap-a2b58048b9d850f67d27f1f62db2e6bacf3f4253.tar.gz |
Improve error message when clone() fails with ENOSPC
In particular, this would have given #371 a clearer error message.
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r-- | bubblewrap.c | 3 |
1 files changed, 3 insertions, 0 deletions
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"); } |