From 9043b49e63ba94adc1d3756b953ab20f4f4e1a2c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 10 Aug 2009 18:36:28 +0000 Subject: [PATCH] * spawn.cc (av::fixup): Check shell scripts for executability only on filesystems/mounts supporting real permissions. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/spawn.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 83cf11c8a..dc5033fc1 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2009-08-10 Corinna Vinschen + + * spawn.cc (av::fixup): Check shell scripts for executability only on + filesystems/mounts supporting real permissions. + 2009-08-10 Corinna Vinschen * dtable.cc (DEV_SOCKET): New static WCHAR string. Name of diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 4aafe6bae..c5b5bee9a 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -1083,7 +1083,7 @@ just_shell: /* Check if script is executable. Otherwise we start non-executable scripts successfully, which is incorrect behaviour. */ - if (check_file_access (real_path, X_OK) < 0) + if (real_path.has_acls () && check_file_access (real_path, X_OK) < 0) return -1; /* errno is already set. */ /* Replace argv[0] with the full path to the script if this is the