test_ad_common.c revision 266110fa0f6eb086f8f88787bb167cea416fe108
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco Jakub Hrozek <jhrozek@redhat.com>
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco Copyright (C) 2013 Red Hat
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco SSSD tests: AD access control filter tests
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco This program is free software; you can redistribute it and/or modify
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco it under the terms of the GNU General Public License as published by
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco the Free Software Foundation; either version 3 of the License, or
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco (at your option) any later version.
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco This program is distributed in the hope that it will be useful,
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco but WITHOUT ANY WARRANTY; without even the implied warranty of
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco GNU General Public License for more details.
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco You should have received a copy of the GNU General Public License
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco along with this program. If not, see <http://www.gnu.org/licenses/>.
b645988bdc1cf4f2f82b8c00ed041ddddd822c24Lubos Kosco/* In order to access opaque types */
4750e1be4c1b2ba11705d5b73b86dd1b9dd4e1acKnut Anders Hatlen test_ctx = talloc_zero(global_talloc_context, struct ad_common_test_ctx);
4750e1be4c1b2ba11705d5b73b86dd1b9dd4e1acKnut Anders Hatlen test_ctx->dom = talloc_zero(test_ctx, struct sss_domain_info);
4750e1be4c1b2ba11705d5b73b86dd1b9dd4e1acKnut Anders Hatlen test_ctx->dom->name = discard_const(DOMNAME);
4750e1be4c1b2ba11705d5b73b86dd1b9dd4e1acKnut Anders Hatlen test_ctx->subdom = talloc_zero(test_ctx, struct sss_domain_info);
bfc104f8240fac5b59d4347db4c27be705f6dfc2Knut Anders Hatlen test_ctx->subdom->name = discard_const(SUBDOMNAME);
bfc104f8240fac5b59d4347db4c27be705f6dfc2Knut Anders Hatlen test_ctx->subdom->parent = test_ctx->dom;
bfc104f8240fac5b59d4347db4c27be705f6dfc2Knut Anders Hatlen ad_ctx = talloc_zero(test_ctx, struct ad_id_ctx);
ff5eba819da0cf7964d884630fb13262ef12c505Trond Norbye ad_ctx->ad_options = ad_create_default_options(ad_ctx,
b645988bdc1cf4f2f82b8c00ed041ddddd822c24Lubos Kosco ad_ctx->gc_ctx = talloc_zero(ad_ctx, struct sdap_id_conn_ctx);
ff5eba819da0cf7964d884630fb13262ef12c505Trond Norbye ad_ctx->ldap_ctx = talloc_zero(ad_ctx, struct sdap_id_conn_ctx);
ff5eba819da0cf7964d884630fb13262ef12c505Trond Norbye ad_ctx->sdap_id_ctx = talloc_zero(ad_ctx, struct sdap_id_ctx);
817883e9f0d419428e8236a09b77cdeeaa034df7Knut Anders Hatlen ad_ctx->sdap_id_ctx->opts = talloc_zero(ad_ctx->sdap_id_ctx,
6d7c6f82e644c205bc679ee5b1fa2929ec949963Lubos Kosco ret = sdap_domain_add(ad_ctx->sdap_id_ctx->opts, test_ctx->dom, &sdom);
b645988bdc1cf4f2f82b8c00ed041ddddd822c24Lubos Kosco subdom_ad_ctx = talloc_zero(test_ctx, struct ad_id_ctx);
b6ada49236374a1f4ae462c384d69bab7e6f0a1dGustavo Lopes subdom_ldap_ctx = talloc_zero(subdom_ad_ctx, struct sdap_id_conn_ctx);
b6ada49236374a1f4ae462c384d69bab7e6f0a1dGustavo Lopes ret = sdap_domain_add(ad_ctx->sdap_id_ctx->opts, test_ctx->subdom, &sdom);
struct ad_common_test_ctx);
char *default_primary,
char *default_realm,
const char *keytab_path)
return EOK;
struct ad_common_test_ctx);
struct ad_common_test_ctx);
AD_ENABLE_GC));
AD_ENABLE_GC));
int opt;
switch(opt) {