summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2011-12-09 04:56:26 -0500
committerStephen Gallagher <sgallagh@redhat.com>2011-12-09 08:03:57 -0500
commitbb57f6003fa42856d0578ac27eb57e798be9bbb5 (patch)
treeb084a7cf8bee9e2712c57b1481847377c8a73fae /src/providers/ipa
parentca7325359e8763bb5c1db2ac188d22b4c100d531 (diff)
downloadsssd-bb57f6003fa42856d0578ac27eb57e798be9bbb5.tar.gz
sssd-bb57f6003fa42856d0578ac27eb57e798be9bbb5.tar.xz
sssd-bb57f6003fa42856d0578ac27eb57e798be9bbb5.zip
Fixed IPA netgroup processing
In case IPA netgroup had indirect member hosts, they wouldn't be detected. This patch also modifies debug messages for easier debugging in the future.
Diffstat (limited to 'src/providers/ipa')
-rw-r--r--src/providers/ipa/ipa_common.c1
-rw-r--r--src/providers/ipa/ipa_common.h1
-rw-r--r--src/providers/ipa/ipa_netgroups.c7
3 files changed, 7 insertions, 2 deletions
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
index de7c20d1..47242531 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -171,6 +171,7 @@ struct sdap_attr_map ipa_netgroup_map[] = {
struct sdap_attr_map ipa_host_map[] = {
{ "ipa_host_object_class", "ipaHost", SYSDB_HOST_CLASS, NULL },
{ "ipa_host_fqdn", "fqdn", SYSDB_NAME, NULL },
+ { "ipa_host_member_of", "memberOf", SYSDB_MEMBEROF, NULL },
};
struct dp_option ipa_def_krb5_opts[] = {
diff --git a/src/providers/ipa/ipa_common.h b/src/providers/ipa/ipa_common.h
index 1ab1983f..22f4bc63 100644
--- a/src/providers/ipa/ipa_common.h
+++ b/src/providers/ipa/ipa_common.h
@@ -75,6 +75,7 @@ enum ipa_netgroup_attrs {
enum ipa_host_attrs {
IPA_OC_HOST = 0,
IPA_AT_HOST_FQDN,
+ IPA_AT_HOST_MEMBER_OF,
IPA_OPTS_HOST /* attrs counter */
};
diff --git a/src/providers/ipa/ipa_netgroups.c b/src/providers/ipa/ipa_netgroups.c
index a8ae8d2b..fbe9ebf4 100644
--- a/src/providers/ipa/ipa_netgroups.c
+++ b/src/providers/ipa/ipa_netgroups.c
@@ -887,9 +887,10 @@ static int ipa_netgr_process_all(struct ipa_get_netgroups_state *state)
}
talloc_zfree(members);
}
+ DEBUG(SSSDBG_TRACE_INTERNAL, ("Extracted %d netgroup members\n", j));
/* Load all UIDs */
- DEBUG(SSSDBG_TRACE_INTERNAL, ("Extracting user members of netgroup %d\n", i));
+ DEBUG(SSSDBG_TRACE_ALL, ("Extracting user members of netgroup %d\n", i));
ret = extract_members(state, state->netgroups[i],
SYSDB_ORIG_NETGROUP_MEMBER_USER,
state->new_users,
@@ -897,8 +898,9 @@ static int ipa_netgr_process_all(struct ipa_get_netgroups_state *state)
if (ret != EOK) {
goto done;
}
+ DEBUG(SSSDBG_TRACE_INTERNAL, ("Extracted %d user members\n", uids_count));
- DEBUG(SSSDBG_TRACE_INTERNAL, ("Extracting host members of netgroup %d\n", i));
+ DEBUG(SSSDBG_TRACE_ALL, ("Extracting host members of netgroup %d\n", i));
ret = extract_members(state, state->netgroups[i],
SYSDB_ORIG_NETGROUP_MEMBER_HOST,
state->new_hosts,
@@ -906,6 +908,7 @@ static int ipa_netgr_process_all(struct ipa_get_netgroups_state *state)
if (ret != EOK) {
goto done;
}
+ DEBUG(SSSDBG_TRACE_INTERNAL, ("Extracted %d host members\n", hosts_count));
ret = sysdb_attrs_get_el(state->netgroups[i],
SYSDB_ORIG_NETGROUP_EXTERNAL_HOST,