Jeremy Evans <c...@jeremyevans.net> wrote: > @@ -134,6 +136,11 @@ def user(user, group = nil) > Process.initgroups(user, gid) > Process::GID.change_privilege(gid) > end > + if chroot > + chroot = Dir.pwd if chroot == true > + Dir.chroot(chroot) > + Dir.chdir('/') > + end
By the way, I noticed in configurator.rb (for working_directory), we also update ENV['PWD'] after chdir. Perhaps we should do so, here? For working_directory, I preserved ENV['PWD'] in case Dir.pwd wasn't aware of symlinks; or there's code which relies on env['PWD'] without caring for making the syscalls required for Dir.pwd... I'm not sure how much it matters in practice... -- unsubscribe: unicorn-public+unsubscr...@bogomips.org archive: https://bogomips.org/unicorn-public/