This is an automated email from the git hooks/post-receive script.
ildumi pushed a commit to branch development
in repository libtool.
The following commit(s) were added to refs/heads/development by this push:
new f4c10752 ltmain.in: Fix mistaking a directory as an executable
f4c10752 is described below
commit f4c10752cc4f27cb2740761ade27b1282468d540
Author: Takashi Yano <[email protected]>
AuthorDate: Thu Feb 20 01:37:27 2025 +0200
ltmain.in: Fix mistaking a directory as an executable
find_executable() can return a directory of the same name as the target
executable if the directory is found earlier in the PATH, which causes
check_executable() to fail.
Reported: https://savannah.gnu.org/support/?111191
* build-aux/ltmain.in: Check if directory is found before executable
in the PATH.
---
build-aux/ltmain.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index c59459d0..36a85b9e 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -4241,7 +4241,7 @@ check_executable (const char *path)
if ((!path) || (!*path))
return 0;
- if ((stat (path, &st) >= 0)
+ if ((stat (path, &st) >= 0) && !S_ISDIR (st.st_mode)
&& (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
return 1;
else