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/>.
cee85e8fb9534ec997e5388fce59f392cf029573Jakub Hrozek/* Whether to limit the request type to a certain domain type
cee85e8fb9534ec997e5388fce59f392cf029573Jakub Hrozek /* Only look up data in POSIX domains */
cee85e8fb9534ec997e5388fce59f392cf029573Jakub Hrozek /* Only look up data in application domains */
cee85e8fb9534ec997e5388fce59f392cf029573Jakub Hrozek /* Look up data in any domain type */
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina/* Input data. */
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char *name);
488518dde58724daa13b9216a0f1af6e0ba5401fPavel Březina const char **attrs);
3be2628d8aba6aeb99ac1484da990f1fad8169ecPavel Březina const char **attrs);
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char *cert);
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char *sid,
0db2f3402b37df221fbf55486769989f82df479aPavel Březina const char **attrs);
53c31b83e4d06ea4c2813eec2f1e647a613b4a2bPavel Březina const char **attrs);
189db5329db0277425bb3bdd785c19aee23bb364Fabiano Fidênciocache_req_data_set_bypass_cache(struct cache_req_data *data,
52e675ec4b160720515c81ae8c0e5a95feb50c57Sumit Bosecache_req_data_set_bypass_dp(struct cache_req_data *data,
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 * If name was used as a lookup parameter, @lookup_name contains name
b206e1abb7f6ea373d12537b3338552aed6b656dPavel Březina * normalized to @domain rules.
7be55c7de03da57f43fae3db7e6114eebb117a2ePavel Březina * If true the result contain attributes of a well known object.
7be55c7de03da57f43fae3db7e6114eebb117a2ePavel Březina * Since this result is manually created it may not contain all
7be55c7de03da57f43fae3db7e6114eebb117a2ePavel Březina * requested attributes, depending on the plug-in.
7be55c7de03da57f43fae3db7e6114eebb117a2ePavel Březina /* If this is a well known object, it may not be part of any particular
7be55c7de03da57f43fae3db7e6114eebb117a2ePavel Březina * SSSD domain, but still may be associated with a well known domain
7be55c7de03da57f43fae3db7e6114eebb117a2ePavel Březina * name such as "BUILTIN", or "LOCAL AUTHORITY".
4e2c15e6b7c4015fa787f8c624c2ec10153e99f6Pavel Březina * Shallow copy of cache request result, limiting the result to a maximum
4e2c15e6b7c4015fa787f8c624c2ec10153e99f6Pavel Březina * numbers of records.
4e2c15e6b7c4015fa787f8c624c2ec10153e99f6Pavel Březinacache_req_copy_limited_result(TALLOC_CTX *mem_ctx,
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)
7723e79f5a1fad4201360199037aea33f655bab6Pavel Březinacache_req_user_by_name_attrs_send(TALLOC_CTX *mem_ctx,
7723e79f5a1fad4201360199037aea33f655bab6Pavel Březina const char **attrs);
7723e79f5a1fad4201360199037aea33f655bab6Pavel Březina#define cache_req_user_by_name_attrs_recv(mem_ctx, req, _result) \
7723e79f5a1fad4201360199037aea33f655bab6Pavel 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)
488518dde58724daa13b9216a0f1af6e0ba5401fPavel Březinacache_req_object_by_name_send(TALLOC_CTX *mem_ctx,
488518dde58724daa13b9216a0f1af6e0ba5401fPavel Březina const char **attrs);
488518dde58724daa13b9216a0f1af6e0ba5401fPavel Březina#define cache_req_object_by_name_recv(mem_ctx, req, _result) \
488518dde58724daa13b9216a0f1af6e0ba5401fPavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
3be2628d8aba6aeb99ac1484da990f1fad8169ecPavel Březinacache_req_object_by_id_send(TALLOC_CTX *mem_ctx,
3be2628d8aba6aeb99ac1484da990f1fad8169ecPavel Březina const char **attrs);
3be2628d8aba6aeb99ac1484da990f1fad8169ecPavel Březina#define cache_req_object_by_id_recv(mem_ctx, req, _result) \
3be2628d8aba6aeb99ac1484da990f1fad8169ecPavel 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)
53c31b83e4d06ea4c2813eec2f1e647a613b4a2bPavel Březinacache_req_host_by_name_send(TALLOC_CTX *mem_ctx,
53c31b83e4d06ea4c2813eec2f1e647a613b4a2bPavel Březina const char **attrs);
53c31b83e4d06ea4c2813eec2f1e647a613b4a2bPavel Březina#define cache_req_host_by_name_recv(mem_ctx, req, _result) \
53c31b83e4d06ea4c2813eec2f1e647a613b4a2bPavel Březina cache_req_single_domain_recv(mem_ctx, req, _result)
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina#endif /* _CACHE_REQ_H_ */