On Mon, 2005-10-03 at 21:08, Dmitry Timoshkov wrote:
"Michael Ost" most@museresearch.com wrote:
My "solution" (polite term) was to force GENERIC_READ|GENERIC_WRITE access in ntdll/NtCreateFile if the sharing type is FILE_SHARE_WRITE.
Most likely sharing mode has nothing to do with access rights. The problem is that the app doesn't specify neither of GENERIC_xxxx flags. But it does specify STANDARD_RIGHTS_ALL == (DELETE|READ_CONTROL|WRITE_DAC|WRITE_OWNER|SYNCHRONIZE). It appears that Windows treats GENERIC_xxxx rights as an addition to the STANDARD_RIGHTS_xxx flags, and missing GENERIC_xxxx rights are normally ignored.
While I wait for a real solution, I need to hack wine 20050930 to get this app running. I tweaked my patch based on your feedback (thanks!) and included it below.
Does this patch look dangerous in any way to those of you who know your way around this code? It's done in NtCreateFile after a bunch of non-file types (like mail slots, etc) are handled.
--- wine-20050930/dlls/ntdll/file.c 2005-09-26 04:02:45.000000000 -0700 +++ wine-20050930.new/dlls/ntdll/file.c 2005-10-05 15:16:18.000000000 -0700 @@ -206,6 +206,14 @@
if (io->u.Status == STATUS_SUCCESS) { + /* hack for Ivory Library Installer - force GENERIC_xxx access on */ + if ((access & STANDARD_RIGHTS_ALL) == STANDARD_RIGHTS_ALL) { + if ((access & (GENERIC_READ|GENERIC_WRITE)) == 0) { + FIXME("Forcing GENERIC_xxx access\n"); + access |= (GENERIC_READ|GENERIC_WRITE); + } + } + SERVER_START_REQ( create_file ) { req->access = access;
Thanks... mo