diff options
author | Jan Cholasta <jcholast@redhat.com> | 2012-02-03 22:43:18 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-02-07 00:26:57 +0100 |
commit | bd3cf7d6414171fcd605d9f831965be107e411d7 (patch) | |
tree | 288b356707b458ac3416b2be30bc7c69887bdc19 /src/responder/common | |
parent | 1a7d1977037864e52858058777af8ff8401547dd (diff) | |
download | sssd-bd3cf7d6414171fcd605d9f831965be107e411d7.tar.gz sssd-bd3cf7d6414171fcd605d9f831965be107e411d7.tar.xz sssd-bd3cf7d6414171fcd605d9f831965be107e411d7.zip |
DP: Add support for hosts in sss_dp_get_account
Host requests are directed to the host info handler.
Diffstat (limited to 'src/responder/common')
-rw-r--r-- | src/responder/common/responder.h | 3 | ||||
-rw-r--r-- | src/responder/common/responder_dp.c | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/responder/common/responder.h b/src/responder/common/responder.h index 6b6a25be7..7ec2ee3dc 100644 --- a/src/responder/common/responder.h +++ b/src/responder/common/responder.h @@ -244,7 +244,8 @@ enum sss_dp_acct_type { SSS_DP_GROUP, SSS_DP_INITGROUPS, SSS_DP_NETGR, - SSS_DP_SERVICES + SSS_DP_SERVICES, + SSS_DP_HOST }; struct tevent_req * diff --git a/src/responder/common/responder_dp.c b/src/responder/common/responder_dp.c index aa439a6bd..044aa385a 100644 --- a/src/responder/common/responder_dp.c +++ b/src/responder/common/responder_dp.c @@ -487,24 +487,34 @@ sss_dp_get_account_msg(void *pvt) uint32_t be_type; uint32_t attrs = BE_ATTR_CORE; char *filter; + const char *dp_method; info = talloc_get_type(pvt, struct sss_dp_account_info); switch (info->type) { case SSS_DP_USER: be_type = BE_REQ_USER; + dp_method = DP_METHOD_GETACCTINFO; break; case SSS_DP_GROUP: be_type = BE_REQ_GROUP; + dp_method = DP_METHOD_GETACCTINFO; break; case SSS_DP_INITGROUPS: be_type = BE_REQ_INITGROUPS; + dp_method = DP_METHOD_GETACCTINFO; break; case SSS_DP_NETGR: be_type = BE_REQ_NETGROUP; + dp_method = DP_METHOD_GETACCTINFO; break; case SSS_DP_SERVICES: be_type = BE_REQ_SERVICES; + dp_method = DP_METHOD_GETACCTINFO; + break; + case SSS_DP_HOST: + be_type = 0; + dp_method = DP_METHOD_HOSTHANDLER; break; } @@ -537,7 +547,7 @@ sss_dp_get_account_msg(void *pvt) msg = dbus_message_new_method_call(NULL, DP_PATH, DP_INTERFACE, - DP_METHOD_GETACCTINFO); + dp_method); if (msg == NULL) { talloc_free(filter); DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory?!\n")); |