[Mono-bugs] [Bug 61510][Min] New - Process start code can try to execute directories

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 13 Jul 2004 22:34:01 -0400 (EDT)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by peter@newton.cx.


--- shadow/61510	2004-07-13 22:34:00.000000000 -0400
+++ shadow/61510.tmp.23951	2004-07-13 22:34:00.000000000 -0400
@@ -0,0 +1,36 @@
+Bug#: 61510
+Product: Mono: Runtime
+Version: unspecified
+OS Details: 
+Status: NEW   
+Priority: Minor
+Component: misc
+AssignedTo: dick@ximian.com                            
+ReportedBy: peter@newton.cx               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Process start code can try to execute directories
+The Start_internall icall for the Process.Start code will sometimes try to
+execute a directory in the right conditions. 
+When running with a relative pathname and UseShellExecute = false, the code
+will search for the executable in PWD. If it finds a file with the execute
+bit it will run it; however the code doesn't check if the file is regular.
+For a demonstration, use the attached demo.cs.
+$ mcs demo.cs
+$ mono demo.exe
+$ mkdir ls
+$ mono demo.exe
+I will attach a workaround patch. The CreateProcess() function in io-layer
+seems like it might have similar issues, but just the patch that I have is
+enough to avoid this particular problem.