[PATCH 2/6] server: Fix lacuna in server side implementation of SetFileSecurity()

Paul Bryan Roberts pbronline-wine at yahoo.co.uk
Tue Nov 4 02:03:39 CST 2008


This patch is one a series intended to fix Bug 14434 (WordPerfect Office 
2002:  Unable to Install).

The problem here is that the installer calls GetFileSecurity() on 
directories, not files while the Wine server only has support for this 
API call for files, not directories.

The solution seems simple - implement support for directories by cloning 
the support for files.  Provided, of course, that this is backed up by 
cloning the conformance tests.

The problem here is that cloning propagates maintenance headaches.  If 
the support for GetFileSecurity() is cloned, then folks might reasonably 
expect the support for SetFileSecurity() to be cloned too, bugs and all.

The bit I take issue with is not cloning the "FIXME: get Unix uid and 
call fchown" in file_set_sd(), nor really the idea that this bit of code 
does nothing, not even return an error to indicate it has not succeeded 
but that it is always executed (as it were).

This is because, as the code stands, the object's sd is not current.  
There should be a call to file_get_sd() to make it so, then 
file_set_sd() will only (not) try to change the file's ownership only if 
that is what the calling application wants.  By putting the call to 
get_sd() in handle.c, the fix covers all implementations of 
get_sd()/set_sd(), which may not be what is wanted.

To back this up, some more conformance tests have been added.  I don't 
know that these are particularly representative but they do at least 
show the problem described above and confirm its resolution.

Conformance tests checked again W2K and WXP, both administrator and user 
accounts.



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-server-Fix-lacuna-in-server-side-implementation-of-Se.txt
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20081104/5418e207/attachment-0001.txt 


More information about the wine-patches mailing list