Mail Archives: cygwin/2012/04/20/18:10:29
X-Recipient: | archive-cygwin AT delorie DOT com
|
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
|
Message-ID: | <4F91DEBA.9030903@gmail.com>
|
Date: | Sat, 21 Apr 2012 09:10:02 +1100
|
From: | Mike Kaganski <mikekaganski AT gmail DOT com>
|
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 AT cygwin DOT com
|
Subject: | Re: Why /usr/bin/*.dll must be executable?
|
References: | <4F915E65 DOT 8070608 AT gmail DOT com> <CAKw7uVjf6kt2O=u4EB4xDGgF5wCvqRmtO6v_bc51R7Qj2RFZLw AT mail DOT gmail DOT com> <4F918C2A DOT 2080300 AT gmail DOT com> <20120420162718 DOT GK22155 AT calimero DOT vinschen DOT de> <4F919DA6 DOT 7000700 AT gmail DOT com> <4F919F9C DOT 1080307 AT cygwin DOT com> <4F91A11C DOT 5000300 AT gmail DOT com> <4F91A392 DOT 7070108 AT cygwin DOT com> <4F91A912 DOT 9000103 AT gmail DOT com>
|
In-Reply-To: | <4F91A912.9000103@gmail.com>
|
X-IsSubscribed: | yes
|
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
|
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
- Raw text -