Throughout, open console handles with sharing for reading and writing.

* dcrt0.cc (insert_file): Open file with full sharing allowed.
	* hookapi.cc (find_first_notloaded_dll): Ditto.
	* spawn.cc (av::fixup): Ditto.
This commit is contained in:
Corinna Vinschen
2011-07-04 15:25:36 +00:00
parent d3ed549d51
commit fc3e7da6b0
7 changed files with 21 additions and 14 deletions

View File

@ -95,12 +95,12 @@ insert_file (char *name, char *&cmd)
PWCHAR wname = tp.w_get ();
sys_mbstowcs (wname, NT_MAX_PATH, name + 1);
f = CreateFileW (wname,
GENERIC_READ, /* open for reading */
FILE_SHARE_READ, /* share for reading */
&sec_none_nih, /* default security */
OPEN_EXISTING, /* existing file only */
FILE_ATTRIBUTE_NORMAL,/* normal file */
NULL); /* no attr. template */
GENERIC_READ, /* open for reading */
FILE_SHARE_VALID_FLAGS, /* share for reading */
&sec_none_nih, /* default security */
OPEN_EXISTING, /* existing file only */
FILE_ATTRIBUTE_NORMAL, /* normal file */
NULL); /* no attr. template */
if (f == INVALID_HANDLE_VALUE)
{