[SSSD] [PATCH] sdap_get_ad_tokengroups_initgroups_lookup_done(): fix group_name may be uninitialized warning

Stephen Gallagher sgallagh at redhat.com
Mon Sep 24 15:32:52 UTC 2012


On Mon 24 Sep 2012 11:24:59 AM EDT, Stephen Gallagher wrote:
> On Mon 24 Sep 2012 11:01:20 AM EDT, Pavel Březina wrote:
>> Recent AD patches introduced another warning.
>>
>> If I read the code correctly it is safe to just initialize the
>> variable to NULL.
>>
>
> Nack, this would not be safe. We would then be attempting to
> talloc_strdup() the NULL value at line 367. What is actually wrong
> here is that the error check from sysdb_search_group_by_gid() needs to
> fail if it returns anything but EOK or ENOENT, which I forgot to
> include. Falling through below is bad.
>
> Thanks for catching that.


Whoops, forgot to attach the patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-AD-Handle-sysdb-lookup-failure-during-tokenGroups-pr.patch
Type: text/x-patch
Size: 1103 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120924/e7d4936b/attachment.bin>


More information about the sssd-devel mailing list