delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/08/07/02:13:30

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:message-id:from:reply-to:to:subject
:references:in-reply-to:content-type; q=dns; s=default; b=USNaRJ
x/I5IGJ3Sz8eAhZD2S7m7JGER42tBFZl8oc1tR2POWJRJRBICkbE71uxWjYZB0P1
r7Rz1drXOoi+l7FP6z9IGrQT7nmtV7uD3qkxhjmaOP879jMs9nIhpJBIKyTqn3hX
WTBAkkeyx5wYsadFl5aq3S+vl34y5mS8hLDX4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:message-id:from:reply-to:to:subject
:references:in-reply-to:content-type; s=default; bh=pUOpdsJAIq3f
pO46p52MxjL+730=; b=R89hWtiEPyRcdUUbWUNhUIIIEgNbGQFoijIiv8M/15GF
7rynHfpYH4X/cRs7wfMYnfiK1nTPz2PhfXKkJ/gR9N4L5TiDk0LlZD7Fzi5FfAZt
z+1QyyHaTg5Q2CQAt4cJLJSddhIYMgDdB/jGvRsqWBqDCQ0p/9Qt9ALAzTL2sVU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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=
X-HELO: lb2-smtp-cloud9.xs4all.net
Date: Wed, 07 Aug 2019 08:12:28 +0200
Message-ID: <f7311e1f60cba7ebae136109f077d2d4@smtp-cloud9.xs4all.net>
From: Houder <houder AT xs4all DOT nl>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: Empty file without "x" permission is successfully executable on Cygwin
References: <BL0PR0901MB430826D79AF2771A6A5C2A99A5D50 AT BL0PR0901MB4308 DOT namprd09 DOT prod DOT outlook DOT com>
In-Reply-to: <BL0PR0901MB430826D79AF2771A6A5C2A99A5D50@BL0PR0901MB4308.namprd09.prod.outlook.com>
User-Agent: mua.awk 0.99

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.

Good morning Anton,

Sorry for being brief (and not being clear!).

(and sorry for being late to the party :-)

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.

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019