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/providers/ipa | |
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/providers/ipa')
-rw-r--r-- | src/providers/ipa/ipa_hostid.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/providers/ipa/ipa_hostid.c b/src/providers/ipa/ipa_hostid.c index 8fcc59ed..c322c61f 100644 --- a/src/providers/ipa/ipa_hostid.c +++ b/src/providers/ipa/ipa_hostid.c @@ -45,8 +45,7 @@ hosts_get_send(TALLOC_CTX *memctx, struct tevent_context *ev, struct ipa_hostid_ctx *hostid_ctx, const char *name, - const char *alias, - int attrs_type); + const char *alias); static errno_t hosts_get_recv(struct tevent_req *req, int *dp_error_out); @@ -59,7 +58,7 @@ ipa_host_info_handler(struct be_req *breq) { struct ipa_hostid_ctx *hostid_ctx; struct sdap_id_ctx *ctx; - struct be_acct_req *ar; + struct be_host_req *hr; struct tevent_req *req; int dp_error = DP_ERR_FATAL; errno_t ret = EOK; @@ -75,17 +74,16 @@ ipa_host_info_handler(struct be_req *breq) goto done; } - ar = talloc_get_type(breq->req_data, struct be_acct_req); + hr = talloc_get_type(breq->req_data, struct be_host_req); - if (ar->filter_type != BE_FILTER_NAME) { + if (hr->filter_type != BE_FILTER_NAME) { ret = EINVAL; err = "Invalid filter type"; goto done; } req = hosts_get_send(breq, breq->be_ctx->ev, hostid_ctx, - ar->filter_value, ar->extra_value, - ar->attr_type); + hr->name, hr->alias); if (!req) { ret = ENOMEM; err = "Out of memory"; @@ -150,8 +148,7 @@ hosts_get_send(TALLOC_CTX *memctx, struct tevent_context *ev, struct ipa_hostid_ctx *hostid_ctx, const char *name, - const char *alias, - int attrs_type) + const char *alias) { struct tevent_req *req; struct hosts_get_state *state; |