A little question o suggestion...

Urbez Santana Roma urbez at linuxupc.upc.es
Mon May 17 03:44:07 CDT 2004


El Lunes, 8 de Marzo de 2004 23:20, wine-devel-request at winehq.org escribió:    

The file wine/server/file.c contains in line 151 to 156 (function create_file)
the next lines:
-----------------------------------------------------------------------------------------------------------------
mode = (attrs & FILE_ATTRIBUTE_READONLY) ? 0444 : 0666;

    if (len >= 4 &&
        (!strcasecmp( name + len - 4, ".exe" ) || !strcasecmp( name + len - 4, 
".com" )))
        mode |= 0111;
------------------------------------------------------------------------------------------------------------------

That is a problem for a instal.lation programs or another programs that writen 
a Driver *.drv or a *.dll file, or another unknown extension.
When created the file, the permisions not be 0555 or 0777, and the program 
instal.led not works, wine cannot execute them.

My opinion, is that the files in a Windows Filesystem are virtually executable
(the flag not exist, and all is an executable if one loads to exec)
I cray that we must written the mode|=0111, whithout query the extension
'.exe' '.com' '.drv' '.dll', etc... (note that the code only wants .exe 
and .com)

I have write these modification and solutions the problem.
----------------------------------------------------------------------------------------------
mode = (attrs & FILE_ATTRIBUTE_READONLY) ? 0444 : 0666;
mode |= 0111;
----------------------------------------------------------------------------------------------
-- 

Another problem is in file wine/dlls/kernel/ne_module.c :
If the extension is not dll, exe, or com, the dll with another name cannot
be executed.

for example extensions with .drv .ldd .dat  that are really DLL's cannot be
executed, i have write a patch to solve it, but only i have added the 
extensions (that is not the correct solution).
If u will, i can write a patch that detect if it is a NE module really without
test the extension, (testing NE signature anz MZ, of the file...)

################################################
#- Urbez Santana i Roma -
#- Email: urbez at linuxupc.upc.es
#- Private Web:  http://linuxupc.upc.es/~urbez/
################################################




More information about the wine-devel mailing list