[PATCHES] fix owner of files created when running as root
Scott Lovenberg
scott.lovenberg at gmail.com
Thu May 4 18:13:06 UTC 2017
>> Minor nit pick on a stylistic choice... This might fall into the realm
>> of design though, so I'd appreciate thoughts and opposing opinions.
>>
>> "void take_ownership(connection_struct *conn, files_struct *fsp)"
>> Perhaps this should return an NTSTATUS-ish or other error code rather
>> than being void with multiple exit-on-failure paths? The caller might
>> care that the call failed silently (other than being logged inside the
>> function).
>>
>> Feel free to flame me now. :)
>>
> Yep. The whole point of making that function public is that others might
> use it, and to be generally useful it has to return status (how's that
> for a flame?)
So far as flames go, it was quite underwhelming, but I'm calibrating
on the "from one to vi vs. emacs" scale which isn't at all linear. :)
>
> Attached v3 of the patch set with take_ownership() returning a value (I
> hope that won't upset Coverity since in my use case I don't check that
> value, I think Coverity limits its check-for-return to standard library
> calls).
Thanks for making that change. :)
--
Peace and Blessings,
-Scott.
More information about the samba-technical
mailing list