delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/08/05/16:02:24

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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-id:content-transfer-encoding
:mime-version; q=dns; s=default; b=jFdhebDqLkM6DWAaw8FjQoxw21xfS
QzeoLd9rIn3WEEXrVRIr69TgRE3hIOrF+USrFmCYnhDWuGB1vo/9A14ff3PVEZ7H
M7KLqZmcb9psq//qJA+mmQWa2uyruJkyURVY2tqxRDPgLwqaJAJcGfx9gFtWBhVD
X3Nix8lrCcnbDY=
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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-id:content-transfer-encoding
:mime-version; s=default; bh=51FaefnJC5gohAnk4gOaEmL4hl4=; b=eBS
KWV5UIt89vyozwrkzGZZawE1BjhfFCM3cu8Ga3WWZUcPDE3JWdXP420R+I1SAaEJ
4XzXhCRvqZaVIHcu+7GJ5LISRWSmmjsnDhPNaON8liRWL7pwJXvZm+Ddgh/4lHBU
IVJu9qjtcVQbN36DH4Om0mr6i6Qnwks7cvzEInRo=
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=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=
X-HELO: NAM02-CY1-obe.outbound.protection.outlook.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k0NrKO9FVAq7wwaROXSRw7pJVus+TApsyI5NYwKHDsxiOuPbEEvEnd83FNU9sV8DG0418HkQ6XZ7tqCQ/XyKVgnxN/nycyjITeMZlciRNspfas8HzNy0N0aAQ55IjQq2azjYlRXUyD1tXtuMEMyUzaTJ1SOuQqvh62Bmi2fk3HlGBvofMS9BO8EkOEYCBElJ7DxrUvpkvtbq4n9p/DWGX4CNtgp0hc8RCR58yuxEXPvkeyXPh7UtDzGAYhBEByyTx/qJCTN63HrU5ciQQvcezASCPV6darHpd4utMrmol/E5c4KrHLWvqVhuQXrxbIUCO5/0cMNutz2RYT5PRr/RxA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZgdtbZTYoV46vcf7+8Bcs1kmY8uVqdyZwXz4QCzPuuo=; b=QMBNJtKiI+PpcqkHJ7lK7qA/EYfv8uED/8DKdPV+apx42RciPOkAhjkaSRKQrS2fllowLjucg4sjlmBC6WB/M7G0CORkWdKF1xKXiFvXpG9SBCPMSqpScORItegHhAWGPNxaCORUEY0j44VIGorFFTTOHG1KevQ2wq/4br46eWdbvq2PTxqiC1hMkvhZY41nVit6BzYXXbzMYeUb9xG33cbyJ1cSIQ/Tg9DZ3X1+yO9k5AfF+lVGNspmsWmx+FaPviEtDsR44jTubseCsnH2Z3Jl2CbNjOh74FjNK774fwOcBQGcR/xmHgLmXPcQ5v++C64FQaM9pNNGlrCUj7D7Xw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=cornell.edu;dmarc=pass action=none header.from=cornell.edu;dkim=pass header.d=cornell.edu;arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZgdtbZTYoV46vcf7+8Bcs1kmY8uVqdyZwXz4QCzPuuo=; b=gto5ND9ewa/KisuNWcI/1ybyNqQgGa7Ye2/b2WjjidYYCFW0V4F6HNV43OXMQyJtwa1RXIP95tY7Btv/r4ixfswELhJAzMa7Vm1RLCGhpf86cY4YGvTfg2fmheaHClE2+/ZVbdIfGdI/cVn7oGIoYVS0GH5RLAk2IgqmYgWHpEg=
From: Ken Brown <kbrown AT cornell DOT edu>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: Empty file without "x" permission is successfully executable on Cygwin
Date: Mon, 5 Aug 2019 20:01:26 +0000
Message-ID: <eeb8deb6-fc17-1ecd-fb9d-6c0882f75dc1@cornell.edu>
References: <BL0PR0901MB43081893EE588BDED05886BFA5DA0 AT BL0PR0901MB4308 DOT namprd09 DOT prod DOT outlook DOT com>
In-Reply-To: <BL0PR0901MB43081893EE588BDED05886BFA5DA0@BL0PR0901MB4308.namprd09.prod.outlook.com>
user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
authentication-results: spf=none (sender IP is ) smtp.mailfrom=kbrown AT cornell DOT edu;
x-ms-oob-tlc-oobclassifiers: OLM:8273;
received-spf: None (protection.outlook.com: cornell.edu does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: ksb2 AT cornell DOT edu
X-IsSubscribed: yes
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id x75K25wp019927

On 8/5/2019 2:18 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote:
> Hi,
> 
> Please consider the following shell session:
> 
> $ cat dummy.c
> #include <stdio.h>
> 
> int main()
> {
>      return 0;
> }
> $ gcc -o dummy dummy.c
> $ mv dummy.exe dummy
> $ ./dummy
> $ echo $?
> 0
> $ chmod a-x dummy
> $ ./dummy
> -bash: ./dummy: Permission denied
> $ rm dummy
> $ touch dummy
> $ ./dummy
> $ echo $?
> 0
> 
> So Cygwin lets the shell to execute a zero-sized file regardless of the "x" perm
> (non-empty files are not executable if they do not have "x", as shown above).

I can't reproduce this on my system.  Can you show the permissions and ACL of dummy?

> There's more.  If I put some rubbish in a file, Cygwin still tries to execute it even if the "x" is not there:
> 
> $ rm dummy
> $ echo "1" > dummy
> $ ./dummy
> ./dummy: line 1: 1: command not found

Again I can't reproduce this.

Ken

--
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