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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Takashi Yano via Cygwin Reply-To: Takashi Yano Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" 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 > ). > > How to reproduce: > ========================== foo.c =========================== > #include > #include > #include > #include > #include > 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 -- 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