ipa_common.h revision 9cb46bc62f22e0104f1b41a423b014c281ef5fc2
/*
SSSD
IPA Common utility code
Copyright (C) Simo Sorce <ssorce@redhat.com> 2009
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 _IPA_COMMON_H_
#define _IPA_COMMON_H_
#include "providers/ldap/ldap_common.h"
#include "providers/krb5/krb5_common.h"
struct ipa_service {
struct sdap_service *sdap;
struct krb5_service *krb5_service;
};
enum ipa_basic_opt {
IPA_DOMAIN = 0,
IPA_OPTS_BASIC /* opts counter */
};
enum ipa_netgroup_attrs {
IPA_OC_NETGROUP = 0,
IPA_OPTS_NETGROUP /* attrs counter */
};
enum ipa_host_attrs {
IPA_OC_HOST = 0,
IPA_OPTS_HOST /* attrs counter */
};
enum ipa_hostgroup_attrs {
IPA_OC_HOSTGROUP = 0,
IPA_OPTS_HOSTGROUP /* attrs counter */
};
enum ipa_selinux_usermap_attrs {
IPA_OPTS_SELINUX_USERMAP /* attrs counter */
};
struct ipa_auth_ctx {
struct krb5_ctx *krb5_auth_ctx;
struct sdap_id_ctx *sdap_id_ctx;
struct sdap_auth_ctx *sdap_auth_ctx;
struct dp_option *ipa_options;
};
struct ipa_id_ctx {
struct sdap_id_ctx *sdap_id_ctx;
struct ipa_options *ipa_options;
};
struct ipa_options {
struct sdap_attr_map *host_map;
struct sdap_attr_map *hostgroup_map;
struct sdap_attr_map *selinuxuser_map;
struct sdap_search_base **host_search_bases;
struct sdap_search_base **hbac_search_bases;
struct sdap_search_base **selinux_search_bases;
struct sdap_search_base **subdomains_search_bases;
struct sdap_search_base **master_domain_search_bases;
struct sdap_search_base **ranges_search_bases;
struct ipa_service *service;
/* id provider */
struct sdap_options *id;
struct ipa_id_ctx *id_ctx;
struct be_resolv_ctx *be_res;
/* auth and chpass provider */
struct ipa_auth_ctx *auth_ctx;
};
/* options parsers */
struct confdb_ctx *cdb,
const char *conf_path,
struct sss_domain_info *dom,
struct ipa_options **_opts);
struct confdb_ctx *cdb,
const char *conf_path,
struct sdap_options **_opts);
struct confdb_ctx *cdb,
const char *conf_path,
struct confdb_ctx *cdb,
const char *conf_path,
struct sdap_options **_opts);
struct ipa_id_ctx *id_ctx,
void **pvt_data);
const char *primary_servers,
const char *backup_servers,
struct ipa_options *options,
struct ipa_service **_service);
struct ipa_id_ctx *id_ctx,
void **pvt_data);
#endif /* _IPA_COMMON_H_ */