summaryrefslogtreecommitdiffstats
path: root/src/providers/ad/ad_common.h
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-03-26 21:41:28 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-07-06 11:44:45 -0400
commiteffcbdb12c7ef892f1fd92a745cb33a08ca4ba30 (patch)
tree5c3a38f819b64eb4f2c45575dc245a5b5db0bda9 /src/providers/ad/ad_common.h
parent42aeb975864c3c3ba971fd04c61a1aaf6e69905b (diff)
downloadsssd-effcbdb12c7ef892f1fd92a745cb33a08ca4ba30.tar.gz
sssd-effcbdb12c7ef892f1fd92a745cb33a08ca4ba30.tar.xz
sssd-effcbdb12c7ef892f1fd92a745cb33a08ca4ba30.zip
AD: Add AD identity provider
This new identity provider takes advantage of existing code for the LDAP provider, but provides sensible defaults for operating against an Active Directory 2008 R2 or later server.
Diffstat (limited to 'src/providers/ad/ad_common.h')
-rw-r--r--src/providers/ad/ad_common.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/src/providers/ad/ad_common.h b/src/providers/ad/ad_common.h
new file mode 100644
index 000000000..fefb67b60
--- /dev/null
+++ b/src/providers/ad/ad_common.h
@@ -0,0 +1,85 @@
+/*
+ SSSD
+
+ Authors:
+ Stephen Gallagher <sgallagh@redhat.com>
+
+ Copyright (C) 2012 Red Hat
+
+ This program is free software; you can redistribute it and/or modify
+ 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 AD_COMMON_H_
+#define AD_COMMON_H_
+
+#include "util/util.h"
+#include "providers/ldap/ldap_common.h"
+
+#define AD_SERVICE_NAME "AD"
+
+struct ad_options;
+
+enum ad_basic_opt {
+ AD_DOMAIN = 0,
+ AD_SERVER,
+ AD_HOSTNAME,
+ AD_KRB5_REALM,
+
+ AD_OPTS_BASIC /* opts counter */
+};
+
+struct ad_id_ctx {
+ struct sdap_id_ctx *sdap_id_ctx;
+ struct ad_options *ad_options;
+};
+
+struct ad_service {
+ struct sdap_service *sdap;
+ struct krb5_service *krb5_service;
+};
+
+struct ad_options {
+ /* Common options */
+ struct dp_option *basic;
+ struct ad_service *service;
+
+ /* ID Provider */
+ struct sdap_options *id;
+ struct ad_id_ctx *id_ctx;
+
+ /* Auth and chpass Provider */
+ struct dp_option *auth;
+ struct ad_auth_ctx *auth_ctx;
+};
+
+errno_t
+ad_get_common_options(TALLOC_CTX *mem_ctx,
+ struct confdb_ctx *cdb,
+ const char *conf_path,
+ struct sss_domain_info *dom,
+ struct ad_options **_opts);
+
+errno_t
+ad_failover_init(TALLOC_CTX *mem_ctx, struct be_ctx *ctx,
+ const char *servers,
+ struct ad_options *options,
+ struct ad_service **_service);
+
+errno_t
+ad_get_id_options(struct ad_options *ad_opts,
+ struct confdb_ctx *cdb,
+ const char *conf_path,
+ struct sdap_options **_opts);
+
+#endif /* AD_COMMON_H_ */