cache_req_private.h revision 800b1a27543fa83bc6cd73d8e2789f3cdbaf584a
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2016 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _CACHE_REQ_PRIVATE_H_
#define _CACHE_REQ_PRIVATE_H_
#include <stdint.h>
#include "responder/common/responder.h"
#include "responder/common/cache_req/cache_req.h"
struct cache_req {
/* Provided input. */
struct cache_req_data *data;
const struct cache_req_plugin *plugin;
struct sss_nc_ctx *ncache;
int midpoint;
/* Domain related informations. */
struct sss_domain_info *domain;
bool cache_first;
bool bypass_cache;
bool bypass_dp;
/* Only contact domains with this type */
/* Debug information */
const char *reqname;
const char *debugobj;
/* Time when the request started. Useful for by-filter lookups */
};
/**
* Structure to hold the input strings that
* should be parsed into name and domain parts.
*/
struct cache_req_parsed_name {
const char *input; /* Original input. */
const char *name; /* Parsed name or UPN. */
const char *lookup; /* Converted per domain rules. */
};
/**
* Structure to hold the input strings that cannot contain domain
* part but are transferred per each domain's case sensitivity.
*/
struct cache_req_cased_name {
const char *name; /* Parsed name or UPN. */
const char *lookup; /* Converted per domain rules. */
};
/* Input data. */
struct cache_req_data {
enum cache_req_type type;
struct cache_req_parsed_name name;
const char *cert;
const char *sid;
const char *alias;
const char **attrs;
struct {
struct cache_req_parsed_name *name;
struct cache_req_cased_name protocol;
} svc;
bool bypass_cache;
bool bypass_dp;
};
struct tevent_req *
struct tevent_context *ev,
bool bypass_cache,
bool bypass_dp);
struct tevent_req *req,
struct ldb_result **_result,
bool *_dp_success);
struct tevent_req *
struct tevent_context *ev,
struct sss_nc_ctx *ncache,
const char *domain,
struct cache_req_data *data);
struct sss_domain_info *domain);
struct cache_req_result *new_result,
struct cache_req_result ***_results,
struct cache_req_result *
struct sss_domain_info *domain,
struct ldb_result *ldb_result,
const char *lookup_name,
const char *well_known_domain);
struct sss_domain_info *domain,
struct ldb_result *ldb_result,
const char *name,
struct cache_req_result ***_results,
struct ldb_result *
struct ldb_message **ldb_msgs,
struct ldb_result *
struct ldb_message *ldb_msg);
struct cache_req_result *
struct sss_domain_info *domain,
struct ldb_message *ldb_msg,
const char *lookup_name,
const char *well_known_domain);
struct tevent_req *
struct tevent_context *ev,
struct cache_req_result **results,
/* Plug-in common. */
struct cache_req_result *
const char *domname,
const char *sid,
const char *name);
bool
#endif /* _CACHE_REQ_PRIVATE_H_ */