From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72570 invoked by alias); 24 Aug 2019 05:54:49 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 72559 invoked by uid 89); 24 Aug 2019 05:54:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=fat, Cygwin, contrary, existed X-HELO: lb3-smtp-cloud8.xs4all.net Received: from lb3-smtp-cloud8.xs4all.net (HELO lb3-smtp-cloud8.xs4all.net) (194.109.24.29) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 24 Aug 2019 05:54:47 +0000 Received: from tmp.6NNoEwDbJV ([83.162.234.136]) by smtp-cloud8.xs4all.net with ESMTPSA id 1P0aisCQXDqPe1P0bi6SM0; Sat, 24 Aug 2019 07:54:42 +0200 Date: Sat, 24 Aug 2019 10:13:00 -0000 Message-ID: <9b61d432ff036788aec774109d57dc3d@smtp-cloud8.xs4all.net> From: Houder Reply-To: cygwin@cygwin.com To: cygwin@cygwin.com Subject: Re: Empty file without "x" permission is successfully executable on Cygwin References: In-Reply-to: Content-Type: text/plain; charset=UTF-8; format=fixed User-Agent: mua.awk 0.99 X-SW-Source: 2019-08/txt/msg00317.txt.bz2 On Wed, 07 Aug 2019 08:12:28, Houder wrote: > On Tue, 6 Aug 2019 19:09:04, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin" wrote: > > > zero-sized? Irrelevant. > > > > It is actually very relevant. Because executing an empty script results in= > > "success" (exit code 0) -- that creates a false-positive. [snip] > What I meant, was: a regular file (empty or not), but w/o shebang and w/o the > execute bit, will be executed by Cygwin, contrary to what happens on Unix. > > This behaviour (again: different from Unix) has existed for at least a decade. > > That is why I wrote: Cygwin != Linux. > > When I found out, years and years ago, I assumed that the deviation was due > to FAT filesystems (not being able to represent the x-bit). > > Perhaps I was wrong. Perhaps the Cygwin maintainers merely goofed up long ago. And again I was wrong ... - https://cygwin.com/ml/cygwin/2009-06/msg00721.html ( Re: Cygwin 1.7: Possible file permission errors in 'base-files' ) "I've put that on my TODO list." - https://cygwin.com/ml/cygwin/2009-06/msg00727.html ( HEADSUP maintainers: Packages install scripts without execute permissions ) "I have the patch for this ready ..." Now that the problem has been fixed by Corinna, she can remove it from her TODO list :-P Henri -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple