Skip to content

which.js: root is allowed to execute files owned by anyone

When running in say, a chroot enviornment, the process UID and GID will be 0, but the files in the system (like /usr/bin/git) may not be owned by root itself.

This patch modifies the isExe function that tries to determine if a process is executable and allows root to execute any file that has any executable bit set, instead of just allowing it if the other executable bit is set.

Merge request reports

Loading