summary refs log tree commit diff
path: root/pkgs/build-support/build-fhs-userenv/chrootenv/chrootenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/build-fhs-userenv/chrootenv/chrootenv.c')
-rw-r--r--pkgs/build-support/build-fhs-userenv/chrootenv/chrootenv.c1
1 files changed, 1 insertions, 0 deletions
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));
   }