Created by: derchr
I changed the required access mode to DRFRONT_EXEC to ciruumvent trying to execute files that aren't executable.
A new check in drfront_searchenv() is introduced to determine if the path in option is in fact a directory and should not be executed.
In this implementiation we are in the akward situation of calling stat() twice (first time in drfront_access() and then in drfront_searchenv()). An alternative approach would be to add a new variant for drfront_access_mode_t called DRFRONT_ISDIR. Though ISDIR isn't really an access mode.
So what would the preferable method be?
Fixes a bug where DynamoRIO tries to execute a directory or a file that
is not marked as executable when it is present in a directory contained
in the PATH environment variable.
Fixes #5455