diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2017-12-09 09:14:56 +0000 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-12-09 09:14:56 +0000 |
commit | 438fb59e6f98366bde12b3ff94e8f8326201dc26 (patch) | |
tree | 795862ce59a53b0c0b3727e45c7cebacaa273fc0 /pkgs/build-support/build-fhs-userenv | |
parent | edb59ee7bdd0e419d35ea9202feba251692f821e (diff) | |
download | nixpkgs-438fb59e6f98366bde12b3ff94e8f8326201dc26.tar nixpkgs-438fb59e6f98366bde12b3ff94e8f8326201dc26.tar.gz nixpkgs-438fb59e6f98366bde12b3ff94e8f8326201dc26.tar.bz2 nixpkgs-438fb59e6f98366bde12b3ff94e8f8326201dc26.tar.lz nixpkgs-438fb59e6f98366bde12b3ff94e8f8326201dc26.tar.xz nixpkgs-438fb59e6f98366bde12b3ff94e8f8326201dc26.tar.zst nixpkgs-438fb59e6f98366bde12b3ff94e8f8326201dc26.zip |
chroot-user: better error message, if unshare is not allowed
Diffstat (limited to 'pkgs/build-support/build-fhs-userenv')
-rw-r--r-- | pkgs/build-support/build-fhs-userenv/chrootenv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/build-fhs-userenv/chrootenv.c b/pkgs/build-support/build-fhs-userenv/chrootenv.c index edead5d3ab6..8d6c98959cc 100644 --- a/pkgs/build-support/build-fhs-userenv/chrootenv.c +++ b/pkgs/build-support/build-fhs-userenv/chrootenv.c @@ -128,7 +128,7 @@ int main(int argc, char *argv[]) { // If we are root, no need to create new user namespace. if (uid == 0) { if (unshare(CLONE_NEWNS) < 0) - errorf(EX_OSERR, "unshare"); + errorf(EX_OSERR, "unshare() failed: You may have an old kernel or have CLONE_NEWUSER disabled by your distribution security settings."); // Mark all mounted filesystems as slave so changes // don't propagate to the parent mount namespace. if (mount(NULL, "/", NULL, MS_REC | MS_SLAVE, NULL) < 0) |