Latest Time Machine Patch

Kevin Anderson andersonkw2 at gmail.com
Tue Oct 3 00:34:53 UTC 2017


Hi Jeremy/Ralph,
    I have attached a new patch
(0001-s3-smbd-register-Time-Machine-shares-with-Avahi.patch) from Omri
which adds the NULL checks and a TALLOC allocator. The remaining
patches have not been modified. I have tested the Avahi change and
things appear to function as expected. Can I have a review on these
changes?

Thanks,
Kevin Anderson

On Fri, Sep 29, 2017 at 8:27 PM, Jeremy Allison <jra at samba.org> wrote:
> On Fri, Sep 29, 2017 at 07:21:46PM -0500, Omri Mor wrote:
>> This was discussed previously. Did you read the warning I put in the top of the file?
>>
>> /*
>>  * Avahi aborts on allocation failure (OOM),
>>  * unless a custom allocator which doesn't do so has been set.
>>  *
>>  * This is particularly important for the avahi_string_list_*() functions,
>>  * which return NULL on allocation failure.
>>  * Since it should abort on allocation failure (before returning NULL),
>>  * we don't check the result.
>>  */
>>
>> Adding in a check for NULL doesn’t matter, as it aborts long before we would see that NULL.
>> In fact, the documentation doesn’t even state that it /can/ return NULL—I only found that out by reading the Avahi source.
>
> Yes, I read the source to determine it can return NULL,
> that's why I wanted the checks here.
>
> I must have missed the previous discussion on this, 'cos
> I'd never have agreed to ignore NULL checks on allocation
> return. Just because the current allocator aborts doesn't
> mean the newest-shiny-updated one also will.
>
> Please add the explicit NULL checks, otherwise
> we're going to get coverity false positives.
>
> Jeremy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-smbd-register-Time-Machine-shares-with-Avahi.patch
Type: text/x-patch
Size: 4552 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20171002/bf1bf671/0001-s3-smbd-register-Time-Machine-shares-with-Avahi.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-docs-vfs_fruit-Add-Time-Machine-support.patch
Type: text/x-patch
Size: 2119 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20171002/bf1bf671/0002-docs-vfs_fruit-Add-Time-Machine-support.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vfs_fruit-Add-Time-Machine-support.patch
Type: text/x-patch
Size: 2525 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20171002/bf1bf671/0001-vfs_fruit-Add-Time-Machine-support.bin>


More information about the samba-technical mailing list