This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoiding /etc/passwd and /etc/group scans


On Tue, Oct 22, 2002 at 04:51:34PM -0400, Pierre A. Humblet wrote:
>Christopher Faylor wrote:
>> 
>> 
>> I guess I have to look at the code.  A file with a .exe extension is
>> supposed to be executable by default.  It should even show up as -x.
>> 
>That's without ntsec. With ntsec Cygwin reads the Windows ACL and 
>attempts to translate it to Unix modes.
>
>The executability of a file (ultimately by Windows) shouldn't depend on
>ntsec, although the mode displayed by ls -l does.  With ntsec you can
>chmod 666 a.exe and it won't be executable (even by clicking on it),
>although ls -l with nontsec will show x (that's an item I didn't
>understand in Jason't recent mail).

Ok.  So I just screwed cygwin up with my recent patch.  I made ls -l
always display -x for .exe files but the file is not really executable
by windows.  Guess I'll revert that.

So, should I also revert the '#!' detection, too?  That won't be
affected by the same scenario since the execution is controlled
completely from cygwin.

So, anyway, how are we getting non-executable .exe files, then?

>Jason raised another issue:
>> My WAG is that /bin is 700 and owned by Administrators which causes
>> setup.exe to create .exe files with the same permissions. 
>I have not followed setup, so ignore the questions if they are worn out:
>- Does setup attempt to control the modes of the files it unpack?

IIRC, Corinna added some code to setup to set intelligent defaults.

>- Do the modes depend on the value of ntsec when setup is run 
>  (e.g. inheriting from the directory)?  

Nope.  setup isn't a cygwin app, so...
cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]