[SSSD] [INI] Patches for ding-libs: Merging config sections, handling metadata, remaining Coverity issues...

Dmitri Pal dpal at redhat.com
Mon Mar 26 14:55:30 UTC 2012


On 03/26/2012 04:49 AM, Jan Zelený wrote:
> #0016:
> Ack
>
> #0017:
> I'm not sure what's the point in checking errno when malloc fails. IIRC the 
> errno will be always ENOMEM. The same applies to the strndup several lines 
> below.
>
> The initialization block (new_ctx->.... = NULL) is redundant, you set 
> everything necessary later and in case of any error, uninitalized values won't 
> make it out of the function anyway.
>
> #0018:
> Ack
>
> #0019:
> The return error at the end is misleading, please use return EOK instead 
> (similar issue is in other patches as well, please change it when you see it).
>
> #0020:
> Please change the comment to:
> Determines if two file contexts are different by comparing:
>
> I don't like the prototype of ini_config_changed(). Is it necessary to return 
> special error code? I would perform the check and in case of wrong input, I'd 
> fall back to the safe option - return true (as in the config file has changed). 
> In this case no special check is necessary and the code will be more readable.
>
> #0021:
> Ack
>
> #0022:
> I'm confused. In the patch comment you write that we can't remove it from the 
> old interface but yet you remove it from the header file. I'd say it should 
> remain there (and be marked) as well.
>
> #0023:
> Ack
>
> #0024:
> Ack
>
I am re-sending the whole set.

In #0015 I removed the trailing spaces Stephen noted in the other mail.
The rest 14 are the same.

#0017  - remove the initialization of the filename. Removing other
initialization is unsafe. Agreed on IRC.
Opened a ticket to do trust malloc to return ENOMEM.
https://fedorahosted.org/sssd/ticket/1276
I was told that malloc() by standard must return ENOMEM. Doe this
standard apply to all distros or just Linux?

#0019
Removed error variable and return EOK directly.

#0020
Changed comment.
Removed error variable and return EOK directly.
We agree on IRC that it is OK to keep function signature as is.

#0022
Unchanged.
Explanation:
Some time ago I started building a parallel interface in ini_configobj.h
to the existing public interface that is in ini_config.h So we do not
change the public existing one until the new one is ready and
stabilized. As one of the steps to prepare the new interface I renamed
the function in the new interface to be consistent with the naming
convention. I might provide some compatibility layer when I am ready to
switch from the old interface to the new interface but this is out of
scope of the current patch set.

The rest are same.

-- 
Thank you,
Dmitri Pal

Sr. Engineering Manager IPA project,
Red Hat Inc.


-------------------------------
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/



-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-INI-Fixing-coverity-issues-10078-10079.patch
Type: text/x-patch
Size: 1907 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-INI-New-error-codes-and-messages.patch
Type: text/x-patch
Size: 4155 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-INI-New-merge-flags.patch
Type: text/x-patch
Size: 2680 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-INI-Add-new-vars-to-parse-structure.patch
Type: text/x-patch
Size: 1937 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-INI-Add-save_error-function.patch
Type: text/x-patch
Size: 1655 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-INI-Change-parse_error-to-use-save_error.patch
Type: text/x-patch
Size: 2304 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-INI-Preparing-for-merging-sections.patch
Type: text/x-patch
Size: 6591 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-INI-Enhance-value-processing.patch
Type: text/x-patch
Size: 10463 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-INI-Use-section-line-number.patch
Type: text/x-patch
Size: 1037 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-INI-Refactor-section-processing.patch
Type: text/x-patch
Size: 5317 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-INI-Return-error-in-DETECT-mode.patch
Type: text/x-patch
Size: 1183 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0012-INI-New-test-files-for-section-merge.patch
Type: text/x-patch
Size: 12624 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0013-INI-Test-DETECT-mode-and-use-new-file.patch
Type: text/x-patch
Size: 3269 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-INI-Test-for-all-section-merge-modes.patch
Type: text/x-patch
Size: 9735 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0013.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0015-INI-Fix-indentention-in-the-switch-statement.patch
Type: text/x-patch
Size: 1647 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0014.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0016-INI-Separate-close-and-destroy.patch
Type: text/x-patch
Size: 5263 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0015.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0017-INI-Function-to-reopen-file.patch
Type: text/x-patch
Size: 3976 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0016.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0018-INI-Metadata-collection-is-gone.patch
Type: text/x-patch
Size: 8197 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0017.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0019-INI-Check-access-function.patch
Type: text/x-patch
Size: 3965 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0018.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0020-INI-Function-to-check-for-changes.patch
Type: text/x-patch
Size: 2052 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0019.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0021-INI-Tests-for-access-and-changes.patch
Type: text/x-patch
Size: 9801 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0020.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0022-INI-Rename-error-print-function.patch
Type: text/x-patch
Size: 4200 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0021.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0023-INI-Initialize-variables-in-loops.patch
Type: text/x-patch
Size: 3265 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0022.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0024-INI-Exposing-functions.patch
Type: text/x-patch
Size: 1665 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120326/e9fc3eb0/attachment-0023.bin>


More information about the sssd-devel mailing list