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
You're right for benefits. But will wine have the same behavior as before ? In your example, the symlink for regsrv32 is replaced. We could have a functionnality loss : will the regsrv32 still be built-in without its symlink ?
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.
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
oi,
spetreolle@yahoo.fr wrote:
You're right for benefits. But will wine have the same behavior as before ? In your example, the symlink for regsrv32 is replaced. We could have a functionnality loss : will the regsrv32 still be built-in without its symlink ?
No. It won;t be builtin. It will be a native regsrv32.exe.
It is important to note that if I have ran IE installer as root (as root owns /usr/lib/wine/regsrv32.exe.so in my system), the installation would have overwritten this file and any fake windows tree which symlinks to it (I have a few) would be using the native version instead of the builtin.
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.
[]'s Raul Dias