Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-23 Thread Houder
On Wed, 07 Aug 2019 08:12:28, Houder wrote: > On Tue, 6 Aug 2019 19:09:04, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin" > wrote: > > > zero-sized? Irrelevant. > > > > It is actually very relevant. Because executing an empty script results in= > > "success" (exit code 0) -- that creates a

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Houder
On Tue, 6 Aug 2019 19:09:04, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin" wrote: > > zero-sized? Irrelevant. > > It is actually very relevant. Because executing an empty script results in= > "success" (exit code 0) -- that creates a false-positive. Good morning Anton, Sorry for being bri

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> I did read the thread. Really? > which you confirmed after the fact. Oh really? Then read again: In my initial post that started the entire thread I wrote: > On Unix, an empty file can only be executed (exit code 0) if there's the "x" > permission granted. So what's your deal, exactly?

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Vince Rice
> On Aug 6, 2019, at 4:16 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote: > >> Which is why, as Ken said, the size is irrelevant. > > Which makes your comment irrelevant as well. Read the thread what I was > responding and to whom before trolling. I did read the thread. And Ken's comment was e

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> Which is why, as Ken said, the size is irrelevant. Which makes your comment irrelevant as well. Read the thread what I was responding and to whom before trolling. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: htt

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Vince Rice
> On Aug 6, 2019, at 3:39 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via wrote: > >> But what's your basis for saying that an empty script shouldn't be >> executable? > > I meant it only in the context of the script file lacking the proper "x" > permission. > Of course an empty script _with_ such

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> But what's your basis for saying that an empty script shouldn't be executable? I meant it only in the context of the script file lacking the proper "x" permission. Of course an empty script _with_ such permissions allowed must be executable, and it will always complete with exit code 0. -- P

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Ken Brown
On 8/6/2019 3:09 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: >> zero-sized? Irrelevant. > > It is actually very relevant. Because executing an empty script results in > "success" (exit code 0) -- that creates a false-positive. You were absolutely right on your first complaint, th

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> zero-sized? Irrelevant. It is actually very relevant. Because executing an empty script results in "success" (exit code 0) -- that creates a false-positive. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cy

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Corinna Vinschen
On Aug 6 10:33, Corinna Vinschen wrote: > On Aug 6 03:19, Ken Brown wrote: > > >>> On 8/5/2019 2:18 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin > > >>> wrote: > > Hi, > > > > Please consider the following shell session: > > > > $ cat dummy.c > > #include >

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Corinna Vinschen
On Aug 6 03:19, Ken Brown wrote: > On 8/5/2019 4:39 PM, Ken Brown wrote: > > On 8/5/2019 4:19 PM, Thomas Wolff wrote: > >> > >> Am 05.08.2019 um 22:01 schrieb Ken Brown: > >>> On 8/5/2019 2:18 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin > >>> wrote: > Hi, > > Please conside

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-05 Thread Houder
On Mon, 5 Aug 2019 18:18:52, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin" wrote: > Hi, > > Please consider the following shell session: > > $ cat dummy.c > #include > > int main() > { > return 0; > } > $ gcc -o dummy dummy.c > $ mv dummy.exe dummy > $ ./dummy > $ echo $? > 0 > $ chmod

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-05 Thread Ken Brown
On 8/5/2019 4:39 PM, Ken Brown wrote: > On 8/5/2019 4:19 PM, Thomas Wolff wrote: >> >> Am 05.08.2019 um 22:01 schrieb Ken Brown: >>> On 8/5/2019 2:18 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: Hi, Please consider the following shell session: $ cat dummy.c >>

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-05 Thread Ken Brown
On 8/5/2019 4:19 PM, Thomas Wolff wrote: > > Am 05.08.2019 um 22:01 schrieb Ken Brown: >> On 8/5/2019 2:18 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: >>> Hi, >>> >>> Please consider the following shell session: >>> >>> $ cat dummy.c >>> #include >>> >>> int main() >>> { >>>  

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-05 Thread Thomas Wolff
Am 05.08.2019 um 22:01 schrieb Ken Brown: On 8/5/2019 2:18 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: Hi, Please consider the following shell session: $ cat dummy.c #include int main() { return 0; } $ gcc -o dummy dummy.c $ mv dummy.exe dummy $ ./dummy $ echo $? 0 $ c

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-05 Thread Ken Brown
On 8/5/2019 2:18 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: > Hi, > > Please consider the following shell session: > > $ cat dummy.c > #include > > int main() > { > return 0; > } > $ gcc -o dummy dummy.c > $ mv dummy.exe dummy > $ ./dummy > $ echo $? > 0 > $ chmod a-x dummy

Empty file without "x" permission is successfully executable on Cygwin

2019-08-05 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Hi, Please consider the following shell session: $ cat dummy.c #include int main() { return 0; } $ gcc -o dummy dummy.c $ mv dummy.exe dummy $ ./dummy $ echo $? 0 $ chmod a-x dummy $ ./dummy -bash: ./dummy: Permission denied $ rm dummy $ touch dummy $ ./dummy $ echo $? 0 So Cygwin lets the