This is the mail archive of the cygwin-apps 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: ocaml packaging issue


On Oct 19 05:53, Andy Koppe wrote:
> The executables in the ocaml package have access rights rwx--x--x,
> which means non-admins can't run them:
> 
> bash: /usr/bin/ocaml: Permission denied

Execute permissions alone should be sufficient to start an executable,
usually.

That's a bug in Cygwin.  The code spawning a new process tries to open
the executable for reading to find out if it's a Cygwin executable,
a native Windows executable, or a script.  The problem is that the code
assumes non-executablity if the couldn't be opened for reading and
returns an error.

I applied a patch which checks if the file couldn't be opened due to
an ACCESS_DENIED.  If so, it checks explicitely for executability.
If the file is executable, it just assumes a Cygwin executable now.
This won't work nicely for native executables, but a file which is
non-readable but executable is rather unlikely on the native Win32
level.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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