History log of /sssd-io/src/tools/sssctl/sssctl_cache.c
Revision Date Author Comments Expand
0e238c259c066cf997aaa940d33d6bda96c15925 27-Nov-2017 Sumit Bose <sbose@redhat.com>

sysdb: do not use objectClass for users and groups The majority of the object in the SSSD cache are users and groups. If there are many user and groups in the cache the index objects of the objectclass attributes 'user' and 'group' become large because the must hold references to all objects of those object classes. As a result the management of these index objects becomes costly because they must be parsed and split apart quite often. Additionally they are mostly useless because user and groups are lookup up by more specific attributes in general. Only when enumerating all user or groups this kind of index might be useful. There are two way of removing this kind of index from the user and group objects. Either by removing objectClass from the list of indexes and add a new attribute to all other type of object we want and index for. Or by replacing objectClass with a different attribute for the user and group objects. After some testing I think the latter one is the more reliable one and implemented it in this patch. Related to https://pagure.io/SSSD/sssd/issue/3503 Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

/sssd-io/src/db/sysdb.h /sssd-io/src/db/sysdb_init.c /sssd-io/src/db/sysdb_ops.c /sssd-io/src/db/sysdb_search.c /sssd-io/src/db/sysdb_upgrade.c /sssd-io/src/ldb_modules/memberof.c /sssd-io/src/providers/ad/ad_pac.c /sssd-io/src/providers/ipa/ipa_id.c /sssd-io/src/providers/ipa/ipa_subdomains_ext_groups.c /sssd-io/src/providers/ipa/ipa_subdomains_id.c /sssd-io/src/providers/krb5/krb5_renew_tgt.c /sssd-io/src/providers/ldap/ldap_id_cleanup.c /sssd-io/src/providers/ldap/sdap_async_groups.c /sssd-io/src/providers/ldap/sdap_async_initgroups.c /sssd-io/src/providers/ldap/sdap_async_initgroups_ad.c /sssd-io/src/providers/ldap/sdap_async_nested_groups.c /sssd-io/src/responder/common/cache_req/plugins/cache_req_common.c /sssd-io/src/responder/ifp/ifp_cache.c /sssd-io/src/responder/ifp/ifp_groups.c /sssd-io/src/responder/ifp/ifp_users.c /sssd-io/src/responder/nss/nss_cmd.c /sssd-io/src/responder/nss/nss_protocol_grent.c /sssd-io/src/responder/nss/nss_protocol_sid.c /sssd-io/src/tests/cmocka/test_ad_common.c /sssd-io/src/tests/cmocka/test_ipa_subdomains_server.c /sssd-io/src/tests/sysdb-tests.c sssctl_cache.c
3cb4592e27dac8032bd528b6a9f1b49dfa4ec0b8 25-Sep-2017 Fabiano Fidêncio <fidencio@redhat.com>

SSSCTL: Use get_ prefix for the sssctl_attr_fn functions As done for the attr_name_fn to avoid "-Wshadow", let's be consistent and do the same for all the other sssctl_attr_fn functions. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

1ef1056e73e306eb042c4d58f9cfaee621a5cbbe 25-Sep-2017 Fabiano Fidêncio <fidencio@redhat.com>

SSSCTL: Fix "-Wunitialized" caught by GCC This warning only happens when building SSSD on RHEL6. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

47863dee64fa93859bc16ddc387010734da665ee 25-Sep-2017 Fabiano Fidêncio <fidencio@redhat.com>

SSSCTL: Fix "-Wshadow" warning caught by GCC This warning only happens when building SSSD on RHEL6. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

bf0b4eb335ec1fb4fdd925f5cf80490ec8b8c24e 01-Feb-2017 Lukas Slebodnik <lslebodn@redhat.com>

sssctl: Fix warning may be used uninitialized gcc 7 probably does some new optimisations which might cause few wariables to be uninitialized. src/tools/sssctl/sssctl_cache.c: In function ‘sssctl_print_object’: src/tools/sssctl/sssctl_cache.c:523:13: error: ‘dom’ may be used uninitialized in this function [-Werror=maybe-uninitialized] ret = info[i].attr_fn(tmp_ctx, entry, dom, info[i].attr, &value); ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/tools/sssctl/sssctl_cache.c:472:15: error: ‘entry’ may be used uninitialized in this function [-Werror=maybe-uninitialized] *_entry = talloc_steal(mem_ctx, entry); ^~~~~~~~~~~~ src/tools/sssctl/sssctl_cache.c:437:25: note: ‘entry’ was declared here struct sysdb_attrs *entry; ^~~~~ Another workaround would be to remove static modifier from function sssctl_find_object which probably prevents some inlinig + optimisation. Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>

715abb607540945cc82355e94712da7ac9746a67 15-Dec-2016 Michal Židek <mzidek@redhat.com>

sssctl: Case insensitive filters Lowercase the filter in case insensitive domains. Resolves: https://fedorahosted.org/sssd/ticket/3235 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

d6e875c49d6be650a03fc14f00a680734b23ef66 15-Dec-2016 Michal Židek <mzidek@redhat.com>

sssctl: Search by alias Also search by alias when using sssctl to query the cache. Resolves: https://fedorahosted.org/sssd/ticket/3235 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

488b455f6b7881ec108a127840b1c1f1523d937f 05-Aug-2016 Michal Židek <mzidek@redhat.com>

sssctl: Consistent commands naming Use TOPIC-ACTION pattern for sssctl command names. Resolves: https://fedorahosted.org/sssd/ticket/3087 Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

f316e5446313bbf61c96b6763badc21604bff4a3 18-Jul-2016 Fabiano Fidêncio <fidencio@redhat.com>

sssctl: Use localtime for time stamps Resolves: https://fedorahosted.org/sssd/ticket/3096 Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>

aa691837a2fa2fe2e38a55d576644074e0f45bd8 13-Jul-2016 Pavel Březina <pbrezina@redhat.com>

sssctl: improve readability of a condition Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>

3c6e15e8aa38d9dfa02a7255fad56149bdfb35a6 13-Jul-2016 Pavel Březina <pbrezina@redhat.com>

sssctl: move filter creation to separate function Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>

64d664c201916d8678b5f4bd7e1559c7ece9217d 12-Jul-2016 Lukas Slebodnik <lslebodn@redhat.com>

sssctl: Fix warning maybe-uninitialized It looks like some special gcc optimalisation and special case may cause to have unitialized output argument _dom when return code is EOK src/tools/sssctl/sssctl_cache.c: In function ‘sssctl_print_object’: src/tools/sssctl/sssctl_cache.c:491:8: error: ‘dom’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (dom == NULL) { ^ src/tools/sssctl/sssctl_cache.c:447:15: error: ‘entry’ may be used uninitialized in this function [-Werror=maybe-uninitialized] *_entry = talloc_steal(mem_ctx, entry); ^~~~~~~~~~~~ src/tools/sssctl/sssctl_cache.c:412:25: note: ‘entry’ was declared here struct sysdb_attrs *entry; ^~~~~ Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

4b18d0c25471150940c1a552bc2504ff9debb703 11-Jul-2016 Lukas Slebodnik <lslebodn@redhat.com>

sssctl: Fix error handling after memory allocation failure Reviewed-by: Pavel Březina <pbrezina@redhat.com>

bad11d1d9bd7292dd64856b8156dfc65c891d8bf 07-Jul-2016 Jakub Hrozek <jhrozek@redhat.com>

TOOLS: sssctl: Work with trusted users For users and groups, convert the input name to the qualified format. Resolves: https://fedorahosted.org/sssd/ticket/3059 Reviewed-by: Sumit Bose <sbose@redhat.com>

e157b9f6cb370e1b94bcac2044d26ad66d640fba 27-Jun-2016 Pavel Březina <pbrezina@redhat.com>

sssctl: new tool Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>