[SSSD] [PATCH] sss_userdel and sss_groupdel with use_fully_qualified_names

Michal Židek mzidek at redhat.com
Mon Jan 7 15:21:04 UTC 2013


On 01/07/2013 04:08 PM, Simo Sorce wrote:
> On Mon, 2013-01-07 at 16:04 +0100, Michal Židek wrote:
>> +    if (dom->fqnames) {
>> +        fqdn = talloc_asprintf(tmp_ctx, dom->names->fq_fmt, name,
>> dom->name);
>> +        if (fqdn == NULL) {
>> +            DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory.\n"));
>> +            ret = ENOMEM;
>> +            goto done;
>> +        }
>> +        to_sized_string(&delete_name, fqdn);
>> +        ret = sss_mmap_cache_pw_invalidate(mc_ctx, &delete_name);
>> +        if (ret != EOK && ret != ENOENT) {
>> +            DEBUG(SSSDBG_CRIT_FAILURE,
>> +                  ("Internal failure in memory cache code: %d [%
>> s]\n",
>> +                   ret, strerror(ret)));
>> +            goto done;
>> +        }
>> +    } else {
>> +        to_sized_string(&delete_name, name);
>> +        ret = sss_mmap_cache_pw_invalidate(mc_ctx, &delete_name);
>> +        if (ret != EOK && ret != ENOENT) {
>> +            DEBUG(SSSDBG_CRIT_FAILURE,
>> +                  ("Internal failure in memory cache code: %d [%
>> s]\n",
>> +                   ret, strerror(ret)));
>> +        }
>> +        goto done;
>> +    }
>
> Please do not repeat the call to sss_mmap_cache_pw_invalidate() twice.
>
> Call it just once after the if/else setup for delete_name.
>
> Simo.
>

New patch attached.

Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sss_userdel-and-sss_groupdel-with-use_fully_qualifie.patch
Type: text/x-patch
Size: 4541 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130107/018ff833/attachment.bin>


More information about the sssd-devel mailing list