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

Alexandre Julliard julliard at winehq.org
Tue Nov 4 04:37:41 CST 2008

Paul Bryan Roberts <pbronline-wine at yahoo.co.uk> writes:

> 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.

No, it's not what is wanted. If there's a need to retrieve some
information before setting that's the responsibility of the individual
object. Also returning an error on setting the owner can potentially
break some apps, for no good reason since we can't set the Unix owner

Alexandre Julliard
julliard at winehq.org

More information about the wine-devel mailing list