8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny/*
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny SSSD
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny IPA Identity Backend Module
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny Authors:
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny Jan Zeleny <jzeleny@redhat.com>
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny Copyright (C) 2011 Red Hat
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny This program is free software; you can redistribute it and/or modify
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny it under the terms of the GNU General Public License as published by
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny the Free Software Foundation; either version 3 of the License, or
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny (at your option) any later version.
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny This program is distributed in the hope that it will be useful,
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny but WITHOUT ANY WARRANTY; without even the implied warranty of
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny GNU General Public License for more details.
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny You should have received a copy of the GNU General Public License
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny along with this program. If not, see <http://www.gnu.org/licenses/>.
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny*/
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny#ifndef _IPA_ID_H_
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny#define _IPA_ID_H_
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny#include "providers/ldap/ldap_common.h"
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny#include "providers/ipa/ipa_common.h"
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny#include "providers/ldap/sdap.h"
2962b3d1e072ff2ebbe343095812dad697d6bf1dSumit Bose#include "providers/ipa/ipa_subdomains.h"
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny
08ab0d4ede41a1749e0bc26f78a37a4d10c20db8Sumit Bose#define IPA_DEFAULT_VIEW_NAME "Default Trust View"
08ab0d4ede41a1749e0bc26f78a37a4d10c20db8Sumit Bose
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březinastruct tevent_req *
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březinaipa_account_info_handler_send(TALLOC_CTX *mem_ctx,
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina struct ipa_id_ctx *id_ctx,
3d29430867cf92b2d71afa95abb679711231117cPavel Březina struct dp_id_data *data,
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina struct dp_req_params *params);
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březinaerrno_t ipa_account_info_handler_recv(TALLOC_CTX *mem_ctx,
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina struct tevent_req *req,
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina struct dp_reply_std *data);
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zelenystruct tevent_req *ipa_get_netgroups_send(TALLOC_CTX *memctx,
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny struct tevent_context *ev,
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny struct sysdb_ctx *sysdb,
bd92e8ee315d4da9350b9ef0358c88a7b54aeebeStephen Gallagher struct sss_domain_info *dom,
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny struct sdap_options *opts,
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny struct ipa_options *ipa_options,
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny struct sdap_handle *sh,
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny const char **attrs,
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny const char *filter,
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny int timeout);
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zelenyint ipa_get_netgroups_recv(struct tevent_req *req,
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny TALLOC_CTX *mem_ctx,
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny size_t *reply_count,
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny struct sysdb_attrs ***reply);
8edf0e447266d68f10264eb3f3ea514cd1687041Jakub Hrozek
36a12aea020a935ffa40505fa02860c3d921ad0cSumit Bosestruct tevent_req *ipa_s2n_get_acct_info_send(TALLOC_CTX *mem_ctx,
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose struct tevent_context *ev,
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose struct ipa_id_ctx *ipa_ctx,
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose struct sdap_options *opts,
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose struct sss_domain_info *dom,
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose struct sysdb_attrs *override_attrs,
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose struct sdap_handle *sh,
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose int entry_type,
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose struct req_input *req_input);
36a12aea020a935ffa40505fa02860c3d921ad0cSumit Boseint ipa_s2n_get_acct_info_recv(struct tevent_req *req);
881c4ba834b23ae651ac01db667801f314eb0a5dJan Zeleny
791abc91fd8b2a7f73511ab8051df1065f9f54b2Simo Sorcestruct tevent_req *ipa_get_subdom_acct_send(TALLOC_CTX *memctx,
791abc91fd8b2a7f73511ab8051df1065f9f54b2Simo Sorce struct tevent_context *ev,
00c283ca719717ed483958571982d0e9ff95c4b1Sumit Bose struct ipa_id_ctx *ipa_ctx,
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose struct sysdb_attrs *override_attrs,
3d29430867cf92b2d71afa95abb679711231117cPavel Březina struct dp_id_data *ar);
791abc91fd8b2a7f73511ab8051df1065f9f54b2Simo Sorceint ipa_get_subdom_acct_recv(struct tevent_req *req, int *dp_error_out);
3d28e0e560b787b5c57ed7327d184310342a7e38Jakub Hrozek
3d29430867cf92b2d71afa95abb679711231117cPavel Březinaerrno_t get_dp_id_data_for_sid(TALLOC_CTX *mem_ctx, const char *sid,
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose const char *domain_name,
3d29430867cf92b2d71afa95abb679711231117cPavel Březina struct dp_id_data **_ar);
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose
3d29430867cf92b2d71afa95abb679711231117cPavel Březinaerrno_t get_dp_id_data_for_uuid(TALLOC_CTX *mem_ctx, const char *uuid,
1c82a31a254c2fca6dfa3e3b52986b75221d8742Sumit Bose const char *domain_name,
3d29430867cf92b2d71afa95abb679711231117cPavel Březina struct dp_id_data **_ar);
1c82a31a254c2fca6dfa3e3b52986b75221d8742Sumit Bose
3d29430867cf92b2d71afa95abb679711231117cPavel Březinaerrno_t get_dp_id_data_for_user_name(TALLOC_CTX *mem_ctx,
d32b165fad7b89462f49c82349e1df5a2343afa2Sumit Bose const char *user_name,
d32b165fad7b89462f49c82349e1df5a2343afa2Sumit Bose const char *domain_name,
3d29430867cf92b2d71afa95abb679711231117cPavel Březina struct dp_id_data **_ar);
d32b165fad7b89462f49c82349e1df5a2343afa2Sumit Bose
0f3df54840ec9a050cc0b1b68269c3f28c859e64Sumit Bosestruct tevent_req *ipa_get_ad_override_send(TALLOC_CTX *mem_ctx,
0f3df54840ec9a050cc0b1b68269c3f28c859e64Sumit Bose struct tevent_context *ev,
0f3df54840ec9a050cc0b1b68269c3f28c859e64Sumit Bose struct sdap_id_ctx *sdap_id_ctx,
0f3df54840ec9a050cc0b1b68269c3f28c859e64Sumit Bose struct ipa_options *ipa_options,
0f3df54840ec9a050cc0b1b68269c3f28c859e64Sumit Bose const char *ipa_realm,
0f3df54840ec9a050cc0b1b68269c3f28c859e64Sumit Bose const char *view_name,
3d29430867cf92b2d71afa95abb679711231117cPavel Březina struct dp_id_data *ar);
0f3df54840ec9a050cc0b1b68269c3f28c859e64Sumit Bose
0f3df54840ec9a050cc0b1b68269c3f28c859e64Sumit Boseerrno_t ipa_get_ad_override_recv(struct tevent_req *req, int *dp_error_out,
0f3df54840ec9a050cc0b1b68269c3f28c859e64Sumit Bose TALLOC_CTX *mem_ctx,
0f3df54840ec9a050cc0b1b68269c3f28c859e64Sumit Bose struct sysdb_attrs **override_attrs);
0f3df54840ec9a050cc0b1b68269c3f28c859e64Sumit Bose
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bosestruct tevent_req *ipa_subdomain_account_send(TALLOC_CTX *memctx,
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose struct tevent_context *ev,
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose struct ipa_id_ctx *ipa_ctx,
3d29430867cf92b2d71afa95abb679711231117cPavel Březina struct dp_id_data *ar);
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Boseerrno_t ipa_subdomain_account_recv(struct tevent_req *req, int *dp_error_out);
ed4a9bd4d0f7fb359bed66a8d63a92e7be633aaeSumit Bose
8eb981dd8bc85aee7a913c6f0096ad47f3382339Sumit Boseerrno_t split_ipa_anchor(TALLOC_CTX *mem_ctx, const char *anchor,
8eb981dd8bc85aee7a913c6f0096ad47f3382339Sumit Bose char **_anchor_domain, char **_ipa_uuid);
f1436acde39da5f1400a51153cf7fd370682a4c8Sumit Bose
f1436acde39da5f1400a51153cf7fd370682a4c8Sumit Boseerrno_t get_object_from_cache(TALLOC_CTX *mem_ctx,
f1436acde39da5f1400a51153cf7fd370682a4c8Sumit Bose struct sss_domain_info *dom,
3d29430867cf92b2d71afa95abb679711231117cPavel Březina struct dp_id_data *ar,
f1436acde39da5f1400a51153cf7fd370682a4c8Sumit Bose struct ldb_message **_msg);
145578006684481434ced78461ab8d1c3570f478Sumit Bose
145578006684481434ced78461ab8d1c3570f478Sumit Bosestruct tevent_req *
145578006684481434ced78461ab8d1c3570f478Sumit Boseipa_initgr_get_overrides_send(TALLOC_CTX *memctx,
145578006684481434ced78461ab8d1c3570f478Sumit Bose struct tevent_context *ev,
145578006684481434ced78461ab8d1c3570f478Sumit Bose struct ipa_id_ctx *ipa_ctx,
145578006684481434ced78461ab8d1c3570f478Sumit Bose struct sss_domain_info *user_dom,
145578006684481434ced78461ab8d1c3570f478Sumit Bose size_t groups_count,
145578006684481434ced78461ab8d1c3570f478Sumit Bose struct ldb_message **groups,
145578006684481434ced78461ab8d1c3570f478Sumit Bose const char *groups_id_attr);
145578006684481434ced78461ab8d1c3570f478Sumit Boseint ipa_initgr_get_overrides_recv(struct tevent_req *req, int *dp_error);
c371993cce13edb9185a5f0db76fbee03f0edc04Sumit Bose
c371993cce13edb9185a5f0db76fbee03f0edc04Sumit Bosestruct tevent_req *ipa_get_subdom_acct_process_pac_send(TALLOC_CTX *mem_ctx,
c371993cce13edb9185a5f0db76fbee03f0edc04Sumit Bose struct tevent_context *ev,
c371993cce13edb9185a5f0db76fbee03f0edc04Sumit Bose struct sdap_handle *sh,
c371993cce13edb9185a5f0db76fbee03f0edc04Sumit Bose struct ipa_id_ctx *ipa_ctx,
c371993cce13edb9185a5f0db76fbee03f0edc04Sumit Bose struct sss_domain_info *dom,
c371993cce13edb9185a5f0db76fbee03f0edc04Sumit Bose struct ldb_message *user_msg);
c371993cce13edb9185a5f0db76fbee03f0edc04Sumit Bose
c371993cce13edb9185a5f0db76fbee03f0edc04Sumit Boseerrno_t ipa_get_subdom_acct_process_pac_recv(struct tevent_req *req);
f2e8a7c3230fac11175c0bd17c14c66a8e9b25adSumit Bose
f2e8a7c3230fac11175c0bd17c14c66a8e9b25adSumit Bosestruct tevent_req *
f2e8a7c3230fac11175c0bd17c14c66a8e9b25adSumit Boseipa_resolve_user_list_send(TALLOC_CTX *memctx, struct tevent_context *ev,
f2e8a7c3230fac11175c0bd17c14c66a8e9b25adSumit Bose struct ipa_id_ctx *ipa_ctx,
f2e8a7c3230fac11175c0bd17c14c66a8e9b25adSumit Bose const char *domain_name,
f2e8a7c3230fac11175c0bd17c14c66a8e9b25adSumit Bose struct ldb_message_element *users);
f2e8a7c3230fac11175c0bd17c14c66a8e9b25adSumit Boseint ipa_resolve_user_list_recv(struct tevent_req *req, int *dp_error);
f2e8a7c3230fac11175c0bd17c14c66a8e9b25adSumit Bose
8b1f2574ce7a964965a18ab047ab09c4694380c4Jan Zeleny#endif