[SSSD] [PATCH] util: Include disabled domains in link_forest_roots

Jakub Hrozek jhrozek at redhat.com
Mon Sep 14 15:43:05 UTC 2015


On Wed, Sep 09, 2015 at 02:43:59PM +0200, Michal Židek wrote:
> Hi,
> 
> patch for ticket
> https://fedorahosted.org/sssd/ticket/2673
> is in the attachment.
> 
> Thanks.
> Michal

> From 7c454bc2a737be05068418a5eef7fe9446bb5fa8 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzidek at redhat.com>
> Date: Wed, 9 Sep 2015 14:37:48 +0200
> Subject: [PATCH] util: Include disabled domains in link_forest_roots
> 
> Ticket:
> https://fedorahosted.org/sssd/ticket/2673
> ---
>  src/db/sysdb_subdomains.c     |  6 +++---
>  src/tests/cmocka/test_utils.c |  3 +++
>  src/util/domain_info_utils.c  | 21 ++++++++++++++++++---
>  src/util/util.h               |  3 +++
>  4 files changed, 27 insertions(+), 6 deletions(-)

The patch looks good but whenever I see us adding more and more boolean
switches, I wonder if we should just use flags instead?

This:
    get_next_domain_ex(d, GND_USE_DISABLED | GND_DESCEND);
Reads quite a bit easier to me than:
    get_next_domain_ex(d, true, false);

Also, bonus point are acquired next time we add a new flag, because not
all callers of the function must be converted..

What do you think?


More information about the sssd-devel mailing list