diff --git a/pkgs/build-support/build-fhs-userenv/chrootenv/chrootenv.c b/pkgs/build-support/build-fhs-userenv/chrootenv/chrootenv.c index c03a1710f45..7e49e9e78d7 100644 --- a/pkgs/build-support/build-fhs-userenv/chrootenv/chrootenv.c +++ b/pkgs/build-support/build-fhs-userenv/chrootenv/chrootenv.c @@ -118,6 +118,7 @@ int main(gint argc, gchar **argv) { bind("/", prefix); fail_if(chroot(prefix)); + fail_if(chdir("/")); fail_if(execvp(*argv, argv)); }