cache_req.h revision 6b159f14f69134bba8510a6b50ab62493a23a73f
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina Pavel Březina <pbrezina@redhat.com>
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina Copyright (C) 2016 Red Hat
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina This program is free software; you can redistribute it and/or modify
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina it under the terms of the GNU General Public License as published by
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina the Free Software Foundation; either version 3 of the License, or
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina (at your option) any later version.
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina This program is distributed in the hope that it will be useful,
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina but WITHOUT ANY WARRANTY; without even the implied warranty of
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina GNU General Public License for more details.
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina You should have received a copy of the GNU General Public License
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina along with this program. If not, see <http://www.gnu.org/licenses/>.
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina/* Input data. */
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char *name);
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char *cert);
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char *sid,
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char **attrs);
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina/* Output data. */
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina * SSSD domain where the result was obtained.
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina * Result from ldb lookup.
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina * Shortcuts into ldb_result. This shortens the code a little since
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina * callers usually don't don't need to work with ldb_result directly.
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina unsigned int count;
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina * If name was used as a lookup parameter, @lookup_name contains name
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina * normalized to @domain rules.
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina/* Generic request. */
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březinastruct tevent_req *cache_req_send(TALLOC_CTX *mem_ctx,
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březinaerrno_t cache_req_single_domain_recv(TALLOC_CTX *mem_ctx,
0db2f3402b37df221fbf55486769989f82df479aPavel Březina/* Plug-ins. */
0db2f3402b37df221fbf55486769989f82df479aPavel Březinacache_req_user_by_name_send(TALLOC_CTX *mem_ctx,
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char *name);
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina#define cache_req_user_by_name_recv(mem_ctx, req, _result) \
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina#define cache_req_user_by_id_recv(mem_ctx, req, _result) \
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina cache_req_single_domain_recv(mem_ctx, req, _result);
0db2f3402b37df221fbf55486769989f82df479aPavel Březinacache_req_user_by_cert_send(TALLOC_CTX *mem_ctx,
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina#define cache_req_user_by_cert_recv(mem_ctx, req, _result) \
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
0db2f3402b37df221fbf55486769989f82df479aPavel Březinacache_req_group_by_name_send(TALLOC_CTX *mem_ctx,
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char *name);
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina#define cache_req_group_by_name_recv(mem_ctx, req, _result) \
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
0db2f3402b37df221fbf55486769989f82df479aPavel Březinacache_req_group_by_id_send(TALLOC_CTX *mem_ctx,
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina#define cache_req_group_by_id_recv(mem_ctx, req, _result) \
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
0db2f3402b37df221fbf55486769989f82df479aPavel Březinacache_req_initgr_by_name_send(TALLOC_CTX *mem_ctx,
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char *name);
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina#define cache_req_initgr_by_name_recv(mem_ctx, req, _result) \
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
0db2f3402b37df221fbf55486769989f82df479aPavel Březinacache_req_user_by_filter_send(TALLOC_CTX *mem_ctx,
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char *filter);
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina#define cache_req_user_by_filter_recv(mem_ctx, req, _result) \
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
0db2f3402b37df221fbf55486769989f82df479aPavel Březinacache_req_group_by_filter_send(TALLOC_CTX *mem_ctx,
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char *filter);
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina#define cache_req_group_by_filter_recv(mem_ctx, req, _result) \
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
0db2f3402b37df221fbf55486769989f82df479aPavel Březinacache_req_object_by_sid_send(TALLOC_CTX *mem_ctx,
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char *sid,
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char **attrs);
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina#define cache_req_object_by_sid_recv(mem_ctx, req, _result) \
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
a79acee185654d110c0e35ba351368d664e4e53dPavel Březina const char *domain);
a79acee185654d110c0e35ba351368d664e4e53dPavel Březina#define cache_req_enum_users_recv(mem_ctx, req, _result) \
12d771585a84a7523a5b7d9cf502d4bcddecb9b9Pavel Březinacache_req_enum_groups_send(TALLOC_CTX *mem_ctx,
12d771585a84a7523a5b7d9cf502d4bcddecb9b9Pavel Březina const char *domain);
12d771585a84a7523a5b7d9cf502d4bcddecb9b9Pavel Březina#define cache_req_enum_groups_recv(mem_ctx, req, _result) \
2e13817e64ff1e0e47dc844be501f2d3ab299f34Pavel Březinacache_req_svc_by_name_send(TALLOC_CTX *mem_ctx,
2e13817e64ff1e0e47dc844be501f2d3ab299f34Pavel Březina#define cache_req_svc_by_name_recv(mem_ctx, req, _result) \
2e13817e64ff1e0e47dc844be501f2d3ab299f34Pavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
c2fc9459c31cb1192ab3c15ce4df1c150e99bf95Pavel Březinacache_req_svc_by_port_send(TALLOC_CTX *mem_ctx,
c2fc9459c31cb1192ab3c15ce4df1c150e99bf95Pavel Březina#define cache_req_svc_by_port_recv(mem_ctx, req, _result) \
c2fc9459c31cb1192ab3c15ce4df1c150e99bf95Pavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
6b159f14f69134bba8510a6b50ab62493a23a73fPavel Březinacache_req_netgroup_by_name_send(TALLOC_CTX *mem_ctx,
6b159f14f69134bba8510a6b50ab62493a23a73fPavel Březina const char *name);
6b159f14f69134bba8510a6b50ab62493a23a73fPavel Březina#define cache_req_netgroup_by_name_recv(mem_ctx, req, _result) \
6b159f14f69134bba8510a6b50ab62493a23a73fPavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina#endif /* _CACHE_REQ_H_ */