ee164913f9c12a557044eb469f4498b9be9a8f50 |
|
28-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
IPA_RULES_COMMON: Introduce ipa_common_get_hostgroupname()
By moving the get_ipa_hostgroupname() method from ipa_hbac_hosts.[ch] to
ipa_rules_common.[ch] it can be used by both HBAC and, in the future,
for new backend modules.
The method got renamed to ipa_common_get_hostgroupname() and some coding
style changes have been made in order to match with what SSSD follows.
Related:
https://pagure.io/SSSD/sssd/issue/2995
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
0f623456437c96f50330fe0ff21afd9638d14e57 |
|
28-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
IPA_RULES_COMMON: Introduce ipa_common_save_rules()
This method is kind of a replacement for ipa_save_hbac() one.
While ipa_save_hbac() wasn't removed, its porpuse has been totally
changed. Now it just prepare the ground and calls
ipa_common_save_rules() which is a more generic function that can be
reused for new backend modules.
In order to make the code cleaner a new structure has also been
introduced: struct ipa_common_entries; which contains the values that
will be used to save the entry and the entrygroup to sysdb.
Related:
https://pagure.io/SSSD/sssd/issue/2995
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
d2a0b4a6a220bf9a58c7306c3f673891efc419eb |
|
28-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
IPA_ACCESS: Make ipa_purge_hbac() more generic
This mothod can also be reused in the future for new backend modules.
In order to make it more generic, let's just move it to
ipa_rules_common.[ch], rename it to ipa_common_purge_rules() and make
the subtreename to be purged a new paramether of this method.
Related:
https://pagure.io/SSSD/sssd/issue/2995
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
e17e37cd0e2109e7f1bd4ae48edfc8cca85b3f93 |
|
28-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
IPA_ACCESS: Make hbac_get_cache_rules() more generic
This method can also be reused in the future for new backend modules.
In order to make it more generic, let's just move it to
ipa_rules_common.[ch], rename it to ipa_common_get_cached_rules() and
make the rule, subtree name and the attributes to be searched new
parameters of this method.
In order to not be declaring the enourmous list of attributes HBAC uses
when calling this method, a new hbac_get_attrs_to_get_cached_rules()
method has been introduced.
Related:
https://pagure.io/SSSD/sssd/issue/2995
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
21909d3b620d97e81dd946b959a47efe88d2b7d8 |
|
28-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
IPA: Leave only HBAC specific defines in ipa_hbac_private.h
The defines that were moved can and will be used by another backend
module that will be introduced in the near future.
Related:
https://pagure.io/SSSD/sssd/issue/2995
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
9a18f78f38e274f4906af6ef8e1a82d844fde4cc |
|
28-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
IPA: Make ipa_hbac_sysdb_save() more generic
Although there's no change in the ipa_hbac_sysdb_save() itself, its name
has been changed to ipa_common_entries_and_groups_sysdb_save() and its
been split out from HBAC related files and moved to the newly created
ipa_rules_common.[ch] files, which will also be used in the future for
new backend modules.
ipa_rules_common.[ch] is not exactly the best name for those files, IMO,
but I really cannot come up with something better.
Related:
https://pagure.io/SSSD/sssd/issue/2995
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |