From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10269 invoked by alias); 20 Apr 2012 22:10:20 -0000 Received: (qmail 10257 invoked by uid 22791); 20 Apr 2012 22:10:19 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-lb0-f171.google.com (HELO mail-lb0-f171.google.com) (209.85.217.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Apr 2012 22:10:05 +0000 Received: by lbon10 with SMTP id n10so7444068lbo.2 for ; Fri, 20 Apr 2012 15:10:03 -0700 (PDT) Received: by 10.152.112.100 with SMTP id ip4mr7533178lab.1.1334959803361; Fri, 20 Apr 2012 15:10:03 -0700 (PDT) Received: from [192.168.1.10] ([164.138.90.134]) by mx.google.com with ESMTPS id sv9sm6984910lab.10.2012.04.20.15.10.01 (version=SSLv3 cipher=OTHER); Fri, 20 Apr 2012 15:10:02 -0700 (PDT) Message-ID: <4F91DEBA.9030903@gmail.com> Date: Fri, 20 Apr 2012 22:10:00 -0000 From: Mike Kaganski User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Why /usr/bin/*.dll must be executable? References: <4F915E65.8070608@gmail.com> <4F918C2A.2080300@gmail.com> <20120420162718.GK22155@calimero.vinschen.de> <4F919DA6.7000700@gmail.com> <4F919F9C.1080307@cygwin.com> <4F91A11C.5000300@gmail.com> <4F91A392.7070108@cygwin.com> <4F91A912.9000103@gmail.com> In-Reply-To: <4F91A912.9000103@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2012-04/txt/msg00455.txt.bz2 On 4/21/2012 5:21 AM, De-Jian Zhao wrote: > ... > Then, what limitations does the Windows loader have? > As far as I know, there is no x bits for windows, right? How does the > "chmod a-x" affect the file behavior under Windows if this is a > Windows thing? I am completely confused. When I ran "chmod a-x *.dll", > I assumed that these dll files were not executed directly under Cygwin > or Windows; they were just some files storing the required functions > or something; removing the x bits should not affect the behavior of > Cygwin and Windows. If have run "chmod a-x" on the Windows system dll > files, that will lead to the corruption of Windows, right? Thank God. > I didn't do that. > > > > -- > 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 > The term "Executable" is not limited to the files that are run directly. It rather shows that this file contains executable code, and in case of DLLs, this is almost always true (unless they are resource-only DLLs; note that sometimes unaware programmers create DLLs wich contain only resources, but fail to create proper resource-only DLLs, ant they still contain loading and unloading code). Any code that may be executed (directly or indirectly) must have "x" under *nix. Windows had tried to make somewhat similar (with the same security concerns in mind) in its NT family, but it had to deal with file systems that have no notion of "executability" (FAT), so the notion was introduced in NTFS, but is not honored (thus, "execute" ACL permission is useless in Windows). As Cygwin tries to emulate *nix, I suppose, it explicitly checks executable bit on loading files. So it's not correct to state that "this is completely Windows loader thing", but this thing is conceptually correct, so live with it. -- Best regards, Mike. -- 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