diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-04-18 14:27:44 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-05-03 11:46:18 -0400 |
commit | b42b5d5aaf4da165582e73ad985fdff6e34e61e4 (patch) | |
tree | 3628fa960f554e1971952e369ff3576ba6adef11 /src/responder/common | |
parent | d226a2a0f8e6738507874f3e04bf281c2bf526b1 (diff) | |
download | sssd-b42b5d5aaf4da165582e73ad985fdff6e34e61e4.tar.gz sssd-b42b5d5aaf4da165582e73ad985fdff6e34e61e4.tar.bz2 sssd-b42b5d5aaf4da165582e73ad985fdff6e34e61e4.zip |
SSH: Add dp_get_host_send to common responder code
Instead of using account_info request, creates a new ssh specific
request. This improves code readability and will make the code more
flexible in the future.
https://fedorahosted.org/sssd/ticket/1176
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, 2 insertions, 13 deletions
diff --git a/src/responder/common/responder.h b/src/responder/common/responder.h index 30a7101d..27a58eae 100644 --- a/src/responder/common/responder.h +++ b/src/responder/common/responder.h @@ -253,8 +253,7 @@ enum sss_dp_acct_type { SSS_DP_GROUP, SSS_DP_INITGROUPS, SSS_DP_NETGR, - SSS_DP_SERVICES, - SSS_DP_HOST + SSS_DP_SERVICES }; struct tevent_req * diff --git a/src/responder/common/responder_dp.c b/src/responder/common/responder_dp.c index 7362bd74..ca9cb834 100644 --- a/src/responder/common/responder_dp.c +++ b/src/responder/common/responder_dp.c @@ -490,34 +490,24 @@ 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; } @@ -550,7 +540,7 @@ sss_dp_get_account_msg(void *pvt) msg = dbus_message_new_method_call(NULL, DP_PATH, DP_INTERFACE, - dp_method); + DP_METHOD_GETACCTINFO); if (msg == NULL) { talloc_free(filter); DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory?!\n")); |