REQUEST: symlinks behaviour change

Raul Dias chaos at swi.com.br
Wed Aug 21 13:18:21 CDT 2002


Hi,

I would like to suggest a new way for wine deal with
symlinks in some situations.

The change in wine should be trivial, however I would like to know how
do you feel about this.

When building a fake windows tree, some files are symlinks
to winelib apps in the DLLDIR .

e.g.
c:\windows\notepad.exe -> /usr/lib/wine/notepad.exe.so
c:\windows\system\regsvr32.exe -> /usr/lib/wine/regsvr32.exe.so

Some applications tries to replace this files.
The way they do this is to open the file for writting.

However, if the fake_windows tree is owned by a non-root user 
(and wine is ran by a non-root user), but the DLLDIR files are 
owned by root, the open will fail.
This is because the user has no writting permition to the symlink destination 
file.

This is a Good Thing, because if wine was run by root, the file in the DLLDIR
would probably be replaced.

However, some applications needs to replace this files.

I noted this with the Internet Explorer Installer (5.01 sp1 and 6.0). If it cannot
replace the c:\windows\system\regsrv32.exe file it will abort.

However, as the c:\windows\system\regsrv32.exe is a symlink and wine has permition
to move/delete this symlink, I would link to suggest that wine
first delete the symlink file when an application tries to write on it.

This has 2 benefits:

1 - wine will be able to replace files that are symlinks to files it does not
    have write permition.

2 - root run wine programs will not overwrite files in the DLLDIR if it tries to
    overwrite the symlinks that points to them.


So, what do you think?


[]'s
Raul Dias




More information about the wine-devel mailing list