History log of /sssd-io/src/tests/cmocka/test_sysdb_sudo.c
Revision Date Author Comments Expand
57c5ea8825c7179fd93382dbcbb07e828e5aec19 29-Jan-2018 René Genz <liebundartig@freenet.de>

Fix minor spelling mistakes in tests/cmocka/* Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

data_provider/test_dp_builtin.c data_provider/test_dp_request.c data_provider/test_dp_request_table.c sbus_internal_tests.c test_ad_access_filter.c test_ad_common.c test_ad_gpo.c test_ad_subdomains.c test_authtok.c test_be_ptask.c test_cert_utils.c test_certmap.c test_child_common.c test_copy_ccache.c test_copy_keytab.c test_data_provider_be.c test_dp_opts.c test_dyndns.c test_fo_srv.c test_fqnames.c test_ifp.c test_inotify.c test_ipa_dn.c test_ipa_idmap.c test_ipa_subdomains_server.c test_ipa_subdomains_utils.c test_kcm_json_marshalling.c test_kcm_queue.c test_krb5_common.c test_krb5_wait_queue.c test_ldap_id_cleanup.c test_nested_groups.c test_nss_srv.c test_pam_srv.c test_resolv_fake.c test_responder_cache_req.c test_responder_common.c test_sbus_opath.c test_sdap.c test_sdap_certmap.c test_sdap_initgr.c test_simple_access.c test_sss_idmap.c test_sss_sifp.c test_sssd_krb5_localauth_plugin.c test_sysdb_certmap.c test_sysdb_domain_resolution_order.c test_sysdb_subdomains.c test_sysdb_sudo.c test_sysdb_ts_cache.c test_sysdb_utils.c test_sysdb_views.c test_tools_colondb.c test_utils.c test_wbc_calls.c
dee665060ba71ff61ad223e755ae61441118fbba 08-Sep-2017 Jakub Hrozek <jhrozek@redhat.com>

SUDO: Use initgr_with_views when looking up a sudo user The sudo responder code didn't take views into account when looking for rules, which resulted in sudo rules being ignored if the user's name was overriden. Please see the ticket for a detailed info on how to reproduce the bug. Resolves: https://pagure.io/SSSD/sssd/issue/3488 Reviewed-by: Pavel Březina <pbrezina@redhat.com>

280f69cf2ef63b47e2c7d4b745de36970a79a518 08-Sep-2017 Jakub Hrozek <jhrozek@redhat.com>

TESTS: Use NULL for pointer, not 0 Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

a5ecc93abb01cece628fdef04ebad43bba267419 10-Feb-2017 Jakub Hrozek <jhrozek@redhat.com>

SUDO: Only store lowercased attribute value once The current code doesn't handle the situation where lowercasing the sudoUser attribute would yield the same value again. For example: sudoUser: TUSER sudoUser tuser would break. This patch switches to using the utility function sysdb_attrs_add_lower_case_string() which already checks for duplicates. Resolves: https://fedorahosted.org/sssd/ticket/3301 Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>

23637e2fd2b1fe42bdd2335893a11ac8016f56bc 08-Nov-2016 Petr Čech <pcech@redhat.com>

TESTS: Extending sysdb sudo store tests We covered diference between case sensitive and case insensitive domains. If domain is case insensitive we add lowercase form of sudoUser to local sysdb cache. Resolves: https://fedorahosted.org/sssd/ticket/3203 Reviewed-by: Pavel Březina <pbrezina@redhat.com>

61913b8f0d1ba54d82640500d7486fac5f72b030 07-Jul-2016 Pavel Březina <pbrezina@redhat.com>

sudo: solve problems with fully qualified names sudo expects the same name in sudo rule as login name. Therefore if fully qualified name is used or even enforced by setting use_fully_qualified_names to true or by forcing default domain with default_domain_suffix sssd is able to correctly return the rules but sudo can't match the user with contect of sudoUser attribute since it is not qualified. This patch changes the rules on the fly to avoid using names at all. We do this in two steps: 1. We fetch all rules that match current user name, id or groups and replace sudoUser attribute with sudoUser: #uid. 2. We fetch complementry rules that contain netgroups since it is expected we don't have infromation about existing netgroups in cache, sudo still needs to evaluate it for us if needed. This patch also remove test for sysdb_get_sudo_filter since it wasn't sufficient anyway and I did not rewrite it since I don't thing it is a good thing to have filter tests that depends on exact filter order. Resolves: https://fedorahosted.org/sssd/ticket/2919 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

a257259b05d62ebe548b6c798a3aa03a97dbc0c2 23-Jun-2016 Jakub Hrozek <jhrozek@redhat.com>

SYSDB: If modifyTimestamp is the same, only update the TS cache Resolves: https://fedorahosted.org/sssd/ticket/2602 If the entry being saved contains the original modifyTimestamp attribute and the modifyTimestamp attribute is the same as the one we already saved to the timestamp cache, only the expire timestamps in the asynchronous timestamp cache will be bumped and the sysdb code will avoid writes to the main cache completely. If the modifyTimestamp is either missing or differs, we assume the entry had changed and do a full write to the main cache. Also amends the generic sysdb_set_attrs* and similar functions that their results is also reflected in the timestamps cache. Reviewed-by: Sumit Bose <sbose@redhat.com>

dd285415d7a8d8376207960cfa3e977524c3b98c 23-Jun-2016 Jakub Hrozek <jhrozek@redhat.com>

SYSDB: Search the timestamp caches in addition to the sysdb cache When a sysdb entry is searched, the sysdb cache is consulted first for users or groups. If an entry is found in the sysdb cache, the attributes from the timestamp cache are merged to return the full and up-to-date set of attributes. The merging is done with a single BASE search which is a direct lookup into the underlying key-value database, so it should be relatively fast. More complex merging is done only for enumeration by filter which is currently done only via the IFP back end and should be quite infrequent, so I hope we can justify a more complex merging there. Reviewed-by: Sumit Bose <sbose@redhat.com>

27a7dedb0ee4d4b51ca4c196aa894ad30cb3e821 20-Apr-2016 Petr Cech <pcech@redhat.com>

TESTS: Test of sysdb_search_sudo_rules There are tests functions of sysdb_sudo_rules. Resolves: https://fedorahosted.org/sssd/ticket/2081 Reviewed-by: Pavel Březina <pbrezina@redhat.com>