Paul Bryan Roberts pbronline-wine@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 anyway.