public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Mike Kaganski <mikekaganski@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Why /usr/bin/*.dll must be executable?
Date: Fri, 20 Apr 2012 22:10:00 -0000	[thread overview]
Message-ID: <4F91DEBA.9030903@gmail.com> (raw)
In-Reply-To: <4F91A912.9000103@gmail.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

  parent reply	other threads:[~2012-04-20 22:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 13:03 De-Jian Zhao
2012-04-20 13:05 ` De-Jian Zhao
2012-04-20 13:08 ` Václav Zeman
2012-04-20 16:18   ` De-Jian Zhao
2012-04-20 16:28     ` Corinna Vinschen
2012-04-20 17:25       ` Nellis, Kenneth
2012-04-20 17:29         ` Larry Hall (Cygwin)
2012-04-20 17:37           ` De-Jian Zhao
2012-04-20 17:46             ` Larry Hall (Cygwin)
2012-04-20 17:40           ` Nellis, Kenneth
2012-04-20 17:32       ` De-Jian Zhao
2012-04-20 17:41         ` Larry Hall (Cygwin)
2012-04-20 17:47           ` De-Jian Zhao
2012-04-20 17:58             ` Larry Hall (Cygwin)
2012-04-20 18:21               ` De-Jian Zhao
2012-04-20 18:43                 ` Larry Hall (Cygwin)
2012-04-20 22:10                 ` Mike Kaganski [this message]
2012-04-22  2:29                   ` Larry Hall (Cygwin)
2012-04-20 18:05             ` Larry Hall (Cygwin)
2012-04-23 19:01   ` Warren Young
2012-04-23 20:16     ` Larry Hall (Cygwin)
2012-04-23 22:13       ` Warren Young
2012-04-23 23:55       ` Richard Troy
2012-04-24  0:19         ` Warren Young
2012-04-24 16:49           ` Larry Hall (Cygwin)
2012-04-20 19:06 ` Jon TURNEY
2012-04-21  3:37   ` De-Jian Zhao
2012-04-23 19:02   ` Warren Young
2012-04-23 19:26     ` David Sastre Medina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F91DEBA.9030903@gmail.com \
    --to=mikekaganski@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).