aboutsummaryrefslogtreecommitdiff
path: root/exec/exec.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2018-01-08 22:54:27 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-01-08 22:54:32 +0100
commit16eff1b637f13f90ea3f00d7f1dd0d99945611f6 (patch)
tree7b7c9eac84098b479448a7b5f9013cb7f1648ff9 /exec/exec.c
parent5dbe5dfd27633ebf2cc0e37fa7036fb1a689ef81 (diff)
downloadhurd-16eff1b637f13f90ea3f00d7f1dd0d99945611f6.tar.gz
hurd-16eff1b637f13f90ea3f00d7f1dd0d99945611f6.tar.bz2
hurd-16eff1b637f13f90ea3f00d7f1dd0d99945611f6.zip
Fix exec_paths through fakeroot or chroot
If file_name_exec is not given, check_hashbang will try to locate the file. If argv[0] contains a '/', the file path is assumed to be absolute and it will try to open the file. Otherwise, the file is searched in the PATH. In either case, the resulting file identity port is compared to the identity port of the original file handle passed to check_hashbang. exec_paths_exec.patch explicitly provides the script files path in file_name_exec. According to the comment, if this path is provided, it is assumed to be the path to the script file and no attempt at locating the script file is done. However, the identity ports are still compared. This cannot succeed if fakeroot or chroot is used, because the process doing the exec and thus the initial file lookup is running in the chrooted environment, while the exec server is not. Fix this by skipping the identity test if file_name_exec is provided. * exec/hashexec.c (check_hashbang): Skip the file identity test if the file_name_exec is provided.
Diffstat (limited to 'exec/exec.c')
0 files changed, 0 insertions, 0 deletions