delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/12/25/09:09:02

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 4BPE92oH4119636
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 4BPE92oH4119636
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=iCOy3vJa
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E63F53858D35
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1735135741;
bh=tY65P7enovFHfo+6tnG6M0Y6pA8zWCScfjmncu36dJA=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=iCOy3vJaF/weM0goCN7qbmliiNEu0o+Iqq7XOUN6FOQP37CQiFe1Bn7T2S+cTCHOt
xpMU+AtsgRyLJQRdukesOuQjfHUoUo3ypIjF/DAtT5/tXCCXMan2AnYngzDmgbiyLn
TNs3vXjWq5UZJgpPWBSs1w6Rh2VNoJMa8gbV1WX4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DAE033858D20
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DAE033858D20
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735135717; cv=none;
b=sDB8tsM9AjFWAxl29Va52sGMS+XhqS4YgIL7zP0Enh9jO4yv17t4sK3ouB9/nZp++PgbJeAA6xvKuCdAaZm0cJK0PqciRqYxUk/Yck/nBu8+VypXaF5FIzC3AyADz62NxAEUc6jgBP9tyGWGILdDkJw2pqwmuDXgo9XhzRabQbc=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1735135717; c=relaxed/simple;
bh=7l6rIDruJcKnqVx4cfnOPt6L318K4I8YaNz6SxIHssw=;
h=Date:From:To:Subject:Message-Id:Mime-Version:DKIM-Signature;
b=KK67piveeizzGT8O0UsL3cvAMVXq7TFvGXLa4o+qDul/G0PRySvgbnEpILVYfJSv57AvBFCc2C6IXOsgyIOqL0QLhTbwSAZbx409k8QbjPBzA9Ucy14xgOlQICbDKNxoMySUsEd1IZmogdQg+CjRuWoZ8oUyFvy/4QzJmqOkDUA=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAE033858D20
Date: Wed, 25 Dec 2024 23:08:34 +0900
To: cygwin AT cygwin DOT com
Subject: Re: access X_OK for administrators has changed in cygwin 3.5.5
Message-Id: <20241225230834.b21c465455c4542854464d07@nifty.ne.jp>
In-Reply-To: <1947635.Bm8zEkEi59@nimes>
References: <1947635 DOT Bm8zEkEi59 AT nimes>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

On Wed, 25 Dec 2024 01:29:47 +0100
Bruno Haible wrote:
> Hi,
> 
> The behaviour of the access(_, X_OK) call has changed for administrator
> users in Cygwin 3.5.5. I don't know whether that's intended or not
> (haven't seen it mentioned in
> <https://sourceware.org/pipermail/cygwin-announce/2024-December/012023.html>).
> 
> How to reproduce:
> ========================== foo.c ===========================
> #include <stdio.h>
> #include <fcntl.h>
> #include <string.h>
> #include <grp.h>
> #include <unistd.h>
> int main ()
> {
>   close (creat ("file", 0600));
>   chmod ("file", 0400);
>   printf ("file X_OK ? %d\n", access ("file", X_OK));
> }
> ============================================================
> 1. In a normal Cygwin console (mintty):
>    $ rm -f file
>    $ gcc -Wall foo.c
>    $ ./a
>    => file X_OK ? -1
> 2. In a Cygwin console that runs "as administrator":
>    $ ./a
>    => In Cygwin 3.4.6: file X_OK ? -1
>       In Cygwin 3.5.5: file X_OK ? 0

Thanks for the report.

It is natural that the previleged account such as Administrator
and root (linux) have a full permission even with mode 400.

However, x permission should not be asserted for mode 400
even for Administrator/root, while it should enabled for
mode 500, 410, 401 etc.

Let me consider how to fix that.

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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